x-windows fails over ssh after a certain amount of time
Hello,
I'm having the following problem with x-windows over ssh: Using xclock as an example GUI program, if I do "ssh -X 123.456.789.012" and then "xclock" it will bring up a clock. If I don't run xclock immediately, but wait for 10 minutes or so, xclock fails with this error: "Invalid MIT-MAGIC-COOKIE-1 keyCan't open display Failed initializing GUI, exiting" If I log in and run xclock, then 10 minutes later start a 2nd instance of xclock, the 2nd instance loads fine too. In other words, the 1st instance of xclock seems to be keeping the GUI interface alive. So I have two questions: 1. How can I keep the GUI interface alive, without needing to run a first instance of xclock? 2. If the GUI interace has died, how can I get it back without logging out and back in again? I've used xclock as an example, but this applies to any x-windows interface. Can anyone help? Thanks in advance. |
you could try running xauth -b
I'm guessing your cookie gets stale |
I tried xauth -b and...
Hi,
Thanks for your reply. I don't quite understand your solution though. I tried as you suggested and got this result: $ xauth -b Attempting to break locks on authority file /home/me/.Xauthority xauth: creating new authority file /home/me/.Xauthority Using authority file /home/me/.Xauthority xauth> And I then have to control-C or type "exit" to end it, neither of which result in the GUI working again. I checked the man-file for xauth, but it doesn't seem to help. Could you give a little more detail? Thanks! |
I'm not sure, I would have thought that you could just
xauth -b generate $DISPLAY . but that justs gives a can't get security info from X server. |
you could give this a try, don't know if it'll work, but might reset the timer
xauth list then remove the entry that matches your current display offset (like 10 or 11) xauth remove <display> then add it back in xauth add <display> . <hexkey> will look something like this xauth list host.domain.com/unix:11 MIT-MAGIC-COOKIE-1 6f4fbb35888f86cf061174bf18a01e40 host.domain.com/unix:10 MIT-MAGIC-COOKIE-1 32d008c133caee35eec323952b5016a8 xauth remove host.domain.com/unix:11 xauth add host.domain.com/unix:11 . 6f4fbb35888f86cf061174bf18a01e40 |
You don't by any chance have something that is changing your display variable? Though you'd think that would cause a problem in either your originally stated cases.
|
All times are GMT -5. The time now is 07:18 PM. |