Graphical applications can't be run as root in wayland?

I want to enable delta RPMs and fastest mirror on fedora. I cannot edit dnf.conf since it is a read only file.
I tried to edit it through gedit by using terminal but I get following response
Screenshot%20from%202019-06-28%2012-46-22
please explain what the problem in terminal is and solution to enable delta RPMs and fastest mirror.
Thank you

1 Like

You can use nano instead of gedit, just type nano dnf.conf instead.
I don’t know why, but I can’t open graphical apps with root privileges too.

2 Likes

This is a problem of the applications that want to run GUIs as root! They should make use of polkit!.. 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.

You should execute this command :arrow_forward: xhost si:localuser:root will allow to run those apps as root (use xhost -si:localuser:root to remove permission afterwards)

As @amitgold suggest, you can use terminal application for this purpose too:

  • nano
  • vim

Please note that you may require sudo access to view these files.

Regards.,

6 Likes

You should not use a root login to run gedit. Graphical applications should not be run as root and gedit does not need to be run as root to access system files.

You should call it as gedit admin:///etc/dnf/dnf.conf as your user and it will prompt for your password to gain access to edit the file.

3 Likes

Also, take a look here: https://askbot.fedoraproject.org/en/question/102936/graphical-applications-cant-be-run-as-root-in-wayland-eg-gedit-beesu-gparted-nautilus/

1 Like