Bug 888985 - Could not open X display after hostnamectl set-hostname
Summary: Could not open X display after hostnamectl set-hostname
Keywords:
Status: CLOSED DUPLICATE of bug 887816
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 18
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-19 23:29 UTC by Dean Hunter
Modified: 2012-12-20 21:46 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-20 21:39:42 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Dean Hunter 2012-12-19 23:29:11 UTC
Description of problem:
After using "hostnamectl set-hostname" to change the hostname of a server with a static IP address assignment, the super user is unable to start GUI applications from the command line.


Version-Release number of selected component (if applicable):
[root@server ~]# yum list installed systemd*
Loaded plugins: langpacks, presto, refresh-packagekit
Installed Packages
systemd.x86_64                          195-10.fc18                      @fedora
systemd-libs.x86_64                     195-10.fc18                      @fedora
systemd-sysv.x86_64                     195-10.fc18                      @fedora
[root@server ~]# 


How reproducible:
consistent


Steps to Reproduce:
# Install Fedora 18 from Live CD

# Configure System Settings
#   Background
#     Colors & Gradients: solid dark blue gray
#   Network
#     Wireless: Off
#     Wired: On
#       IPv4 Settings
#         Method: Manual
#         Addresses
#           Address: 192.168.1.11
#           Netmask: 255.255.255.0
#           Gateway: 192.168.1.1
#         DNS servers: 192.168.1.11, 75.75.76.76, 75.75.75.75
#       IPv6 Settings
#         Method: Ignore
#   Sound
#     Output
#       Output volume: 100%
#     Sound Effects
#       Alert volume: Off

# Perform these steps as root to customize the install.

  su -   # requests root password

# Enable persistent storage for the systemd journal

  mkdir /var/log/journal

# Shutdown services that are not needed

  chkconfig iscsi        off   # Internet SCSI service
  chkconfig iscsid       off   # Internet SCSI daemon

# Install additional packages for configuration

  yum install --assumeyes dconf-editor gnome-tweak-tool system-config-lvm

# Adjust configuration using dconf-editor

  # org
  #   gnome
  #     shell
  #       always-show-log-out: yes

  dconf-editor   # Navigate the tree to make these changes

# Apply queued updates

  yum update --assumeyes

# Set the host name, because the install does not

  hostnamectl set-hostname server

  cat >>/etc/hosts <<EOD
192.168.1.11  server.hunter.org server
EOD

# Restart to implement changes and updates

  reboot



# Perform these steps as root to customize the install.

  su -   # requests root password


Actual results:
[local@localhost ~]$ gedit
[local@localhost ~]$ su -
Password: 
[root@localhost ~]# gedit
[root@localhost ~]# 
[root@localhost ~]# cat /etc/hostname
cat: /etc/hostname: No such file or directory
[root@localhost ~]# 
[root@localhost ~]# cat /etc/hosts
127.0.0.1		localhost.localdomain localhost
::1		localhost6.localdomain6 localhost6
[root@localhost ~]# 
[root@localhost ~]# cat /etc/sysconfig/network
# Generated by anaconda
NETWORKING=yes
HOSTNAME=localhost.localdomain
[root@localhost ~]# 
[root@localhost ~]# hostnamectl set-hostname server
[root@localhost ~]# 
[root@localhost ~]# cat >>/etc/hosts <<EOD
> 192.168.1.11  server.hunter.org server
> EOD
[root@localhost ~]# 
[root@localhost ~]# cat /etc/hostname
server
[root@localhost ~]# 
[root@localhost ~]# cat /etc/hosts
127.0.0.1		localhost.localdomain localhost
::1		localhost6.localdomain6 localhost6
192.168.1.11  server.hunter.org server
[root@localhost ~]# 
[root@localhost ~]# cat /etc/sysconfig/network
# Generated by anaconda
NETWORKING=yes
HOSTNAME=localhost.localdomain
[root@localhost ~]# 
[root@localhost ~]# reboot


[local@server ~]$ gedit
[local@server ~]$ su -
Password: 
[root@server ~]# gedit
No protocol specified

