Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

A fix for a miscolored X11 cursor on Intel Macs UNIX
You may have noticed in a few rare instances your cursor in X11 becomes a transparent yellow outline. This is caused by a byte-order bug in Xquartz, in the instance your remote machine changes the cursor's appearance using an image rather than just a bitmap. (RedHat Linux systems do this to get a neat blue facet.)

Use the following if you have this problem. Do not apply this fix if you're running a PowerPC Mac.

Quit X11. Grab this file (2.7MB)) using Safari or command-line wget, then run this command:
sudo tar zxvf xfix.tar.gz -C /
Restart X11. The new binary simply adds a loop of ntohl() to the ARGB image in load_cursor(). A simple modification to quartz-cursor.c, found in X11-0.40.2 -> xc -> programs -> Xserver -> hw -> apple.
    •    
  • Currently 2.80 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (5 votes cast)
 
[52,120 views]  

A fix for a miscolored X11 cursor on Intel Macs | 31 comments | Create New Account
Click here to return to the 'A fix for a miscolored X11 cursor on Intel Macs' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
what about 8-bit mode
Authored by: mzs on Mar 20, '06 08:11:21AM

I have Tiger on an Intel iMac at work. It is the only mac I have that runs Tiger. When I try to run X11.app in 8-bit mode on the Intel iMac the windows are all messed-up. Go into the X11.app preferences and choose 8 bit depth, restart, and start up xlogo to see what I mean. Does this zigg-zagg oddness appear in Tiger on PPC? Does it only appear in Intel? Does someone know how to fix this?



