Switch to full style
Post all Gimp scripts and script writing questions here
Post a reply

Scripts don't work anymore with Gimp 2.10.20

Sat Sep 05, 2020 9:57 am

Hello,

I've upgraded my Ubuntu to Ubuntu 20.04.1 LTS which comes with new GIMP 2.10.20. My scripts used to work fine with the older version of GIMP, but I can't make them work anymore on new GIMP 2.10. These are the steps taken after I made a very plain script-fu just for the sake of simplicity:

FIRST EXPERIMENT
-----------------------
1) These are my script-fu folders:

1.png
1.png (81.84 KiB) Viewed 3754 times


2) Content of test.scm, which is located in ~/gimp folder with full 777 permissions, is:
Code:
(define (script-fu-test
(gimp-message "TEST!!!!!!!!!!")
))


3) Then, when I refresh scripts, a pop-up appears with the following error message::

3.png
3.png (21.81 KiB) Viewed 3754 times


SECOND EXPERIMENT
--------------------------
1) I move test.scm to /usr/share/gimp/2.0/scripts folder with the rest default GIMP scripts.
2) I run
Code:
gimp -i -b "(test)" -b '(gimp-quit 0)'

3) The following error appears:

5.png
5.png (21.38 KiB) Viewed 3753 times


I have been trying to make it work unsuccessfully since weeks. I don't want to go back to old GIMP so your help would be really valuable!

Thanks in advance!

Re: Scripts don't work anymore with Gimp 2.10.20

Sat Sep 05, 2020 10:12 am

Assuming Gimp was intalled via PPA, then this is where you need to put your scripts.

gimp.jpg
gimp.jpg (58.8 KiB) Viewed 3749 times

Re: Scripts don't work anymore with Gimp 2.10.20

Sat Sep 05, 2020 10:22 am

Thank you for your fast reply!

I installed GIMP via Ubuntu Software. So, I moved my script to ~/.config/GIMP/2.10/scripts, but I still get the same error:

6.png
6.png (31.98 KiB) Viewed 3742 times

Re: Scripts don't work anymore with Gimp 2.10.20

Sat Sep 05, 2020 11:06 am

Your code can only run in the console.
To work from the menu, it must meet the registration conditions:
Code:
(define (script-fu-test)
(gimp-message "TEST!!!!!!!!!!")
)
(script-fu-register
   "script-fu-test"
   "Gounis Test..."
   "Test"
   "gounis"
   "gounis"
   "2020"
   "RGB* GRAY*"
   SF-IMAGE       "The Image" 0
   SF-DRAWABLE    "The Layer" 0
)   

(script-fu-menu-register "script-fu-test" "<Image>/Test/" )

Re: Scripts don't work anymore with Gimp 2.10.20

Sat Sep 05, 2020 12:22 pm

Thanks for your answer. I still get the same error though :(

7.png
7.png (69.36 KiB) Viewed 3705 times

Re: Scripts don't work anymore with Gimp 2.10.20

Sat Sep 05, 2020 1:01 pm

I have doubts about your command syntax (no-interface and batch)
Why don't you run Gimp normally to check the menu?
Image

Re: Scripts don't work anymore with Gimp 2.10.20

Sat Sep 05, 2020 1:07 pm

MareroQ, Where can I see this panel?

Moreover, I installed Gimp 2.10.20 via Ubuntu Software. It seems though that I installed the snap version of Ubuntu. Maybe, this is the problem? Do you think it would be better to install 2.10.18 not using snap?

Re: Scripts don't work anymore with Gimp 2.10.20

Sat Sep 05, 2020 1:28 pm

The problem was indeed that I installed the snap version of Gimp! So, I completely removed Gimp, and then I installed Gimp 2.10.18 via ppa:otto-kesselgulasch/gimp. Afterwards, I moved my script into ~/.config/GIMP/2.10/scripts, and it worked fine either via command line or via GIMP!! :) I will try to run my actual scripts now, and then, if everything fine, I will mark the thread closed.

Thanks so much for your time, people! :)

Re: Scripts don't work anymore with Gimp 2.10.20

Sat Sep 05, 2020 1:32 pm

Gimp-2.10.18 has terrible bugs - advise against it.
Most recommend a choice:
https://github.com/aferrero2707/gimp-appimage/releases
I use my own compilation and appimage (it doesn't interfere).
For more details, see https://www.gimp-forum.net/

"This panel" - is the main menu of Gimp (I don't know if I understood the question correctly).

Re: Scripts don't work anymore with Gimp 2.10.20

Sat Sep 05, 2020 1:59 pm

I sort of agree about Gimp 2.10.18 being less than wonderfull. However it the default version for 'buntu + Mint 20.04

The appimage is not going to work for gounis, running a command line gimp -i -b "(test)" -b '(gimp-quit 0)' ????

Re: Scripts don't work anymore with Gimp 2.10.20

Sun Sep 06, 2020 9:02 am

I just installed Gimp 2.10.20 using Flatpak (https://itsfoss.com/gimp-2-10-release/), and my scripts work fine!!! :) Thank you all for your recommendations and time!

The only problem now is that I get this weird message when I run my script
Screenshot from 2020-09-06 15-26-00.png
Screenshot from 2020-09-06 15-26-00.png (23.78 KiB) Viewed 1542 times


This line seems to be responsible for it:
Code:
....
(let*
       (
        (image    (car (gimp-file-load RUN-NONINTERACTIVE filename-in "")))
.....
.....
.....
))


filename-in is something like "test.jpg".

Do you maybe know what it might cause it?
Post a reply