[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xmove + ssh failure


This is a follow-up on a thread from january 2004 - if this mail is not recognized as a follow-up - please take a look at the problem on http://lists.debian.org/debian-user/2004/01/msg01220.html .

Root of the problem:
When you log into a server with SSH (with X11 forwarding), your .Xauthority file gets updated with a cookie (generated by SSH? - its not the original cookie anyway) belonging to a display named
  <server name>/unix:<display>

  jvc@mya:~$ xauth l
  mya/unix:13  MIT-MAGIC-COOKIE-1  27be74025ceb8842d2b7d50aa0a60a68

(yes - you guessed right - my server name is 'mya').

Your DISPLAY variable, on the other hand, belongs to 'localhost':
  jvc@mya:~$ echo $DISPLAY

For most programs this is fine - but for Xmove, it is a problem. So... tough luck!

A solution:
Very simple: Just add a line to your .Xauthority file (use xauth) belonging to localhost with the same display and cookie and everything works. E.g.:

* Terminal 1:
  jvc@jvc:~$ ssh -X mya
  jvc@mya:~$ xauth add $DISPLAY MIT-MAGIC-COOKIE-1 `xauth l
  "mya/unix${DISPLAY/localhost/}" | cut -f 5 -d ' '`
  jvc@mya:~$ xmove -port 3
  Implementing MIT-MAGIC-COOKIE-1 user authentication
  XMove 2.0 ready.

* Terminal 2:
  jvc@jvc:~$ ssh -X mya
  jvc@mya:~$ xauth add $DISPLAY MIT-MAGIC-COOKIE-1 `xauth l
  "mya/unix${DISPLAY/localhost/}" | cut -f 5 -d ' '`
  jvc@mya:~$ DISPLAY=:3 xterm

and voila... (Here I used display :3 because display :1 was already taken by another xmove :P)

A side note:
When moving windows (apps) from one display to another, be sure to update your authority credentials first. If you do not, both xmove and xmovectrl will crash looping, burning CPU cycles trying to do... well... apparently nothing!

Apart from that, I think it is a _great_ app which actually deserved a good maintainer to fix little bugs like the one mentioned above and the fact that the pixel depth of destination Xserver must be the same as the pixel depth of your source Xserver.

Using xmove in combination with screen really gives you a lot of opportunities to have a server (without any screens attached - or even an Xserver running) running your e.g. icq-client and just have it moved to your laptop when working on that, or... well... you get the point, I assume...

Have fun

P.S. - sorry to use the mail adress I am using - but I don't want to much spam om my primary adress. Want to contact me, replace 'spam' with 'mail' in my sender adress...

Reply to: