Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#50314 - [gnome-shell] Running apps as root with sudo/gksudo doesn't work when using Wayland

Attached to Project: Arch Linux
Opened by beta990 (beta990) - Monday, 08 August 2016, 18:20 GMT
Last edited by Jan de Groot (JGC) - Thursday, 04 May 2017, 21:48 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Jan Steffens (heftig)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No


When using Wayland as session for Gnome-Shell running applications as root, results in: No protocol specified

Additional info:
* gnome-shell 3.20.3-1
* wayland 1.11.0-1
* wayland-protocols 1.5-1
* xorg-server-xwayland 1.18.4-1
* GDM3 with Wayland as session

Steps to reproduce:
* sudo atom /tmp/
* gksudo/gksu atom /tmp/ (hangs, unable to enter password)
This task depends upon

Closed by  Jan de Groot (JGC)
Thursday, 04 May 2017, 21:48 GMT
Reason for closing:  Won't fix
Additional comments about closing:  This is by design, Wayland will not fix this upstream and neither will we.
Comment by Doug Newgard (Scimmia) - Tuesday, 09 August 2016, 04:14 GMT
1. This is normal when trying to run gui apps with sudo.
2. Is there anything in the logs when gksu/gksudo hang?
Comment by Jan de Groot (JGC) - Tuesday, 09 August 2016, 09:07 GMT Comment by beta990 (beta990) - Friday, 12 August 2016, 19:54 GMT
1. Atom isn't a good example, take an app like bleachbit that allows more cleaning when running as root.
But it should be no problem launching atom as root, since this works perfectly on a non Wayland-session.
2. Only the 'No protocol specified' message when executing this command in a terminal.
I'm happy to provide any debug info, unfortunately I'm not aware of available tools when using Wayland.

@JGC: Maybe this issue?
I can remember this error showing up somewhere.

If this isn't an Arch-bug, maybe it's better to report upstream? :)
Comment by beta990 (beta990) - Saturday, 13 August 2016, 09:38 GMT
Executing the following command, fixes the problem:
$ xhost +local:

But this command is a bit risky, could this be a Wayland-bug?
Comment by Rob (aegis) - Monday, 17 October 2016, 01:20 GMT
gksu [command] displays a box that asks for a password, but you can't type any password in. Anything you type goes to the terminal but you can't see it until you press cancel or okay.
Comment by Darrell (denns) - Wednesday, 23 November 2016, 04:54 GMT
I think there are two different issues here:
1. focusing of gksudo prompt: you can work around this by using pkexec or regular sudo
2. gui processes running under any form of sudo (sudo, gksudo, pkexec, etc) are unable to access the display

See here for more details about #2:

It seems that this is an upstream issue. However I think it's worth tracking here in case there is a distribution level workaround. It's unlikely to be a quick upstream fix, given that it's been an open issue on redhat for over a year. seems to be down for me right now, so I'm not able to see if it's been submitted there or not.