Saturday, February 27, 2010

svnx on MacOSX Snow Leopard: No xauth data; using fake authentication data for X11 forwarding

This was a pretty annoying behavior. Despite most claims that it is harmless, it interferes with correct operation of svnx. I noticed two things it did wrong:

1. When committing changes, after the error it would still look like your changes are not committed, until you did a refresh.
2. Using the repository viewer, you could not get an up-to-date log listing.

After some searching I found this reference:

http://mactip.blogspot.com/2004/04/no-xauth-data.html

which works for the basic symptom. But it didn't help svnx, presumably because I am starting it from the dock. What I did was create a little shell script which I called 'xauth_fix', to first create the xauth data and then open an arbitrary OSX command:

#! /bin/bash
xauth generate $DISPLAY .
if test $# -gt 0
then
open -a $*
fi


If I fire up an X11 terminal window, then run 'xauth_fix svnx', svn runs flawlessly.

No comments:

Post a Comment