Friday, December 16, 2005

X11 over SSH to a Mac

Every once in a while I use SSH to connect to a Linux box from my Mac Mini. When running X11 apps over this connection I would experience weird crashes, especially with GTK apps. Some apps would crash randomly, others would crash immediately when the window came up. For GVim, this is a showstopper.

Frustrated by always seeing errors like this:

The program 'gvim' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadAtom (invalid Atom parameter)'.
(Details: serial 148 error_code 5 request_code 20 minor_code 0)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the --sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)


I decided to consult the oracle of Google. Turns out this is a know issue, and has something to do with the default settings for SSH in Tiger. Mac OSX Hints has an article on the issue.

Summary of the fix: Don't use "ssh -X" to connect to the remote box; use "ssh -Y".

0 Comments:

Post a Comment

<< Home