Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

X11 in Leopard

I'm not sure if anyone is having this problem, but I cannot open the Gimp and Inkscape anymore after upgrading to Leopard. Any suggestions?

MacBook Pro, Mac OS X (10.5), HOLY CRAP I HAVE LEOPARD!!!!!

Posted on Oct 26, 2007 9:45 AM

Reply
123 replies

Nov 9, 2007 7:25 AM in response to Mac-oholic

Hi. I have similar experiences as many of you: Gimp.app opens, but the cursor sometimes moves slowly, and it crashes if I try to stroke on the canvas. Inkscape works if I open X11 first, which doesn't bother me. My question is this: are all these GIMP problems related to Gimp.app only, or have people also been having problems with the MacPorts variant?

I've been thinking about installing MacPorts. The thing is that this is my first Mac (I bought it the same day Leopard came out). Until that day, I had never even once used a Mac before (ergo Leopard is the only Apple OS that I've ever used). I am afraid that MacPorts will make my Mac somehow "dirty" in that now I'll start installing junk to other locations besides /Applications. As a network administrator, I have a fairly good understanding of the Unix directory structure, so going from everything nicely tucked into /Applications back to /bin and /usr/bin and /usr/local/bin not to mention all of the .../lib and other folders seems like a step backwards.

Please comment on whether GIMP works via MacPorts on Leopard, and whether--as experienced Apple users--you recommend for or against MacPorts.

Thank you,
Toby

Nov 9, 2007 8:12 AM in response to R. Toby Richards

R. Toby Richards wrote:
Hi. I have similar experiences as many of you: Gimp.app opens, but the cursor sometimes moves slowly, and it crashes if I try to stroke on the canvas.


The curser running slow was/is an X11 problem and causes other problems in other X11 clients. It has a preliminary fix in an alpha released here. For others reading this, you need to be somewhat comfortable with command line to apply this alpha and care should be taken when completing this 'update'.

Inkscape works if I open X11 first, which doesn't bother me. My question is this: are all these GIMP >problems related to Gimp.app only, or have people also been having problems with the MacPorts >variant?


It seems to be a gimp-side issue, at least with 2.4r3. I have yet to hear of someone getting this to work. 2.2.11 used to work in tiger but now crashes on start-up. So, there are no working versions of gimp right now for Leopard, afaik.


I've been thinking about installing MacPorts. The thing is that this is my first Mac (I bought it the same day Leopard came out). Until that day, I had never even once used a Mac before (ergo Leopard is the only Apple OS that I've ever used). I am afraid that MacPorts will make my Mac somehow "dirty" in that now I'll start installing junk to other locations besides /Applications. As a network administrator, I have a fairly good understanding of the Unix directory structure, so going from everything nicely tucked into /Applications back to /bin and /usr/bin and /usr/local/bin not to mention all of the .../lib and other folders seems like a step backwards.


As for macports, it is very cool, and it really doesn't do too much to the system as far as making it dirty. One of the things it does to the system is it adds to the $PATH variable so that you can call the programs without having to go to the correct directory, which does seem to have one side-effect. Let me explain.... Macports downloads everything it needs to run without any external libraries/programs in a single directory /opt/local/. This makes macports easy to remove, simply rm -r /opt/local, and remove the added $PATH variable paths and you are back to square one. The unfortunate part is it downloads redundant programs you may already have. This is good in the sense that you don't have to worry about compatibility with the macports, but a pain when you want to call the os x version of a program. For example, you download ssh from macports. Now when you type ssh www.name.com, it will use the macports version and not the os x version. If it is an older version, or worse, a broken version, it will be a little annoying to type the path to the correct bin/ folder.

You could change the order of the paths in the $PATH variable, or just type out the path to the binary you want, or even make an alias, but this is the part that 'dirties' your os. All in all, I like it as it makes installing a lot of X programs very easy so you don't have to chase down dependancies.