** (gedit:1911): WARNING **: Could not open X display
Cannot open display: 
Run 'gedit --help' to see a full list of available command line options.
[root@server ~]# 


Expected results:
No errors opening display


Additional info:

Comment 1 Dean Hunter 2012-12-20 00:13:47 UTC
Even as the local administrator there are problems with some applications:

[local@server ~]$ gedit   # this worked as expected
[local@server ~]$ 
[local@server ~]$ system-config-authentication
No protocol specified
Unable to initialize graphical environment. Most likely cause of failure
is that the tool was not run using a graphical environment. Please either
start your graphical user interface or set your DISPLAY variable.
[local@server ~]$ echo $DISPLAY
:0
[local@server ~]$

Comment 2 Ray Strode [halfline] 2012-12-20 17:21:26 UTC
what version of gdm do you have installed?

Comment 3 Dean Hunter 2012-12-20 18:37:02 UTC
[root@server ~]# yum list installed gdm*
Loaded plugins: langpacks, presto, refresh-packagekit
Installed Packages
gdm.x86_64                      1:3.6.2-4.fc18                  @updates-testing
gdm-libs.x86_64                 1:3.6.2-4.fc18                  @updates-testing
[root@server ~]#

Comment 4 Ray Strode [halfline] 2012-12-20 18:59:29 UTC
mind trying:

https://admin.fedoraproject.org/updates/gdm-3.6.2-5.fc18

?

Comment 5 Dean Hunter 2012-12-20 19:39:06 UTC
Sure, but I will need you to please provide instructions. Clicking in I see four RPMs for x86_64 with a download link. I am guessing that if I download a .rpm file I will have the option to immediately install it. Is there any particular order I should download and install them?

Comment 6 Dean Hunter 2012-12-20 19:50:09 UTC
When I try downloading them and select install, it complains that the package is not signed. I am sorry, but I do not know what to do.

Comment 7 Ray Strode [halfline] 2012-12-20 19:50:39 UTC
probably the easiest thing to do would be 

# yum install bodhi
# bodhi -D gdm-3.6.2-5.fc18
# yum install --nogpgcheck gdm*rpm

Comment 8 Ray Strode [halfline] 2012-12-20 19:51:27 UTC
oh if you already have them downloaded, skip to the last command and don't bother with the first two

Comment 9 Dean Hunter 2012-12-20 20:01:03 UTC
[root@server ~]# yum install bodhi
Loaded plugins: langpacks, presto, refresh-packagekit
No package bodhi available.
Error: Nothing to do
[root@server ~]# bodhi -D gdm-3.6.2-5.fc18
bash: bodhi: command not found...
[root@server ~]#

Comment 10 Dean Hunter 2012-12-20 20:03:35 UTC
So I just downloaded them and they went to /home/local/Downloads which is apparently not where yum is looking for them:

[root@server ~]# yum install --nogpgcheck gdm*rpm
Loaded plugins: langpacks, presto, refresh-packagekit
No package gdm*rpm available.
Error: Nothing to do
[root@server ~]#

Comment 11 Dean Hunter 2012-12-20 20:22:26 UTC
[root@server ~]# yum whatprovides bodhi
Loaded plugins: langpacks, presto, refresh-packagekit
bodhi-server-0.9.3-1.fc18.noarch : A modular framework that facilitates
                                 : publishing software updates
Repo        : fedora
Matched from:
Filename    : /usr/lib/python2.7/site-packages/bodhi



bodhi-server-0.9.3-1.fc18.noarch : A modular framework that facilitates
                                 : publishing software updates
Repo        : updates-testing
Matched from:
Filename    : /usr/lib/python2.7/site-packages/bodhi



bodhi-client-0.9.3-1.fc18.noarch : Bodhi Client
Repo        : fedora
Matched from:
Filename    : /usr/bin/bodhi



bodhi-client-0.9.3-1.fc18.noarch : Bodhi Client
Repo        : updates-testing
Matched from:
Filename    : /usr/bin/bodhi



