The "Meet the GiMP!" ForumGIMP, Image Processing (DIP) and PhotographyImage Processing SoftwareScripts, Plugins, Python, Perl and SchemePython PLUG-INS to OSX Mac Leopard..
Pages: [1]   Go Down
Print
Author Topic: Python PLUG-INS to OSX Mac Leopard..  (Read 2547 times)
Dan
Lives here ;-)
***
Posts: 246



View Profile
« on: December 24, 2008, 01:21:34 am »

Loading python scripts to OSX Mac computer on Leopard.
I run and installed Gimp under X11 .

I finally got my Plug-ins to work for me! Grin
If yours is like mine..  X11 and you installed by dragging the application from a
downloaded .dmg this might do the trick.
*Setting the folders in Edit/Preferences/folders didn't work for me.

Here is what I did.

FIRST STEP ... Note:  "xxx" is the name of YOUR script
For convenience,  store  "xxx.py" plug-in script "XXX.py" on the
desktop.

Now here is the tricky part.  Roll Eyes

Open "Applications" and RIGHT click Gimp.

There should be "Show Package Contents"  in the pop up menu.
RIGHT click it. 
You should see "Contents"

Now lets navigate to where the script needs to go.

RIGHT click Open "Contents"
There should be files and folders one of which is "Resources".
RIGHT click  Open "Resources"
There should be a folder "lib"
RIGHT click Open "lib"
Find the folder "gimp"
RIGHT click Open "gimp"
There should be a folder "2.0"
RIGHT click Open "2.0"
Find and RIGHT click OPEN  "plug-ins"

Here I found a lot of black Icons with names.
I scrolled all the way down to the bottom and found files with a ".py" extension
I dragged my Python script from my desktop into this window of files.

Basically I navigated to:
/Applications/Gimp.app/Contents/Resources/lib/gimp/2.0/plug-ins
and dragged my script file from my desktop (Meaningful Black.py) to the open folder window
and dropped it in.

Note :to navigate in the terminal ..( But, I don't know why you would need to do that. )
Open the terminal and first type
cd //
then,  cd applications/gimp.app/contents/resources/lib/gimp/2.0/plug-ins

Then I restarted Gimp and there is was.  Just where it was programmed to be!
My Python script was "Meaningful Black.py" and
it located itself in /Filters/Enhance.

I didn't do a terminal command:
chmod u+w xxx.py
 from the terminal to that navigated location.
Apparently these permissions are assumed.

EDIT:  I loaded another *.py script and the execute permissions were not set so I
did have to set them.  Thus, navigate with terminal and chmod u+x filename.py.
Hope this helps.. let me know and respond. Tongue


Dan
« Last Edit: December 30, 2008, 05:36:00 pm by Dan » Logged

Snapping for luck.

monoceros84
Administrator
Sr. Member
***
Posts: 1460



View Profile WWW
« Reply #1 on: December 25, 2008, 11:52:18 am »

Thanks for sharing your ideas. I added it to the blog entry: http://meetthegimp.org/how-to-install-python-plugins-under-gimp/
« Last Edit: December 25, 2008, 12:00:13 pm by monoceros84 » Logged

Cheers,
Mathias

Visit this site about my photography, my experiences in Norway and my blog:
http://www.gedankenquirl.de (German language)

macfolk
Just in
*
Posts: 7


View Profile
« Reply #2 on: January 03, 2009, 01:59:58 pm »

I played around with this and I could not get it to work.  I am running a package compiled into an .app by lisanet, the package is available through sourceforge.  I am running 2.6.4 for leopard (10.5.6)

I finally figured it out though.  You can install or place the .py scripts, provided they are not for a much older version of Gimp, in ~/Library/Application Support/Gimp/plug-ins.  There is no need to drill down into the app package (provided the previous path is in your preferences under folders/plugins).  Then use the chmod command mentioned already, but in most cases you will need to precede that with the sudo command for temporary root control.

Place the file in the plug-ins folder, then open terminal.  (keep the plug-ins folder open and there is a short cut)  Type   sudo chmod u+x    then drag the file from the plug-ins folder to the terminal window.  This will write the path and filename for you.  No long change of directory command needed! Hit enter and most likely you will be asked to enter an administrative password.  Type in your password or have the admin type in the password and you are finished with the terminal.

If Gimp was open, close it and restart it.  I have installed two python scripts from the forum.  So far using this technique has worked without a hitch (after I had spent an hour trying all sorts of other possibilities).  Hope that helps.
Logged

Dan
Lives here ;-)
***
Posts: 246



View Profile
« Reply #3 on: January 12, 2009, 12:48:17 am »

I'm starting to get a sense that GIMP can be installed
either under root or user.. (or both, yick)
..depending on the install or how / where it got put it on the directory tree.   
 Each would have their unique plug-in location install process. .

Not exactly sure here but it would answer some of the issues encountered.

Dan
« Last Edit: April 15, 2009, 11:45:55 pm by Dan » Logged

Snapping for luck.

Pages: [1]   Go Up
Print
Jump to: