Red Hat Bugzilla – Bug 235175
Unable to launch X application after changing the hostname with hostname command line
Last modified: 2007-11-30 17:12:01 EST
Description of problem:
Well, I am unable to launch for instance "system-config-users" after having
changed the hostname from "localhost" to "my_chosen_hostname" with the command
Version-Release number of selected component (if applicable):
Easily if you have a X server on your local machine
Steps to Reproduce:
1. Be connected on an X session with you favorite username.
2. Open a Terminal windows in order to enter command line.
3. do an su - and be connected as root.
4. do a "hostname blablabla" in order to change your hostname from "localhost"
5. run the system-config-user command
6. and finally you should have the following message : See actual result.
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
Unable to import modules. Maybe you are not running under X ?
Well, I should see the user-configuration window.
Reporter, this is not problem of X, but in your configuration. Nobody is allowed
to run application on your X-server, and that includes root. In order to allow
root to run X applications, you have to allow it explicitly with xhost, for
example by running (as normal user owning X-server):
So, this is not a bug.