[root@server ~]# yum install bodhi-client
Loaded plugins: langpacks, presto, refresh-packagekit
Resolving Dependencies
--> Running transaction check
---> Package bodhi-client.noarch 0:0.9.3-1.fc18 will be installed
--> Processing Dependency: python-fedora >= 0.3.5 for package: bodhi-client-0.9.3-1.fc18.noarch
--> Processing Dependency: python-simplejson for package: bodhi-client-0.9.3-1.fc18.noarch
--> Processing Dependency: koji for package: bodhi-client-0.9.3-1.fc18.noarch
--> Running transaction check
---> Package koji.noarch 0:1.7.1-1.fc18 will be installed
---> Package python-fedora.noarch 0:0.3.29-2.fc18 will be installed
--> Processing Dependency: python-bunch for package: python-fedora-0.3.29-2.fc18.noarch
---> Package python-simplejson.x86_64 0:2.6.0-2.fc18 will be installed
--> Running transaction check
---> Package python-bunch.noarch 0:1.0.1-3.fc18 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                 Arch         Version                Repository    Size
================================================================================
Installing:
 bodhi-client            noarch       0.9.3-1.fc18           fedora        21 k
Installing for dependencies:
 koji                    noarch       1.7.1-1.fc18           fedora       201 k
 python-bunch            noarch       1.0.1-3.fc18           fedora        14 k
 python-fedora           noarch       0.3.29-2.fc18          fedora       286 k
 python-simplejson       x86_64       2.6.0-2.fc18           fedora       151 k

Transaction Summary
================================================================================
Install  1 Package (+4 Dependent packages)

Total download size: 672 k
Installed size: 3.0 M
Is this ok [y/N]: y
Downloading Packages:
(1/5): bodhi-client-0.9.3-1.fc18.noarch.rpm                |  21 kB   00:00     
(2/5): python-fedora-0.3.29-2.fc18.noarch.rpm              | 286 kB   00:00     
(3/5): python-bunch-1.0.1-3.fc18.noarch.rpm                |  14 kB   00:00     
(4/5): python-simplejson-2.6.0-2.fc18.x86_64.rpm           | 151 kB   00:00     
(5/5): koji-1.7.1-1.fc18.noarch.rpm                        | 201 kB   00:01     
--------------------------------------------------------------------------------
Total                                           346 kB/s | 672 kB     00:01     
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : python-simplejson-2.6.0-2.fc18.x86_64                        1/5 
  Installing : koji-1.7.1-1.fc18.noarch                                     2/5 
  Installing : python-bunch-1.0.1-3.fc18.noarch                             3/5 
  Installing : python-fedora-0.3.29-2.fc18.noarch                           4/5 
  Installing : bodhi-client-0.9.3-1.fc18.noarch                             5/5 
  Verifying  : python-fedora-0.3.29-2.fc18.noarch                           1/5 
  Verifying  : python-bunch-1.0.1-3.fc18.noarch                             2/5 
  Verifying  : koji-1.7.1-1.fc18.noarch                                     3/5 
  Verifying  : python-simplejson-2.6.0-2.fc18.x86_64                        4/5 
  Verifying  : bodhi-client-0.9.3-1.fc18.noarch                             5/5 

Installed:
  bodhi-client.noarch 0:0.9.3-1.fc18                                            

Dependency Installed:
  koji.noarch 0:1.7.1-1.fc18            python-bunch.noarch 0:1.0.1-3.fc18      
  python-fedora.noarch 0:0.3.29-2.fc18  python-simplejson.x86_64 0:2.6.0-2.fc18 

