CentOS 8.x graphical root access while using wayland

From Notes_Wiki
Revision as of 02:05, 9 January 2021 by Saurabh (talk | contribs) (Created page with "<yambe:breadcrumb self="Graphical root access while using wayland">CentOS 8.x root access|root access</yambe:breadcrumb> =CentOS 8.x graphical root access while using wayland=...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

<yambe:breadcrumb self="Graphical root access while using wayland">CentOS 8.x root access|root access</yambe:breadcrumb>

CentOS 8.x graphical root access while using wayland

In X11 it was possible to run graphical applications as root by pointing XAUTHORITY to current users Xauthority file and setting correct DISPLAY. This does not works in wayland. To start applications as root user in wayland use:

  1. Open normal non-root user terminal and give access to display to root using:
    xhost si:localuser:root

After this you can open root terminal using sudo, sudo su -, su -, etc. and run commands that need GUI access (eg nautilus) without any problem


Accessing files via root (or admin) privileges from graphical applications

If the goal is only to access files then giving access to display to root is not required. The file absolute path can be prepend with admin:// to make it work over GVFS admin backed. For example as normal not-root user use:

nautilus admin:///root/

To see files in /root without needing full root privileges


Refer:



<yambe:breadcrumb self="Graphical root access while using wayland">CentOS 8.x root access|root access</yambe:breadcrumb>