xwayland doesn't let root access the display, even via sudo or pkexec
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
xorg-server (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
When running a GUI application as root (apport-bug, gparted, etc.), the command invariably fails, no matter how it's run:
$ sudo xclock
No protocol specified
Error: Can't open display: :0
$ pkexec xclock
Error: Can't open display:
Workaround: root can be granted access via xhost as follows, but this is insecure on multi-user systems.
$ xhost +si:localuser:root
localuser:root being added to access control list
ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: xwayland 2:1.19.4-1ubuntu2
ProcVersionSign
Uname: Linux 4.13.0-15-generic x86_64
ApportVersion: 2.20.7-0ubuntu3
Architecture: amd64
CompizPlugins: [core,composite
CompositorRunning: None
CurrentDesktop: GNOME
Date: Fri Oct 13 10:14:47 2017
DistUpgraded: 2017-10-13 08:53:41,683 DEBUG Running PostInstallScript: './xorg_
DistroCodename: artful
DistroVariant: ubuntu
ExtraDebuggingI
GraphicsCard:
Intel Corporation HD Graphics 5500 [8086:1616] (rev 09) (prog-if 00 [VGA controller])
Subsystem: ASUSTeK Computer Inc. HD Graphics 5500 [1043:183d]
InstallationDate: Installed on 2016-12-02 (313 days ago)
InstallationMedia: Ubuntu-GNOME 16.10 "Yakkety Yak" - Release amd64 (20161012.1)
MachineType: ASUSTeK COMPUTER INC. UX303LAB
ProcKernelCmdLine: BOOT_IMAGE=
SourcePackage: xorg-server
UpgradeStatus: Upgraded to artful on 2017-10-12 (0 days ago)
dmi.bios.date: 08/25/2015
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: UX303LAB.210
dmi.board.
dmi.board.name: UX303LAB
dmi.board.vendor: ASUSTeK COMPUTER INC.
dmi.board.version: 1.0
dmi.chassis.
dmi.chassis.type: 10
dmi.chassis.vendor: ASUSTeK COMPUTER INC.
dmi.chassis.
dmi.modalias: dmi:bvnAmerican
dmi.product.family: UX
dmi.product.name: UX303LAB
dmi.product.
dmi.sys.vendor: ASUSTeK COMPUTER INC.
version.compiz: compiz N/A
version.libdrm2: libdrm2 2.4.83-1
version.
version.
version.
version.
version.
version.
version.
tags: |
added: wayland removed: wayland-session |
tags: | removed: artful |
Marking as duplicate (thanks to @brian-murray for identifying the original).