[ Reply to This | # ]
How about the color oddness while using NX
Authored by: mprog on Mar 20, '06 08:58:06AM

I use NX to connect to machines at school... however, since getting my MacBook Pro, whenever I log in using NX the colors are all off... everything has a yellow hue, and some colors are just completely wrong...

I use this to do VLSI cad work, so you can imagine what a pain it is.

Any ideas/ fixes?
thanks!



[ Reply to This | # ]
Fantastic!
Authored by: Mniot on Mar 24, '06 10:20:25AM

This has been driving me insane -- I do most of my work over a forwarded X11 connection.

The fix works, and I can see my cursor again! Thank you so much.



[ Reply to This | # ]
A fix for a miscolored X11 cursor on Intel Macs
Authored by: squishyray on Apr 23, '06 08:07:36AM

i just installed the fix on my MacBook Pro and X sessions from linux work great now. thanks for the fix and the explanation.



[ Reply to This | # ]
A fix for a miscolored X11 cursor on Intel Macs
Authored by: edthered on Apr 23, '06 08:55:40AM

First off, thank you, thank you thank you...

but being a paranoid unix geek, do you have a patch or source file for the fix that we could take a look at and compile ourselves?



[ Reply to This | # ]
A fix for a miscolored X11 cursor on Intel Macs
Authored by: svincent on May 17, '06 05:33:55AM

Wow. Thank you *so* much. I've been using my MBP for a couple weeks now, and mostly I spend all my time connected to remote Linux hosts, all my windows having yellow cursors.

I never realized how horrible it was until I applied this fix.

Thank you!
-Shawn.



[ Reply to This | # ]
A fix for a miscolored X11 cursor on Intel Macs
Authored by: chicken on May 17, '06 10:50:05AM

Thank you very much for the fix and the explanation, we had this problem on one of our new Intel-based Macs.



[ Reply to This | # ]
A fix for a miscolored X11 cursor on Intel Macs
Authored by: holmesbj on May 25, '06 06:03:17PM

Thanks for this, it works beautifully.

Can you post a patchfile of your changes?



[ Reply to This | # ]
A fix for a miscolored X11 cursor on Intel Macs
Authored by: Lycestra on Jun 06, '06 09:15:11AM
http://homepage.mac.com/lycestra/yellowcursor.patch

here is a patch that is effectively the same, tho I haven't tested it. Just put it together at the request of so many users. I lost the original patch in desktop cleanup months ago, but it also only made this kind of change, nothing suspicious.

you'll need to grab the X11 package at http://www.opensource.apple.com/darwinsource/10.4.6.x86/
That's the x86 source, tho the ppc dist works fine. When I made this version, the x86 download link was broken and had to use the ppc codebase. I had hoped the higher version number of the x86 meant it would have this fix or something similar, but I didn't see it.

Expect Apple to get it into Leopard. Last time I made a system patch, it was included in the next major release. That was the Wallstreet fan-in-sleep problem, for those who remember that. :) http://www.macosxhints.com/article.php?story=2002050209205249 Might have to pressure Apple a lot more if you want it sooner. i'd be suprised if 10.4.7 had it.

Cheers.

[ Reply to This | # ]
Problems / Help with the fix for a miscolored X11 cursor on Intel Macs
Authored by: csims on Oct 09, '06 07:18:37PM

Hi,

I'm sorry but I'm new to using the terminal and I'm having some problems making this work on an Intel Quad Mac Pro. I have the file downloaded to the desktop. I get this error if typing what I'm supposed to after switching the directory to the desktop where the file is:

------------------------
Last login: Mon Oct 9 20:11:31 on ttyp1
Welcome to Darwin!
EOA-APPLEG5PRO-2006-1:~ claytonrodney$ cd Desktop
EOA-APPLEG5PRO-2006-1:~/Desktop claytonrodney$ sudo tar zxvf xfix.tar.gz -C /
tar (child): xfix.tar.gz: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error exit delayed from previous errors
--------------------------

If I omit the .gz then I get the following errors:

---------------------------
EOA-APPLEG5PRO-2006-1:~/Desktop claytonrodney$ sudo tar zxvf xfix.tar -C /

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error exit delayed from previous errors
EOA-APPLEG5PRO-2006-1:~/Desktop claytonrodney$
----------------------------

What am I doing wrong? I do not have X11 open at the time and I am using the default "terminal" found in the "utilities" folder.

Thanks.
csims



[ Reply to This | # ]
Problems / Help with the fix for a miscolored X11 cursor on Intel Macs
Authored by: vnoel on Dec 04, '06 11:03:05AM

The problem is that Safari unzips archive files without asking, and the command line instructions assume the file is still zipped when you run them. If you've downloaded the file through Safari, and it's now called "xfix.tar", you have to use this command instead :

sudo tar xvf xfix.tar -C /

notice the "xvf" instead of "zxvf" -- the "z" means you're acting on a zipped file.



[ Reply to This | # ]
A fix for a miscolored X11 cursor on Intel Macs
Authored by: Wrexinite on Feb 02, '07 05:23:42PM

I was running GIMP 2.2.11 on X11 and my drawing/selecting/painting tools were yellow. I'm sure you can imagine how difficult it was to select things.

This fix worked like a champ. Anonymous... you rock! ;)

Wrexinite



[ Reply to This | # ]
A fix for a miscolored X11 cursor on Intel Macs
Authored by: kirktalon on Feb 06, '07 06:52:12PM

I've tried both methods listed here and am not experiencing success at all.
Any help would be appreciated.



[ Reply to This | # ]
A fix for a miscolored X11 cursor on Intel Macs
Authored by: KenHTanaka on Feb 07, '07 10:29:36PM
I suspect that the people who are having trouble may have had the file they downloaded get automatically expanded, which is not what you want in this case.

You can tell if this has happened if the downloaded file is no longer compressed, "xfix.tar" instead of "xfix.tar.gz", or even worse, got un-archived as well and you have a set of nested directories ending in Xquartz such as: "download_directory/usr/X11R6/bin/Xquartz"

If you have xfix.tar, then leave the "z" option off the tar command, which is expecting a compressed file (ending in ".gz"). Install with

sudo tar xvf xfix.tar -C /
If the xfix.tar.gz file you downloaded ended up uncompressed and then unpacked as well, and you don't have an xfix.tar file to work with, you should first try using Safari to re-download the file. If that is what you used the first time, then the same thing will probably happend again. The wget command should do the right thing, but I believe that is not standard issue in Mac OS X (you would have to get it and install it). You should have the "curl" command though, and the way to use that is:
# lines starting with "#" are comments, don't type these
# change directory to where you have permission to download, your desktop
# should suffice:

cd ~/Desktop

# now download the fix file:

curl -o xfix.tar.gz http://www.ssec.wisc.edu/~rayg/pub/xfix.tar.gz

# you should now have a "xfix.tar.gz" that you can install with the
# directions posted.
After an install of any new software or system upgrades, it's a good idea to run your Disk Utility and use the Repair Disk Permissions option on the hard disk.

[ Reply to This | # ]
X11Update2006 note
Authored by: Lycestra on Feb 12, '07 10:32:43AM

This fix undoes the X11Update2006 software update.

xdpyinfo and glxinfo reveal that the vast video mode improvements present in that update disappear after (re)installing the yellow cursor patch, and the 2006 update doesn't include the yellow cursor update itself. I was hoping Apple would release the codebase to the 2006 update at some point, but I haven't seen it yet. So, at the moment, it's one or the other.

Another way to tweak this is to change the remote machine's cursor theme using the .icons directory in your home directory on the remote (linux) machine, or even use it to disable it. That can change the default cursors away from ARGB image cursors to traditional bi-color bitmaps that do display properly. Apps that use ARGB cursors directly are still on their own. More of a Linux customization trick.

I'd like to post a binary update in PKG format of the yellow cursor fix once up-to-date source is available to be patched. Or, even better, Apple posts their own.



[ Reply to This | # ]
A fix for a miscolored X11 cursor on Intel Macs
Authored by: kumbera on Mar 02, '07 03:00:41PM
I have a workaround for this problem that requires no changes to your Apple or to X11 on any system. This fixed all the problems I was having with xterm, emacs, firefox and gimp.

1. on your intel Mac in an X11 terminal window run:


   ssh remote_linux
where remote_linux is the name of a Linux host.

2. After you have authenticated to remote_linux, run the following commands:


   mkdir ~/.icons
   cd ~/.icons
   cp -R /usr/share/icons/HighContrast .
Don't miss the '.' at the end of the previous command

   ln -s HighContrast default
To verify everything is working, run 'xterm' back to your Apple display and admire your nice easy to follow cursor. If your xterm dies with a segmentation fault then there is a problem with the cursor tree your copied with the 'cp -R'. When I tried to use the /usr/share/icons/locolor directory tree my xterms died with a segmentation fault.

Both /usr/share/icons/HighContrast and /usr/share/icons/mono worked for me. Please be aware that not all distributions ship with the same cursors. For example Ubuntu 6.10 didn't have mono. On all the systems I checked (Fedora, RHE, and Ubuntu) HighContrast was present in /usr/share/icons.

When Apple fixes X11 you can simply do a 'rm ~/.icons/default' in your account on the Linux system and you should be back to using the system default icons.

This fix was created from the clear and obvious instructions in the Xcursor man page. :-)

[ Reply to This | # ]

A fix for a miscolored X11 cursor on Intel Macs
Authored by: angrypanda on Mar 08, '07 04:06:04AM

Doesn't work for me.

I tried logging in to a FC5 machine, and copying the hicolor or Bluecurve icon folders to ~/.icons as the HighContrast icon set was not installed on this system.

I made the link to default and logged out, logged back in, and still get the useless yellow cursor.

Oh well, back to the patch.

Jb



[ Reply to This | # ]
A fix for a miscolored X11 cursor on Intel Macs
Authored by: kumbera on Apr 12, '07 01:50:44PM
Sorry this was my fault. I've installed several optional icon sets on my Linux systems.

I hope a more portable set of steps on the remote linux system are:

   mkdir ~/.icons
   cd ~/.icons
   cp -R /usr/share/icons/hicolor .
   ln -s hicolor default
If the cp -R fails then you need to do a
ls -F /usr/share/icons
and change 'hicolor' in both places in the above commands to a valid directory returned by the 'ls -F' command. (Don't use the 'default' directory in /usr/share/icons it won't work.)

[ Reply to This | # ]
A fix for a miscolored X11 cursor on Intel Macs
Authored by: nharward on Mar 22, '07 11:33:11AM

This worked like a charm for me, my distro in question is RHEL ES4 (nahant). Thank you for the post!



[ Reply to This | # ]
A fix for a miscolored X11 cursor on Intel Macs
Authored by: hmsenn on May 03, '07 05:40:27AM

I just switched from PPC to Intel and ran into the yellow-cursor problem. I am reluctant to apply the patch as it seems to undo the performance enhancements in Apple's latest X11 update, as previously posted here.

So my problem now is that the .icons trick does not work for me either. I connect to a SuSE machine, where the only icon set available is /usr/share/icons/wmappl. I also tried icon sets in /opt/kde3/share/icons (such as hicolor), but to no avail - the yellow thing on my screen stays (in xterm, emacs, etc.).

- Any ideas as to why this is not working?
- Is there a way to check that the stuff in ~/.icons gets actually noticed by whatever is supposed to read this information?
- Any variations on the theme I could fiddle around with? (Such as getting additional icon sets on the Linux box, changing the X client's settings, etc.)

Any help greatly appreciated as this is a real pain!

Cheers
Hans



[ Reply to This | # ]
A fix for a miscolored X11 cursor on Intel Macs
Authored by: thuldai on Jun 11, '08 03:26:10AM

I'd also be interested in an update of this ~/.icons/ hint.

I tried it on my remote machine, which started off with an empty /usr/share/icons/. So I copied icon sets (among others HighContrast ones) from other Linux computers into my ~/.icons/ there, but that didn't do anything.

I used the package from lycestra instead (heavy heartedly) and that seems to work well on 10.4.11.



[ Reply to This | # ]
Latest Fix
Authored by: Lycestra on Jun 04, '07 10:14:13AM
I confirmed that xdpyinfo and glxinfo match the official version, so I'm posting an installable package of the latest build from the latest source, patched with my patch.

http://homepage.mac.com/lycestra/X11YellowCursorFix.zip

This is the offical 10.4.9 source with just patch applied. Should fix it. Did for me. Please post experiences here for everone to see, in case it doesn't work and I need to pull it. Or email me. MOSXH has emailability, or you can guess my email from the URL above. Or just say hi.

I make no guarantees to the safety or efficacy of this package. I just built it and bundled it. I did make sure to make this one universal by lipo-ing out the ppc from the official and re-merging it with the patched x86. It should be safe, tho the proper way would have been to include a "x86-only!!" verification in the script for the ppc users who like the feel of running Installer for no reason.

Cheers.

[ Reply to This | # ]
Latest Fix
Authored by: shjrgray on Jun 04, '07 06:58:42PM

thanks much, this worked for me with no hassles, connecting from 10.4.9 intel to RHEL 5 (CentOS 5) using NX / freenx. the ~/.icons hicolor or HighContrast tricks did not work for me



[ Reply to This | # ]
Latest Fix
Authored by: bronn on Sep 23, '07 09:57:32AM

This worked a treat. Fixed the problem in a few seconds. Thanks so much!! The yellow cursor was REALLY annoying me.



[ Reply to This | # ]
Latest Fix
Authored by: thuldai on Jun 11, '08 03:30:24AM

After trying the ~/.icons/ trick to no avail I used lycestra's package and that works great so far.

Intel iMac running 10.4.11.



[ Reply to This | # ]
A fix for a miscolored X11 cursor on Intel Macs
Authored by: themiwi on Jun 18, '07 01:43:26AM

The patched version works like a charm... Thanks a lot (and the patch file does look pretty harmless on a first glance).



[ Reply to This | # ]
A fix for a miscolored X11 cursor on Intel Macs
Authored by: ggkrishna on Jul 10, '07 09:55:03PM

Thank you very much. It worked well. Thank you very much.
I was struggling with this problem for the past 7months.
thank you once again.



[ Reply to This | # ]
A fix for a miscolored X11 cursor on Intel Macs
Authored by: sajjad.hossain on Oct 29, '07 06:02:23PM

Any solution for Leopard? The existing one doesn't work.....



[ Reply to This | # ]
A fix for a miscolored X11 cursor on Intel Macs
Authored by: EddEdmondson on Oct 29, '07 10:34:11PM
http://lists.apple.com/archives/x11-users/2007/Oct/msg00096.html

Suggests the patch was inadvertently lost in changing codebase, so I'd expect a resolution in an upcoming update at least.

[ Reply to This | # ]
A fix for a miscolored X11 cursor on Intel Macs
Authored by: Lycestra on Nov 02, '07 09:53:43AM
I've posted a patch for the impatient and adventurous coder. I haven't figured out how to build it yet, but the content of the patch might be correct. Same nature as the 10.4 patch, same function even. Looks like it might work.

I'll post a binary if i can ever get it built.

http://www.lycestra.com/Home/X11.html

[ Reply to This | # ]
Leopard Fix
Authored by: DrRosenRosen on Dec 02, '07 06:05:45AM
I downloaded the latest Xquartz from the official project page and it fixed the problem:

http://trac.macosforge.org/projects/xquartz/wiki/Releases


[ Reply to This | # ]