08-04-2018, 05:24 AM (This post was last modified: 08-04-2018, 08:12 AM by Alan Lacey.
Edit Reason: fixed text formatting
)
I have a new install of Gimp 2.10 on a VMware Ubunto 18 on a MacBookPro.
I'm starting to learn python-Fu and for some reason can't copy my *.py script to the Gimp plugins folder. I'm a real new to Linux and have no idea why this is. The permissions for the plugin folder are read & write (Parent = root)
Any ideas why this would be?
Also , do you have any suggestions for tutorials, learning materials for creating scripts. I've been a photoshop user for many years but now want to use gimp and specifically replace photoshop's 'automate' macro recorder with gimp scripts
08-04-2018, 07:44 AM (This post was last modified: 08-04-2018, 07:49 AM by rich2005.
Edit Reason: typo
)
It has been many-many years since I last used VMware having moved on to VirtualBox in linux installations so...A couple of questions.
Are you writing the python scripts in your Mac then importing (somehow) into the ubuntu VM? There could well be 'owner' issues.
A 'buntu VM is just the same as a physical installation, with the OS and application files in 'root' but there will be a 'User' folder (sometimes separate partition) That is where the Gimp "user" resources are held.
It is a hidden folder (1) starts with a dot ~/.config/GIMP/2.10/plug-ins (2) (~ is linux shorthand for 'home') You will need to make hidden folders visible from the file manager.
Then in the plugins folder, your python script has to be executable, again use the file manager (1) and check the permissions and 'ownership' (2) , not sure how VMware handles this but can also be changed in the file manager.
Advice on learning to create scripts, others will have good advice.
08-04-2018, 08:05 AM (This post was last modified: 08-04-2018, 08:29 AM by Alan Lacey.)
Many thanks Rich for the quick response. The test scripts are written in Sublime text on the Ubuntu box. I do have my test scripts in the ~/.config/GIMP/2.10/plug-ins folder but none appear in gimp where they are meant to show up. I've checked the line: extreme_unsharp_desaturation_tute, menu="<Filter>/Enhance") it looks correct.
Do you happen to have a test (even blank) *.py script that I can test my system with?
Also do the *.py scripts have to be made executable? I've tried both ways, --- sorry I've just checked your response again and I do not have the dialogue to make the plugins folder executable, but all the contained *.pys are.
08-04-2018, 08:48 AM (This post was last modified: 08-04-2018, 08:49 AM by Ofnuts.)
On Unix systerms (OSX and Linux), the python plugins have to be marked executable (chmod +x {file}).
In Gimp: Edit>Preferences>Folders>Plugins lists two directories: one is in the system files (/usr/lib/gimp/... on Linux) and one is in your user data. The first one is of course R/O to mere users, and you normally use the one in your own user directories.
Personally, I have used that same Edit>Preferences>Folders>Plugins to add two Active directories which are in the directories I use to write code. When I want to add a new script to Gimp, I just add a link to it in one of the two Active directories. This makes it easy to enable/disable scripts without moving them (because they have to stay with their doc, test files, etc...)
08-04-2018, 12:32 PM (This post was last modified: 08-04-2018, 01:56 PM by Alan Lacey.)
Thank you both.
Well Rich I've just started up my ubuntu and Gimp again and miraculously your 2/3 image script is now there available and working! I guess I not only needed to restart Gimp, but Ubuntu as well. It's still the only one available in Gimp though, despite my few test scripts, but that's definitely a result. All I need to do now is start scripting properly.
Ofnuts: I'm very new to Linux, with the goal of being Microsoft and Apple Free by 2020, which is when MS stop supporting Win7. So I don't yet understand how you would set up the two folders as you describe. It does sound a good idea though, and I've made a note of it, so when I'm a little more proficient in Linux I'll be using your method. There's still so much to learn.
Once again many thanks to both of you and now I need to delve into just why my scripts aren't there
Hmmm! Not so fast sadly.
Rich I started by a simple modification to your 2/3 script, by just changing the parameters to 4/3 and all relevant entries. Saved it alongside yours in the user plug-in folder, made sure it was executable. And then NADA, even after a Ubuntu restart. Weird or what?
I see, many thanks again. I know I have so much to learn but at the same time I'm sure it'll be worth it as time invested. Navigation and the terminal are at the top of my list once I've got the basics of Gimp scripting working.