[artful] `sudo virt-manager` results in Gtk-WARNING **: cannot open display: :0

Bug #1724748 reported by Ryan Beisner
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
x11-xserver-utils (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

All gui apps fail to launch when using sudo, out-of-box, desktop 17.10 install. For example, gparted and virt-manager, which both require sudo, are not usable without a work-around.

#### Out-of-box experience
rbeisner@vistula:~⟫ sudo gedit
No protocol specified
Unable to init server: Could not connect: Connection refused

(gedit:32146): Gtk-WARNING **: cannot open display: :0

rbeisner@vistula:~⟫ xhost
access control enabled, only authorized clients can connect
SI:localuser:rbeisner

#### Work-around:

rbeisner@vistula:~⟫ xhost si:localuser:root
localuser:root being added to access control list

rbeisner@vistula:~⟫ xhost
access control enabled, only authorized clients can connect
SI:localuser:root
SI:localuser:rbeisner

rbeisner@vistula:~⟫ sudo gedit
rbeisner@vistula:~⟫ # (it launches ok)

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: x11-xserver-utils 7.7+7build1
ProcVersionSignature: Ubuntu 4.13.0-16.19-generic 4.13.4
Uname: Linux 4.13.0-16-generic x86_64
ApportVersion: 2.20.7-0ubuntu3
Architecture: amd64
CompizPlugins: No value set for `/apps/compiz-1/general/screen0/options/active_plugins'
CompositorRunning: None
CurrentDesktop: ubuntu:GNOME
Date: Thu Oct 19 00:49:13 2017
DistUpgraded: Fresh install
DistroCodename: artful
DistroVariant: ubuntu
GraphicsCard:
 Advanced Micro Devices, Inc. [AMD/ATI] Turks XT [Radeon HD 6670/7670] [1002:6758] (prog-if 00 [VGA controller])
   Subsystem: Hightech Information System Ltd. Turks XT [Radeon HD 6670/7670] [1787:2012]
InstallationDate: Installed on 2017-10-17 (1 days ago)
InstallationMedia: Ubuntu 17.10 "Artful Aardvark" - Beta amd64 (20171015)
MachineType: Gigabyte Technology Co., Ltd. To be filled by O.E.M.
ProcEnviron:
 TERM=screen-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.13.0-16-generic.efi.signed root=UUID=8c3a672d-6b6a-4ee4-b211-b148cc82e493 ro quiet splash vt.handoff=7
SourcePackage: x11-xserver-utils
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 08/06/2013
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: F5
dmi.board.asset.tag: To be filled by O.E.M.
dmi.board.name: 970A-D3P
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.board.version: x.x
dmi.chassis.asset.tag: To Be Filled By O.E.M.
dmi.chassis.type: 3
dmi.chassis.vendor: Gigabyte Technology Co., Ltd.
dmi.chassis.version: To Be Filled By O.E.M.
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrF5:bd08/06/2013:svnGigabyteTechnologyCo.,Ltd.:pnTobefilledbyO.E.M.:pvrTobefilledbyO.E.M.:rvnGigabyteTechnologyCo.,Ltd.:rn970A-D3P:rvrx.x:cvnGigabyteTechnologyCo.,Ltd.:ct3:cvrToBeFilledByO.E.M.:
dmi.product.family: To be filled by O.E.M.
dmi.product.name: To be filled by O.E.M.
dmi.product.version: To be filled by O.E.M.
dmi.sys.vendor: Gigabyte Technology Co., Ltd.
version.compiz: compiz N/A
version.libdrm2: libdrm2 2.4.83-1
version.libgl1-mesa-dri: libgl1-mesa-dri 17.2.2-0ubuntu1
version.libgl1-mesa-glx: libgl1-mesa-glx 17.2.2-0ubuntu1
version.xserver-xorg-core: xserver-xorg-core 2:1.19.5-0ubuntu1
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev N/A
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:7.10.0-1
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.99.917+git20170309-0ubuntu1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.15-2

Revision history for this message
Ryan Beisner (1chb1n) wrote :
Revision history for this message
dino99 (9d9) wrote :

Already reported as lp:1713313

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in x11-xserver-utils (Ubuntu):
status: New → Confirmed
Ryan Beisner (1chb1n)
summary: - [artful] `sudo gedit` results in Gtk-WARNING **: cannot open display: :0
+ [artful] `sudo virt-manager` results in Gtk-WARNING **: cannot open
+ display: :0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.