Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scripts don't work anymore with Gimp 2.10.20
#1
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 older version of GIMP, but I can't make them work anymore on new GIMP 2.10 no matter how much I try and look on internet.

These are the steps taken after I made a very plain script-fu just for sake of simplicity:

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

~/snap/gimp/292/.config/GIMP/2.10/scripts 
/usr/share/gimp/2.0/scripts
~/.config/GIMP/2.10/scripts
~/gimp

2) I add test.scm into  [i]~/gimp [/i]folder with full 777 permissions. Content of test.scm is:

Code:
(define (script-fu-test 
(gimp-message "TEST!!!!!!!!!!")
))

3) Then, this error message appears when I refresh scripts:

Error while loading ~/gimp/test.scm: Error: unable to open "[i]~/gimp/test.scm"[/i]


SECOND EXPERIMENT
--------------------------
1) I remove ~/gimp from my script-fu folders and copy test.scm to /usr/share/gimp/2.0/scripts with the rest default GIMP scripts.
2) I go to /usr/share/gimp/2.0/scripts folder and run gimp -i -b "(test)" -b '(gimp-quit 0)' 
3) I get the following error:

gimp_check_updates_callback: loading of https://gimp.org/gimp_versions.json failed: Operation not supported

batch command experienced an execution error:
Error: eval: unbound variable: test

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

Thanks in advance!


Attached Files Thumbnail(s)
   
Reply
#2
A question is how you define ~/gimp. The ~ is a shell thing and only a shell (bash/ksh/zsh) will replace it by /home/your_id. For Gimp is just a directory called ~ (n there working directory). But then you would have to set that by editing the gimprc file directly.

Not a Scheme/script-fu expert by IMHO for you second experiment, you are not defining a test function but a script-fu-test one.

Since you mention snap, I assume that you are running the snap packaging, so what directories are listed in Edit>Preferences>Folders>Scripts?
Reply
#3
No solution, just comments

'buntu 20.04 default Gimp is 2.10.18 not 2.10.20  and looking at your script-fu folders list you installed the snap version of Gimp.

Generally that is ok, it does work (for most things) added scripts should go in ~/snap/gimp/292/.config/GIMP/2.10/scripts That works here for me. A script there runs on an open image in Gimp.
The installation folder might show as /usr/share/gimp/2.0/scripts but it is actually /snap/gimp/292/usr/share/gimp/2.0/scripts

   

You 'upgraded' to 'buntu 20.04 Does that mean over the top of your existing (maybe 'buntu 18.04) installation? I wonder are there bits of the old remaining? The old Gimp profile for example.  Looks that way from your 'scripts' folder list.
In a terminal what does whereis gimp show?
Also in a terminal a plain gimp command works, a bit strange considering it is /snap/bin/gimp Gimp starts but I get the same sort of error message as you do.  These 'snap' installations are sandboxed and self-contained. Might explain why the gimp - command - batch fails.
Reply
#4
(09-05-2020, 03:43 PM)Ofnuts Wrote: A question is how you define ~/gimp. The ~ is a shell thing and only a shell (bash/ksh/zsh) will replace it by /home/your_id. For Gimp is  just a directory called ~ (n there working directory). But then you would have to set that by editing the gimprc file directly.

Not a Scheme/script-fu expert by IMHO for you second experiment, you are not defining a test function but a script-fu-test one.

Since you mention snap, I assume that you are running the snap packaging, so what directories are listed in Edit>Preferences>Folders>Scripts?

Thanks for your message, Ofnuts!

I don't use ~ in my gimp Preferences; I use /home/[USERNAME]/gimp.

I did some changes on my test.scm and tried to run gimp -i -b "(script-fu-test)" -b '(gimp-quit 0)', but threw the same error (see screenshot)

(09-05-2020, 03:47 PM)rich2005 Wrote: No solution, just comments

'buntu 20.04 default Gimp is 2.10.18 not 2.10.20  and looking at your script-fu folders list you installed the snap version of Gimp.

Generally that is ok, it does work (for most things) added scripts should go in ~/snap/gimp/292/.config/GIMP/2.10/scripts That works here for me. A script there runs on an open image in Gimp.
The installation folder might show as /usr/share/gimp/2.0/scripts but it is actually /snap/gimp/292/usr/share/gimp/2.0/scripts



You 'upgraded' to 'buntu 20.04 Does that mean over the top of your existing (maybe 'buntu 18.04) installation? I wonder are there bits of the old remaining? The old Gimp profile for example.  Looks that way from your 'scripts' folder list.
In a terminal what does whereis gimp show?
Also in a terminal a plain gimp command works, a bit strange considering it is /snap/bin/gimp Gimp starts but I get the same sort of error message as you do.  These 'snap' installations are sandboxed and self-contained. Might explain why the gimp - command - batch fails.

Hello rich2005 and thanks for your comments!

I just tried to move my script to ~/snap/gimp/292/.config/GIMP/2.10/scripts with full 777 permissions but when I refresh scripts via GIMP then I get the same error pop-up, as you can see in the screenshot. 

Moreover, I totally formatted my older 18.04 Ubuntu, and then I did a clean installation of Ubuntu 20.04. Then, I installed Gimp 2.10.20 through Ubuntu Software application. 

I have been manually creating gimp script folders so maybe this is why it seems it's from older remains.

whereis gimp returns 
Code:
gimp: /usr/lib/gimp /etc/gimp /usr/share/gimp /snap/bin/gimp

If Ubuntu's 20.04 default GIMP is 2.10.18 then maybe it would be better to install this one instead of 2.10.20? And maybe not via snap, what do you think? If this is better, do you know what is the best way to fresh install GIMP 20.10.18 on my Ubuntu 20.04?

Thank you in advance!

(09-05-2020, 03:43 PM)Ofnuts Wrote:  so what directories are listed in Edit>Preferences>Folders>Scripts?

If I reset the Script-Fu folders, then I get these ones


Attached Files Thumbnail(s)
   
Image(s)
       
Reply
#5
Very much what you want to do. The snap will be ok for most purposes. It comes with python, so python plugins work. Simple compiled plugins should work providing they do not have any awkward dependencies.  Your  test.scm works installed in ~/snap/gimp/292/.config/GIMP/2.10/scripts and run from the menu.

   

One problem with 'buntu 20.04 is python support for Gimp 2.10 There is none without the user adding it. Details  included in this thread https://www.gimp-forum.net/Thread-Heal-S...4#pid18354  

There is a Gimp 2.10.20 from a PPA https://launchpad.net/~ubuntuhandbook1/+...buntu/gimp  Only English language at present. No python included by default, same as before to manually add it.

I have tried both of those in 'buntu and also  Mint 20.04 VM's and I know they work.  

About whereis, I do not have etc/gimp usr/share/gimp or usr/lib/gimp These are all installation folders for a regular Gimp. Are you sure you never had one installed? In my opinion it would be best to purge all old versions before installing another Gimp.
Reply
#6
rich2005, your comments really saved me!

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!! Smile I will try to run my actual scripts now, and then, if everything fine, I will mark the thread closed.

I am so thankful for your messages! Smile

Issue solved Smile It can be marked as closed
Reply


Forum Jump: