1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[RESOLVED] Invoke a script in Gimp from a terminal

Discussion in 'GIMP for Mac' started by castor2012, Aug 24, 2011.

Thread Status:
Not open for further replies.
  1. castor2012

    castor2012 New Member

    Joined:
    Aug 24, 2011
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Hi Guys,

    I recenlty moved from Windows to MacOs and I am currently working on my third party tools like Gimp.

    Before, on Windows, in order to enhance my photos, I use gimp in command line with a simple script

    Now, on MacOs, I want to do the same but without success... I keep the same script and I have read a lot of topics on the web before asking some help.

    I installed Gimp-2.6.11 on MacOs Snow Leopard without Quartz (only X11 pre-installed) and Gimp works; I can launch it, do all my stuff without any problem.

    I can also invoke Gimp from the Application icon or from the command line
    Code:
    /Applications/Gimp.app/Contents/MacOS/Gimp
    But, when I use the following command in a terminal, it is not the same:
    Code:
    /Applications/Gimp.app/Contents/Resources/script -i -b "(simple-unsharp-mask \"IMG_7654.JPG\" 5.0 0.5 0)" -b "(gimp-quit 0)"
    2011-08-24 15:38:24.659 defaults[25263]
    The domain/default pair of (org.x.X11, dpi) does not exist
    batch command experienced an execution error
    On Windows, the same command is working... with the same script (I have created the same script twice, in order to avoid any problem about Mac/Windows file format).

    I have read a lot about the error The domain/default pair of (org.x.X11, dpi) does not exist but I do not use Xquartz, my path is OK, the installation used is provided by <a class="postlink" href="http://gimp.lisanet.de/Website/Download.html" onclick="window.open(this.href);return false;">http://gimp.lisanet.de/Website/Download.html</a> and my log is very poor
    Code:
    Aug 24 15:33:15 pollux defaults[25132]: \nThe domain/default pair of (org.x.X11, dpi) does not exist
    Aug 24 15:33:28 pollux defaults[25165]: \nThe domain/default pair of (org.x.X11, dpi) does not exist
    Aug 24 15:33:44 pollux defaults[25196]: \nThe domain/default pair of (org.x.X11, dpi) does not exist
    Aug 24 15:37:15 pollux defaults[25230]: \nThe domain/default pair of (org.x.X11, dpi) does not exist
    Aug 24 15:38:24 pollux defaults[25263]: \nThe domain/default pair of (org.x.X11, dpi) does not exist
    I do not understand where is my problem (I think the problem is between the screen and the chair but I am not sure)

    Thanks for your help,
     
  2. castor2012

    castor2012 New Member

    Joined:
    Aug 24, 2011
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Re: Invoke a script in Gimp from a terminal

    I am still trying to understand how to do the same on my Mac...

    The following command is working, even if I have warning message
    Code:
    % /Applications/Gimp.app/Contents/Resources/script -i --batch '(gimp-quit 0)'
    2011-08-30 09:40:11.099 defaults[46725]
    The domain/default pair of (org.x.X11, dpi) does not exist
    
    %
    
    My following test was the creation of a Gimp batch file, gimpquit with this simple content:
    Code:
     (define (gimpquit) (let* (gimp-quit 0)))
    
    And it is not working 8O
    Code:
    % /Applications/Gimp.app/Contents/Resources/script -i -b '(gimpquit)'
    2011-08-30 09:48:06.785 defaults[46838]
    The domain/default pair of (org.x.X11, dpi) does not exist
    
    batch command experienced an execution error
    
    %
    
    I do not understand why this very simple script does not work; I have validated this little script on a Windows System; of course, I use the same version of Gimp on each OS and I have tested several versions of Gimp (2.6.6, 2.6.10 and 2.6.11)

    Any idea?
     
  3. David Wood

    David Wood Moderator Staff Member

    Joined:
    Jul 22, 2009
    Messages:
    5,501
    Likes Received:
    5
    Trophy Points:
    38
    Occupation:
    Freelance graphic designer and visual effects arti
    Location:
    Western New York
    Home Page:
    Re: Invoke a script in Gimp from a terminal

    Sadly we don't have many Mac users on this site, you would probably have better luck on Gimptalk or Gimpchat.
     
  4. castor2012

    castor2012 New Member

    Joined:
    Aug 24, 2011
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Re: Invoke a script in Gimp from a terminal

    I found an answer so I update this topic and close it as [RESOLVED]

    <a class="postlink" href="http://www.squidoo.com/gimp-how-to-write-a-script-fu-macro#module69574681" onclick="window.open(this.href);return false;">http://www.squidoo.com/gimp-how-to-writ ... le69574681</a>
     
  5. David Wood

    David Wood Moderator Staff Member

    Joined:
    Jul 22, 2009
    Messages:
    5,501
    Likes Received:
    5
    Trophy Points:
    38
    Occupation:
    Freelance graphic designer and visual effects arti
    Location:
    Western New York
    Home Page:
    All right, I'm glad you got it working. :)
     
Thread Status:
Not open for further replies.

Share This Page