Complete!
[root@server ~]# bodhi -D gdm-3.6.2-5.fc18
Downloading gdm-3.6.2-5.fc18...
gdm-libs-3.6.2-5.fc18.x86_64.rpm                         | 157 kB     00:00 !!! 
gdm-devel-3.6.2-5.fc18.x86_64.rpm                        | 182 kB     00:00 !!! 
gdm-3.6.2-5.fc18.x86_64.rpm                              | 2.1 MB     00:01 !!! 
[root@server ~]# yum install --nogpgcheck gdm*rpm
Loaded plugins: langpacks, presto, refresh-packagekit
Examining gdm-3.6.2-5.fc18.x86_64.rpm: 1:gdm-3.6.2-5.fc18.x86_64
Marking gdm-3.6.2-5.fc18.x86_64.rpm as an update to 1:gdm-3.6.2-4.fc18.x86_64
Examining gdm-devel-3.6.2-5.fc18.x86_64.rpm: 1:gdm-devel-3.6.2-5.fc18.x86_64
Marking gdm-devel-3.6.2-5.fc18.x86_64.rpm to be installed
Examining gdm-libs-3.6.2-5.fc18.x86_64.rpm: 1:gdm-libs-3.6.2-5.fc18.x86_64
Marking gdm-libs-3.6.2-5.fc18.x86_64.rpm as an update to 1:gdm-libs-3.6.2-4.fc18.x86_64
Resolving Dependencies
--> Running transaction check
---> Package gdm.x86_64 1:3.6.2-4.fc18 will be updated
---> Package gdm.x86_64 1:3.6.2-5.fc18 will be an update
---> Package gdm-devel.x86_64 1:3.6.2-5.fc18 will be installed
---> Package gdm-libs.x86_64 1:3.6.2-4.fc18 will be updated
---> Package gdm-libs.x86_64 1:3.6.2-5.fc18 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package     Arch     Version            Repository                        Size
================================================================================
Installing:
 gdm-devel   x86_64   1:3.6.2-5.fc18     /gdm-devel-3.6.2-5.fc18.x86_64   388 k
Updating:
 gdm         x86_64   1:3.6.2-5.fc18     /gdm-3.6.2-5.fc18.x86_64         4.9 M
 gdm-libs    x86_64   1:3.6.2-5.fc18     /gdm-libs-3.6.2-5.fc18.x86_64     36 k

Transaction Summary
================================================================================
Install  1 Package
Upgrade  2 Packages

Total size: 5.3 M
Is this ok [y/N]: y
Downloading Packages:
Running Transaction Check
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : 1:gdm-3.6.2-5.fc18.x86_64                                    1/5 
  Updating   : 1:gdm-libs-3.6.2-5.fc18.x86_64                               2/5 
  Installing : 1:gdm-devel-3.6.2-5.fc18.x86_64                              3/5 
  Cleanup    : 1:gdm-libs-3.6.2-4.fc18.x86_64                               4/5 
  Cleanup    : 1:gdm-3.6.2-4.fc18.x86_64                                    5/5 
  Verifying  : 1:gdm-3.6.2-5.fc18.x86_64                                    1/5 
  Verifying  : 1:gdm-libs-3.6.2-5.fc18.x86_64                               2/5 
  Verifying  : 1:gdm-devel-3.6.2-5.fc18.x86_64                              3/5 
  Verifying  : 1:gdm-libs-3.6.2-4.fc18.x86_64                               4/5 
  Verifying  : 1:gdm-3.6.2-4.fc18.x86_64                                    5/5 

Installed:
  gdm-devel.x86_64 1:3.6.2-5.fc18                                               

Updated:
  gdm.x86_64 1:3.6.2-5.fc18            gdm-libs.x86_64 1:3.6.2-5.fc18           

Complete!
[root@server ~]#

Comment 12 Dean Hunter 2012-12-20 20:30:24 UTC
That seems to have fixed it!

What is the schedule for moving 3.6.2-5.fc18 to the Fedora 18 repositories so that I may rebuild from scratch?

Comment 13 Ray Strode [halfline] 2012-12-20 21:36:54 UTC
not sure.

Comment 14 Ray Strode [halfline] 2012-12-20 21:39:42 UTC
I'm going to dupe this bug to bug 887816 since they're close and editing existing updates can be a finicky process.

*** This bug has been marked as a duplicate of bug 887816 ***

Comment 15 Ray Strode [halfline] 2012-12-20 21:46:00 UTC
Oh, one thing that would be help getting the ball rolling for pushing this update to the repositories is if you could log into the update mentioned in comment 4, and leave a comment with positive feedback/karma.


Note You need to log in before you can comment on or make changes to this bug.