As far as this being the first mac experience... I say since you are familiar with command line, go at it full bore and break it. Then just reinstall. You can learn a lot that way. As far as not putting applications (or rather binaries) in /Applications it actually makes some sense in terms of order. Not having X11 applications in the /Applications folder may seem strange, but this folder is really reserved for application.app/ distributions not binaries. Open the Terminal.app and cd your way into an application.app/ folder, e.g. /Applications/Utilities/X11.app/, and take a look at what a .app is. It isn't just a binary. A lot of X11 apps only come in binary form, but feel free to make a .app to put into the /Application folder and be sure to share, as we all like a simple double-click. \grin.

-mike

Nov 9, 2007 8:14 PM in response to Michael Thorn

Thru an almost tireless effort two people discovered the bug and squashed it within minutes of each other. I have checked GIMP 2.4r3 and it seems to work perfectly. So, how to fix it?

I am going to give a slightly, very slightly, expanded set of instructions that are here, but you should somewhat comfortable with command line as this is not a simple click-to-install solution. I will try and add a few comments where needed for someone who has never even opened terminal. Press 'enter' or 'return' between commands. Oh, and of course, I take NO responsibility for you breaking your computer by following my commands whether it is my fault or not. Type at your own risk.

First update to the newest Xquartz, this will solve other issues currently broken in Gimp:

Make sure X11 is not currently running (the X icon should not be in the dock), if it is shut it down by quitting it or logging out and back in.

Open Terminal.app, it is located in /Applications/Utilities/
At the command prompt (should end in $ with Leopard) type the following one line at a time with an enter between each command:

sudo cp /usr/X11/bin/Xquartz /usr/X11/bin/Xquartz_backup


