x-windows fails over ssh after a certain amount of time
Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.