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 -0600

hhlp gravatar image

updated 2018-05-05 14:14:14 -0600

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 -0600 )edit

5 Answers

Sort by ยป oldest newest most voted
5

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

hhlp gravatar image

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

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 -0600 )edit
1

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

florian gravatar image

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

+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 -0600 )edit
1

i was about to go crazy if not ur comment ! thank uuuu u'r a life saver

BendabizAdam gravatar imageBendabizAdam ( 2018-11-08 14:41:20 -0600 )edit
1

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

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 -0600

3togo gravatar image

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

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
-1

answered 2018-11-19 01:43:23 -0600

The easiest solution is just to un-default Wayland until they figure out that the KDE method of addressing user issues (telling the user they are wrong to want to do "x") is self-defeating.

You can do this on Fedora 29 by editing /etc/gdm/custom.conf and uncommenting the line "#WaylandEnable=false"

This still lets you select Wayland when you log in, but if you anticipate running a graphical root session (such as for controlling virtual guests or editing system files) you merely allow the default to be X11.

Wayland appears to be faster than X11 on my machine, but not being able to do graphical things as root is a deal-breaker for me.

edit flag offensive delete link more

Comments

You should not ever run a graphical root session as it opens the floodgates of security hell.

genodeftest gravatar imagegenodeftest ( 2018-11-20 13:58:27 -0600 )edit

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 -0600

Seen: 13,277 times

Last updated: Jul 18