Ask Your Question
5

Graphical applications can't be run as root in wayland (e.g. gedit, beesu, gparted, nautilus)

asked 2017-03-12 08:54:06 -0500

hhlp gravatar image

updated 2018-05-05 14:14:14 -0500

I think the question have all information needed.

Regards.,

edit retag flag offensive close merge delete

Comments

1

This is a good initiative to avoid all those duplicates happening in the recent past. +1

florian gravatar imageflorian ( 2017-03-12 21:04:24 -0500 )edit

4 Answers

Sort by ยป oldest newest most voted
5

answered 2017-03-12 08:54:33 -0500

hhlp gravatar image

updated 2018-07-18 04:53:25 -0500

genodeftest gravatar image

this is a wayland problem... This is an intentional design decision of wayland, see Bug 1274451

Graphical applications can't be run as root from terminal

It is not possible to start graphical apps under the root account from terminal when using su or sudo. Apps which use polkit to request administrator permissions for just certain operations and only when needed are not affected (they are not started as root right away). The discussion is ongoing about the best approach to take, see bug 1274451 and "On running gui applications as root" thread in fedora-devel mailing list.

taken from this :

However beesu is available in fedora 25 repo but is obsolete and deprecated for this behavior, see this bug : 1398940

Regards.,

edit flag offensive delete link more

Comments

3

Not exactly right - this is not a wayland problem. This is a problem of the applications that want to run GUIs as root! They should make use of polkit!

florian gravatar imageflorian ( 2017-03-12 21:05:27 -0500 )edit
1

answered 2017-03-12 21:12:14 -0500

florian gravatar image

updated 2017-03-12 22:17:15 -0500

+2 for @hhlp's question and answer.

I'd like to add two workarounds until the Gnome applications are fixed/adapted to Wayland requirements:

  1. xhost si:localuser:root will allow to run those apps as root (use xhost -si:localuser:root to remove permission afterwards)

  2. Start a Gnome with an Xorg session: After clicking your username in GDM (the greeter/login manager), click the little gear and select Xorg, then enter your password

edit flag offensive delete link more

Comments

1

Goodness, I want to swear as to how long it took me to find your answer! I don't have enough points to upvote your answer but starting with Xorg session worked!!!! Thank you

warhansen gravatar imagewarhansen ( 2018-09-19 08:49:51 -0500 )edit
1

answered 2017-11-14 11:01:52 -0500

genodeftest gravatar image

This is an intentional design decision of wayland, see Bug 1274451 . GUI applications should never run as root due to security and safety issues. For more details have a look at the wiki entry: https://fedoraproject.org/wiki/HowtodebugWaylandproblems#Graphicalapplicationscan.27tberunasrootfromterminal

On recent versions of GNOME (3.24 and later), many applications understand the admin:/// protocol. In nautilus or in gedit's file browser, you can use Ctrl+L to open the path bar and change the location from /etc/hosts to admin:///etc/hosts. You will be prompted confirming with your admin password.

Other applications use PolicyKit, e.g. gnome-disks.

If your application does not support the admin:/// protocol or PolicyKit, please file a bug and help fix the application. Here are some dirty workarounds you should not use permanently, listed by @florian and @3togo before: * xhost si:localuser:root will allow to run those apps as root (use xhost -si:localuser:root to remove permission afterwards) * Start a Gnome with an Xorg session: After clicking your username in GDM (the greeter/login manager), click the little gear and select Xorg, then enter your password

edit flag offensive delete link more
1

answered 2017-09-18 10:44:14 -0500

3togo gravatar image

updated 2017-10-07 05:49:05 -0500

better check whether wayland is running before allowing apps to run as root

if [ $XDG_SESSION_TYPE = "wayland" ]; then
    xhost +si:localuser:root
fi
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2017-03-12 08:54:06 -0500

Seen: 10,731 times

Last updated: Jul 18