I only recently dug into this issue enough to roughly understand the problem as one relating to the fact that X11 functions around connecting to a display 'server' of sorts.

Which leads to my problem - between home, university, and friends' places, my IP is always changing, and every time it does (to one I haven't previously had), my X11 plays up (running XMonad on X), and things don't run properly until I restart X through startx.

Doing xhost local:root seems to appropriately add new addresses to my xauth list, but it seems cumbersome for my multi-tab setup to have to be sacrificed just because I want to connect to a network with a dynamic IP. Is there any way around this?

Thanks in advance.

  • That doesn't normally happen. Normally the cookie is asociated with your host name, and your host name doesn't change when you connect to a different network. What does the command hostname show? Does it correspond to what you see in xauth list? Does the hostname change when you connect to a different network, and if so how did you set this up? What distribution are you running? – Gilles Jun 21 '15 at 16:32
  • I'm running Arch Linux x64, and my prompt info is usually <user> at localhost, but when I connect to certain networks it will become <user> at <some ip address>. – mediantis Jun 23 '15 at 11:59

The only two options I am aware of that may work are vnc and vpn. with a vpn you would appear to have a static IP address. With vnc your state would be preserved. ssh tunneling would hide ip address issues from X11 but it would still not survive a ip address change. The only reputable advice I have seen regarding changing IP addresses with X11 is don't.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.