at this point the computer will ask for a password, enter yours (you should have administrator rights, if you don't go to system preferences>accounts and change this fact before continuing).

curl -LO http://people.freedesktop.org/~bbyer/x11app/xorg-server-1.2a8/Xquartz-1.2a8.bz2


bunzip2 Xquartz-1.2a8.bz2


sudo install -b Xquartz-1.2a8 /usr/X11/bin/Xquartz


That's it for Xquartz, but don't quit or close the terminal window. Don't try gimp yet it still will not work.

Now for the broken X11lib:

Just to make sure you haven't left the current directory:

cd /tmp


curl -LO http://people.freedesktop.org/~bbyer/x11app/libX11.6.dylib.bz2


bunzip2 libX11.6.dylib.bz2


sudo install -b libX11.6.dylib /usr/X11/lib


Now to modify gimp so it acts a little better. I am going to assume you downloaded Gimp.app and installed it into /Applications. Back to the terminal, let's start typing again:

nano /Applications/Gimp.app/Contents/Resources/init


This will open an easy to use text editor. Comment out (put # at the start of the line) the line that starts with "ps -wx ..." (so it looks like: #ps -wx ....
Continue to comment out each line after this one up to and including the line that begins with "open -a X11 ..." That should leave a total of three lines that are not commented out, one that begins "CWD...", another "export...", and another "exec...".

It should look like:

#!/bin/sh
#
# Author: Aaron Voisine < aaron@voisine.org >

CWD="`(cd \"\`dirname \\\"$0\\\"\`\"; echo $PWD)`"

#ps -wx -ocommand | grep -e '[X]11' > /dev/null
#if [ "$?" != "0" -a ! -f ~/.xinitrc ]; then
# defaults write com.apple.x11 wm clickthrough -bool true
# echo "rm -f ~/.xinitrc" > ~/.xinitrc
# sed 's/xterm/# xterm/' /usr/X11R6/lib/X11/xinit/xinitrc >> ~/.xinitrc
#fi

#open -a X11 || open -a XDarwin

export "FONTCONFIG_PATH=$CWD/etc/fonts"
exec "$CWD/bin/cache-fonts"


To save the changes type: ctrl-x, and answer yes to saving the changes, and click enter to keep the same file name. If you don't know ctrl-x means hold down the ctrl key (on the bottom row of keys near the space bar) and hit the x button.

Now edit the next file the same way:

nano /Applications/Gimp.app/Contents/Resources/script
In this file comment out everything AFTER the line that starts "TMP=..." and BEFORE the line that starts "cd ~/" This should leave 4 lines uncommented.

Save the same way, type: ctrl-x, and again answer yes and click enter.

One more file:

nano /Applications/Gimp.app/Contents/Resources/openDoc


Comment out the line that starts: export "DISPLAY=`

Save the same way, type: ctrl-x and answer yes and click enter.

That's it. That's all you should need to do. Cross your fingers and open gimp. All should work well. Good luck.

Nov 10, 2007 3:42 PM in response to Michael Thorn

*Hey Michael!*

*You are the greatest! It worked perfectly for me.*

+I would like to add that for those out there who are not really that comfortable with Terminal, you can point-and-click your way through some of this.+

+Follow Michael's instruction until you get to the point where you have to alter the Gimp.app. Feel free to close out Terminal through the Terminal Menu or by entering the command: killall Terminal+

+Open a Finder window and navigate to your Applications folder. Find the Gimp.app and Right-click (or ctrl-click) it to bring up the contextual menu.+

+Now click on:+ *Show Package Contents*

+A new window will open up showing the insides of the Gimp.app+

+Navigate to the files that you need to edit:+

/Applications/Gimp.app/Contents/Resources/init
/Applications/Gimp.app/Contents/Resources/script
/Applications/Gimp.app/Contents/Resources/openDoc

+These files are Unix executables. Right-click (or ctrl-click) on the file named+ init

+You are going to want to open it with another Application so select:+ *Open With > Other. . .*

+Scroll down the Application list and select+ TextEdit.

+Now you can comment-out the lines that Michael was telling you about.+

+Repeat this for+ script and openDoc

*Read Michael's instructions very carefully. This particular forum has some kind of Markup code that you can use to give your text a little richness, but this makes it nearly impossible to post the text as it should look in these Unix executables. And it doesn't help that there are several different dialects for Markups.*
http://discussions.apple.com/help.jspa#format

Nov 10, 2007 7:31 PM in response to Pashadawg

These instructions are specific to Leopard and Gimp 2.4r3, all other versions travel at your own risk. I am relatively sure that 2.2.11 is crashing for a different reason unrelated to the reason 2.4r3 was crashing. I have found 2.4 to be faster than 2.2, and even if you don't like the new look I think you can change that in the preferences. So, my advice would be to dump 2.2 and download 2.4r3... it seems to be pretty stable, and future versions should keep working.

Nov 10, 2007 7:44 PM in response to Pashadawg

Sorry Pashadawg, I didn't make the connection that you have a ppc chip and couldn't use 2.4r3. The font thing, is 'cacheing fonts', and is normal to have it happen only once. If it happened more than once that would be odd. Anyway, the solution will not work for 2.2.x because 2.2 seems to be having trouble with a different library. I have sent apple the crash log from 2.2. Hopefully they can fix this too. If I see a solution anywhere I will be sure to post it here. Hopefully 2.4 will finalize soon and they will post the ppc version for you.

I bet rebuilding this library would fix the problem, but I am not knowledgeable enough to do this yet. I am trying to learn and if I figure it out I will let you know. Anyone else can try and troubleshoot this as well. This part of the OS is open. If you need to know what library I am talking about, run gimp and when it crashes read the report. It will give you a few hints.

Sorry to all using ppc based computers as I have no solution for gimp for you yet.

Nov 11, 2007 4:26 PM in response to Jun T.

Hey Jun T. Thanks! I have have become very accustomed to another Forum and its Markup language. Nothing I used from that forum works the same here. So I'm glad you shared your wisdom! Oh, and how do you prevent formatting (make something plain text)?

This is what Michael was telling us to do to get the Gimp to work (The files should look like this when your done):

init


#!/bin/sh
#
# Author: Aaron Voisine <aaron@voisine.org>
CWD="`(cd "`dirname \"$0\"`"; echo $PWD)`"
#ps -wx -ocommand | grep -e '[X]11' > /dev/null
#if [ "$?" != "0" -a ! -f ~/.xinitrc ]; then
#defaults write com.apple.x11 wmclickthrough -bool true
#echo "rm -f ~/.xinitrc" > ~/.xinitrc
#sed 's/xterm/# xterm/' /usr/X11R6/lib/X11/xinit/xinitrc >> ~/.xinitrc
#fi
#open -a X11 || open -a XDarwin
export "FONTCONFIG_PATH=$CWD/etc/fonts"
exec "$CWD/bin/cache-fonts"


script


#!/bin/sh
#
# Author: Aaron Voisine <aaron@voisine.org>
CWD="`dirname "$0"`"
TMP=/tmp/$UID/TemporaryItems
#ps -wx -ocommand | grep -e '[X]11' > /dev/null
#if [ "$?" != "0" -a ! -f ~/.xinitrc ]; then
#echo "rm -f ~/.xinitrc" > ~/.xinitrc
#sed 's/xterm/# xterm/' /usr/X11R6/lib/X11/xinit/xinitrc >> ~/.xinitrc
#fi
#mkdir -p $TMP
#cp -f "$CWD/bin/getdisplay.sh" $TMP
#rm -f $TMP/display
#open-x11 $TMP/getdisplay.sh ||
#open -a XDarwin $TMP/getdisplay.sh ||
#echo "😮" > $TMP/display
#while [ "$?" == "0" -a ! -f $TMP/display ]; do sleep 1; done
#export "DISPLAY=`cat $TMP/display`"
#ps -wx -ocommand | grep -e '[X]11' > /dev/null || exit 11
cd ~/
exec "$CWD/bin/gimp" "$@"


openDoc


#!/bin/sh
#
# Author: Aaron Voisine <aaron@voisine.org>
#export "DISPLAY=`cat /tmp/$UID/TemporaryItems/display`"
exec "`dirname "$0"`/bin/gimp-remote" "$@"



But double check Michael's post just to make sure I didn't miss something.

Nov 12, 2007 5:48 AM in response to Mac-oholic

Quoting teh X11 maintainer, bbyer ( http://discussions.apple.com/message.jspa?messageID=5769017#5769017):

I'd like to take this opportunity and publicly thank Michael for all of the time he's put in to writing out detailed directions for fixing the incompatibilities people have run into with Leopard's X11.

End quote.

I would like to echo those sentiments. Thanks Michael! I didn't realise that GIMP wouldn't work properly. Within minutes I was able to replace Xquartz and x11lib, and used nano to fix the Unix executables. This is largely thanks to your detailed and clear instructions. 🙂

Nov 12, 2007 8:38 AM in response to Abhi111

Abhi111 wrote:
Quoting teh X11 maintainer, bbyer ( http://discussions.apple.com/message.jspa?messageID=5769017#5769017):

I'd like to take this opportunity and publicly thank Michael for all of the time he's put in to writing out detailed directions for fixing the incompatibilities people have run into with Leopard's X11.

End quote.

I would like to echo those sentiments. Thanks Michael! I didn't realise that GIMP wouldn't work properly. Within minutes I was able to replace Xquartz and x11lib, and used nano to fix the Unix executables. This is largely thanks to your detailed and clear instructions. 🙂


I would like to second that thanks. . . Michael thank you so much for all your hard work! 🙂
We'd still be sitting here crying over the new X11 and its bugs if you hadn't of come to the rescue.

Nov 14, 2007 10:16 AM in response to PsychTech1

Nice!

Thanks to all who have replied to my post. I am glad I could help.

In all honesty though, I really only did 1% of the work (basically re-writing the instructions so more of the casual users of X could get by). The real work has been done by Ben Byer the XDarwin maintainer and many others who have done all of the grunt work in fishing out these bugs.

The task completed by leopard, namely moving from XFree86 (abandoned and old) to the X.org (actively developed and better), was desperately needed and imho one of the most impressive new features. It is amazing so few things broke. Ben and the others who have contributed deserve a Sam Adams for sure. As time goes on, X11 will fall into place and you will not even realize it is there....

X11 in Leopard

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.