It is currently Wed Nov 11, 2026 12:48 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: How Do I Put Scripts in Gimp Linux
PostPosted: Mon Jan 20, 2014 3:41 pm  (#1) 
Offline
GimpChat Member
User avatar

Joined: Feb 14, 2012
Posts: 426
GIMP Version: 2.8.4
Operating System: Linux
GIMP Experience: Beginner Level



I'm trying to put a couple scripts into gimp on my Linux Umbuto computer and I have found User/Share/Gimp/2.0/Scripts but when I use gedit and try to save the .scm file it says that I do not have the permissions necesarry to save the file. Can anybody tell me what I need to do.

PegLeg


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: How Do I Put Scripts in Gimp Linux
PostPosted: Mon Jan 20, 2014 4:00 pm  (#2) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5241
Location: Gimpville
The following explains how to install scripts & plug-ins in Linux.

viewtopic.php?f=8&t=720

They need to be placed in the hidden .gimp-2.8/scripts folder located in your /home/username/ folder, where username is your user ID. You'll need to tell your file manager to "show hidden files" to be able to see these folders.

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: How Do I Put Scripts in Gimp Linux
PostPosted: Mon Jan 20, 2014 4:32 pm  (#3) 
Offline
GimpChat Member
User avatar

Joined: Feb 14, 2012
Posts: 426
Ah Ha. Yes Thanks! That worked.

I clicked [Places] [Computer] and from the File Browser [Edit] [Preferences] and from the View I checked [Hidden and Back-Up files.

Thanks GnuTux that worked. I was then able to drag the scm file from my usb to the location of the scripts folder and it works. Well not all of the scripts work in the older version of gimp but I was able to put scripts in.

PegLeg


Top
 Post subject: Re: How Do I Put Scripts in Gimp Linux
PostPosted: Mon Jan 20, 2014 5:17 pm  (#4) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5241
Location: Gimpville
Good news! :bigthup

What version of GIMP are you using? If you have some newer scripts that you really need to work, we can probably adjust them to work with the old version of GIMP. :)

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: How Do I Put Scripts in Gimp Linux
PostPosted: Mon Jan 20, 2014 6:20 pm  (#5) 
Offline
GimpChat Member
User avatar

Joined: Feb 14, 2012
Posts: 426
On Linux Ubuntu I'm running gimp 2.6 because that's all Ubuntu can run. And I like this distribution because it has LinuxCNC built in.

The height field offset by value script that RobA made a few weeks ago works good.

I put this mirror script in but it doesn't work:
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2 of the License, or
;; (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, write to the Free Software
;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

; Revised September 2010 to work with GIMP 2.4 and later

(define (script-fu-sg-mirror-dup image layer iterations horizontal vertical workcopy)
  (let* ((work-image 0)
         (new-layer 0)
         (orig-width 0)
         (orig-height 0)
         )
    (if (= workcopy TRUE)
      (begin
        (set! work-image (car (gimp-image-duplicate image)))
        (gimp-image-undo-disable work-image)
        (gimp-display-new work-image)
        )
      (begin
        (set! work-image image)
        (gimp-image-undo-group-start work-image)
        )
      )
    (gimp-selection-none work-image)
    (while (> iterations 0)
      (set! layer (car (gimp-image-get-active-layer work-image)))
      (if (> (car (gimp-image-get-layers work-image)) 1)
        (set! layer (car (gimp-image-merge-visible-layers work-image EXPAND-AS-NECESSARY)))
        )
      (if (= horizontal TRUE)
        (begin
          (set! new-layer (car (gimp-layer-copy layer 1)))
          (gimp-image-add-layer work-image new-layer -1)
          (set! orig-width (car (gimp-drawable-width new-layer)))
          (set! orig-height (car (gimp-drawable-height new-layer)))
          (gimp-layer-resize
              new-layer
              (* 2 orig-width)
                  orig-height
                  0
                  0
                  )
          (set! new-layer (car (gimp-drawable-transform-flip-simple new-layer
              ORIENTATION-HORIZONTAL
              TRUE
              orig-width
              0))
            )
          (gimp-image-resize-to-layers work-image)
          (if (> (car (gimp-image-get-layers work-image)) 1)
            (set! layer (car (gimp-image-merge-visible-layers work-image EXPAND-AS-NECESSARY)))
            )
          )
        )
      (if (= vertical TRUE)
        (begin
          (set! new-layer (car (gimp-layer-copy layer 1)))
          (gimp-image-add-layer work-image new-layer -1)
          (set! orig-width (car (gimp-drawable-width new-layer)))
          (set! orig-height (car (gimp-drawable-height new-layer)))
          (gimp-layer-resize
              new-layer
              orig-width
              (* 2 orig-height)
              0
              0
              )
          (set! new-layer (car (gimp-drawable-transform-flip-simple new-layer
              ORIENTATION-VERTICAL
              TRUE
              orig-height
              0))
            )
          (gimp-image-resize-to-layers work-image)
          )
        )
      (set! iterations (- iterations 1))
      )
    (gimp-selection-none work-image)
    (if (> (car (gimp-image-get-layers work-image)) 1)
      (set! layer (car (gimp-image-merge-visible-layers work-image EXPAND-AS-NECESSARY)))
      )
    (gimp-displays-flush)
    (if (= workcopy TRUE)
      (begin
        (gimp-image-undo-enable work-image)
        (gimp-image-clean-all work-image)
        )
      (gimp-image-undo-group-end image)
      )
    )
  )

(script-fu-register "script-fu-sg-mirror-dup"
"Mirror..."
"Duplicates the image with mirror images"
"Saul Goode"
"Saul Goode"
"4/17/2006"
"*"
SF-IMAGE    "Image"    0
SF-DRAWABLE "Drawable" 0
SF-ADJUSTMENT "Iterations (Image doubles each time)" '( 1 0 10 1 1 0 1 )
SF-TOGGLE "Horizontal direction" TRUE
SF-TOGGLE "Vertical direction" FALSE
SF-TOGGLE "Work on copy" TRUE
)
(script-fu-menu-register "script-fu-sg-mirror-dup"
  "<Image>/Filters/Map/"
  )


Also this other script soulgoode made called called height bevel doesn't work:
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License

(define (script-fu-sg-height-bevel image drawable)
  (gimp-image-undo-group-start image)
  (gimp-selection-none image)
  (gimp-layer-set-mode drawable DARKEN-ONLY-MODE)
  (let loop ((iterations 6)
             (layers (list drawable)) )
    (if (zero? iterations)
      (map (lambda (layer low-output)
             (gimp-levels layer HISTOGRAM-VALUE 0 255 1.0 low-output 255) )
           (cdr (reverse layers))
           '(36 73 109 146 182 219) )
      (let ((layer (car (gimp-layer-copy (car layers) FALSE))))
        (gimp-image-insert-layer image layer 0 -1)
        (gimp-image-lower-layer image layer)
        (gimp-layer-set-mode layer DARKEN-ONLY-MODE)
        (plug-in-vpropagate RUN-NONINTERACTIVE
                            image
                            layer
                            1 ; darker
                            15 ; all channels
                            1.0 ; rate 0-1
                            15 ; all directions
                            0
                            255 )
        (loop (pred iterations) (cons layer layers)) )))
  (gimp-image-undo-group-end image)
  (gimp-displays-flush)
  )
                           
(script-fu-register "script-fu-sg-height-bevel"
"Height Bevel per Pegleg44"
"Adds beveled layers per Pegleg44"
"Saul Goode"
"Saul Goode"
"July 2013"
"*"
SF-IMAGE    "Image"    0
SF-DRAWABLE "Drawable" 0
)
(script-fu-menu-register "script-fu-sg-height-bevel"
  "<Image>/Filters/Decor/"
  )


Top
 Post subject: Re: How Do I Put Scripts in Gimp Linux
PostPosted: Mon Jan 20, 2014 9:27 pm  (#6) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5241
Location: Gimpville
Well, 's'all good with saulgoode. :mrgreen:

I'm sure he'll come along and check these out for ya. Are you getting any error messages in GIMP 2.6.x or are they just not working as expected?

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: How Do I Put Scripts in Gimp Linux
PostPosted: Tue Jan 21, 2014 10:39 am  (#7) 
Offline
GimpChat Member
User avatar

Joined: Feb 14, 2012
Posts: 426
The mirror script just creates a larger canvas that is alpha channel without actually putting the mirror in there.

The Height Bevel gives two messages. The first says:
Plug-In Height Bevel1 per PegLeg44 left image undo in inconsistent state, closing open undo states.
The second one says:
Height Bevel1 per PegLeg44 Message error while executing script-fu-sg-height bevel error: eval: unbound variable: gimp image-inser-layer

The height bevel script that saulgoode made is my most value script that I use. It saves me untold hours of work from having to do it manually. I'm serious when I say that it has saved me probably 30 hours of work over the past several months. And for this I am very grateful.

If saulgoode has time to do anything with these then fine but if not that's ok too. I do most of my work on my windows computer.


Top
 Post subject: Re: How Do I Put Scripts in Gimp Linux
PostPosted: Tue Jan 21, 2014 1:48 pm  (#8) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5241
Location: Gimpville
I don't want to step on toes but I'm sure saulgoode is very busy and he probably doesn't mind me helping out here.

The height bevel script uses the GIMP 2.8 procedure ..
(gimp-image-insert-layer image layer 0 -1)

Which needs to be changed in GIMP 2.6 to ..
(gimp-image-add-layer image layer -1) 


I'll attach the GIMP 2.6.x version.

Attachment:
File comment: Height Bevel For GIMP 2.6.x
sg-height-bevel.scm [1.54 KiB]
Downloaded 96 times

I didn't have any problems with sg-mirror-dup script in GIMP 2.6.11. I tried it on a transparent background, with and without a selection, even flattened with no alpha and it mirrored fine in GIMP 2.6.11. You might want to ensure you've clicked on (selected) the layer you want to mirror before running the script.

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: How Do I Put Scripts in Gimp Linux
PostPosted: Wed Jan 22, 2014 4:54 pm  (#9) 
Offline
GimpChat Member
User avatar

Joined: Feb 14, 2012
Posts: 426
I put the sg-height-bevel.scm in my Linux gimp and it works good. Thanks GnuTux

I'm not to worried about the mirror script because its pretty easy to do it manually.

PegLeg


Top
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group