Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script not importing in Linux Mint 21
#1
I have gone to python-fu console and ran print gimp.directory and received the location for the plug-ins to be added: /home/live4soccer7/.var/app/org.gimp.GIMP/config/GIMP/2.10/

I created a subdirectory of plug-ins

/home/live4soccer7/.var/app/org.gimp.GIMP/config/GIMP/2.10/plug-ins/ofn-export-layers-cumulative.py

I have never used gimp python-fu and am new to gimp in general. I am moving over from photoshop, but I need to create a script to export images from an xcf file. I figured I would get the above script added just to get the flow and see if I can't modify it or use it as a template to create my own. My script would be rather simple, hopefully.

Select a layer, export jpeg at 90%
deselect previous layer and select a different layer, export jpeg at 90%
and so on and so forth.

Regardless, that's a moot point until I can get a script to show up. I'm not sure what I'm doing wrong.

I have Python 2.7.18 installed and confirmed when checking from terminal.

python-fu shows this: 
GIMP 2.10.38 Python Console
Python 2.7.18 (default, May  3 2024, 11:47:46) 
[GCC 13.2.0]

Thank you for any help in getting me going on this. I'm sure I'm overlooking something simple. 

Do I need to make the python script executable or is there a permission issue?
Reply
#2
Yes, Python scripts need to be marked executable (chmod +x ... in a terminal, if you can't do that in your file explorer).

If you go to Edit > Preferences > Folders > Plug-ins it likely lists a second directory in your .config (/home/live4soccer7/.config/GIMP/2.10/plug-ins/ which is a better place for you own plugins.

You can also use that same UI dialog to tell Gimp about other directories holding Python scripts and other plugins.
Reply
#3
(07-07-2024, 07:09 AM)Ofnuts Wrote: Yes, Python scripts need to be marked executable (chmod +x ... in a terminal, if you can't do that in your file explorer).

If you go to Edit > Preferences > Folders > Plug-ins it likely lists a second directory in your .config (/home/live4soccer7/.config/GIMP/2.10/plug-ins/ which is a better place for you own plugins.

You can also use that same UI dialog to tell Gimp about other directories holding Python scripts and other plugins.

Fantastic! Thank you very much. That was very easy. I did have to add that location in the plugins area under preferences. I am sure I will be back for some more questions as I work through the scripting Smile
Reply


Forum Jump: