X and Your Hostname

9 Aug 2006

Recently, Migueal de Icazza wrote this as part of a blog post:

X applications do not open sometimes: this is caused because DHCP is set to “change hostname on DHCP” requests. For some reason X applications are not happy with changes in the hostname. I have no idea why. I personally have not experienced this, but I guessed that it was DHCP changing the host name.

Solution: Make sure that your network setting does not change the hostname. I have no idea why this happens, but this is what happens. Just do not let DHCP change your hostname.

He was right. The X server uses the machine name of the box it’s running on as part of the filename for some socket files (in /tmp/) that allow local apps to connect to the X server. If you change the systems hostname during a running X session, any X apps you launch thereafter will use the new hostname to look for an appropriate socket and not find one.

The fix for getting into this situation is easy; just kill the X session and log in again. Trying to “gracefully” log out of such an X session will probably fail, as the logout dialog box applet can’t be launched. Press <ctrl>+<alt>+<backspace> (all together) to kill your current X session. A new display manager should be started in it’s place.


Actions

Informations

Leave a comment

You can use these tags : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>