Bug 235175

Summary: Unable to launch X application after changing the hostname with hostname command line
Product: [Fedora] Fedora Reporter: Frederic Hornain <fhornain>
Component: XFree86Assignee: X/OpenGL Maintenance List <xgl-maint>
Status: CLOSED NOTABUG QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 6CC: mcepl
Target Milestone: ---   
Target Release: ---   
Hardware: i586   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-04-04 13:17:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Frederic Hornain 2007-04-04 10:13:45 UTC
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 
line hostname.

Version-Release number of selected component (if applicable):
xorg-x11-server-Xorg-1.1.1-47.7.fc6
system-config-users-1.2.47-1.fc6

How reproducible:
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" 
to "blablabla".
5. run the system-config-user command
6. and finally you should have the following message : See actual result.
  
Actual results:

Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified


Unable to import modules. Maybe you are not running under X ?

Expected results:

Well, I should see the user-configuration window.

Additional info:

Comment 1 Matěj Cepl 2007-04-04 13:17:14 UTC
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):

xhost local:

So, this is not a bug.