[LUGSB] GNOME desktop weirdness

Michael Graffam mgraffam at mathlab.sunysb.edu
Mon Mar 15 18:35:25 EST 2004



On Mon, 15 Mar 2004, Akshat Aranya wrote:

> My GNOME desktop acts weird if the hostname of the machine changes when
> I'm logged in.  I can't launch any Gnome application and eventually the
> Gnome session dies on me.  Has anybody had this problem before and is
> there some way out other than restarting X whenever my hostname changes?

This "problem" is, in fact, a feature -- and it is a feature of X, not
Gnome. X is a networked GUI (that is, you can display the graphical / GUI
output (locally) of a program running on a remote machine). All windows
displayed on your desktop are actually network connections to your X
server. Most of these connections will be over the local loopback
"network" interface. Other may come from over a real network connection.

Like all network connections, they must come from a host -- and that host
typically has a name. For security reasons, X checks this name and sets
the X defaults to only allow connections from itself. When your hostname
changes, X thinks that the connection are coming from an external host
and things get "strange" as you put it.

This can be configured with the xhost command, to control which network
hosts can access your X server. But it is typically a bad idea to just
allow blanket access.

> I don't want to do that since I keep jumping back and forth wired and
> wireless which changes my hostname.

It is possible to configure your host in such a way that it
always identifies itself as "foobar" to local programs regardless of
what its hostname is to external hosts. /etc/hosts is the relevent
file, and depending on some other variables (such as the software
you are using) you may (or may not) have to run local DNS software.




More information about the lugsb mailing list