04-20-2023, 09:59 PM
The flatpak app is sandboxed, it has its own view of the file system. What it sees as /usr is actually in the flatpack tree, which is why you don't see some folders on your system. Other things to know about the flatpak version:
IIRC you can normally put your script/plugins in your own Gimp profile (~/.config/GIMP/2.10/ IIRC). If not you can add a folder in Preferences/Folders/Plug-ins and put your script there (hint: put some recognizable files in the folder before you pick it from Gimp, so you will know if you see a folder from the flatpak or a "real" folder).
Make sure that your script has the executable flag, and no syntax errors.
If you start Gimp from a terminal, Python errors will show in the terminal. You can use a print '********************' at the beginning of the code to see if it is at least called and executed.
You can use script from my collection as examples (and steal all the code you want). Beware that some may use some tricks when registering several functions (I hate to repeat myself). Usually the smaller ones (check the ZIP size) are the simplest. In any case you can always ask.
- It cannot access files outside of your home tree.
- It cannot use the real /tmp. This was a big problem for me since some apps share files with Gimp through /tmp.
- It has its own copy of the "recent files" so if you want to upload files you just saved with Gimp, you will have to navigate your directory tree instead of reaching the file quickly through Recently used (but IIRC there is a workaround for that).
IIRC you can normally put your script/plugins in your own Gimp profile (~/.config/GIMP/2.10/ IIRC). If not you can add a folder in Preferences/Folders/Plug-ins and put your script there (hint: put some recognizable files in the folder before you pick it from Gimp, so you will know if you see a folder from the flatpak or a "real" folder).
Make sure that your script has the executable flag, and no syntax errors.
If you start Gimp from a terminal, Python errors will show in the terminal. You can use a print '********************' at the beginning of the code to see if it is at least called and executed.
You can use script from my collection as examples (and steal all the code you want). Beware that some may use some tricks when registering several functions (I hate to repeat myself). Usually the smaller ones (check the ZIP size) are the simplest. In any case you can always ask.