![]() ![]() ![]() ![]() Unable to init server: Could not connect: Connection refused GParted or Gedit), will fail with an error similar to this: Trying to run a graphical application as root via su, sudo or pkexec in a Wayland session (e.g. Where appname is the name of the particular app. XAUTHORITY=/home/ username/.Xauthority appname This will permanently allow root to connect to a non-root user's X server. Then switch to your root user using su or su -.Įxport XAUTHORITY=/home/ username/.Xauthority Permanently allow root access Method 1: Add the line session optional pam_xauth.so ![]() Xhost can be used to temporarily allow root access. If you are behind a firewall, you may consider them to be safe enough for your requirements. These methods will allow root to connect to a non-root user's X server, but present varying levels of security risks, especially if you run ssh. sux AUR (wrapper around su which will transfer your X credentials).These methods wrap the application in an elevation framework and drop the acquired privileges once it exits: This may be the object of a bug report to the upstream project. Applications should rather " defer the privileged operations to an auditable, self-contained, minimal piece of code that gets executed after doing a privilege escalation, and gets dropped when not needed". This should however " only be used for legacy programs", as pkexec(1) reminds. The proper, recommended way to run GUI applications under X with elevated privileges is to create a Polkit policy, as shown in this forum post. There are multiple ways of allowing root to do so however, if necessary. Xorgīy default, and for security reasons, root will be unable to connect to a non-root user's X server. The same effect can be attained via the Other locations server address bar. in nautilus or gedit, type Ctrl+l and then prepend the admin:// scheme to the resource path. Tip: This can also be done from the application location bar/file selector: e.g. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |