English
Ask Your Question
3

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

asked 2017-03-12 13:54:06 +0000

hhlp gravatar image

updated 2017-03-13 02:07:00 +0000

florian gravatar image

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 ( 2017-03-13 02:04:24 +0000 )edit

4 answers

Sort by ยป oldest newest most voted
4

answered 2017-03-12 13:54:33 +0000

hhlp 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 obsolet and decrapeted for this behavior, see this bug : 1398940

Regards.,

edit flag offensive delete link more

Comments

2

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 ( 2017-03-13 02:05:27 +0000 )edit
1

answered 2017-11-14 17:01:52 +0000

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-03-13 02:12:14 +0000

florian gravatar image

updated 2017-03-13 03:17:15 +0000

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

answered 2017-09-18 15:44:14 +0000

3togo gravatar image

updated 2017-10-07 10:49:05 +0000

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

[hide preview]

Use your votes!

  • Use the 30 daily voting points that you get!
  • Up-vote well framed questions that provide enough information to enable people provide answers.
  • Thank your helpers by up-voting their comments and answers. If a question you asked has been answered, accept the best answer by clicking on the checkbox on the left side of the answer.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.

Question Tools

Follow
2 followers

Stats

Asked: 2017-03-12 13:54:06 +0000

Seen: 2,642 times

Last updated: Nov 14