Nemo Open as Root not Working in Arch, Gnome

How to solve a problem with Nemo in Arch, Gnome, that prevents the Open as Root feature from working properly.

2946 views
d

By. Jacob

Edited: 2017-04-29 22:37

Linux article image.

I prefer using Nemo as my file-manager in Linux, because it has Compact View, which was removed in Nautilus, (huge mistake in my opinion). After installing Nemo, I noticed it had extra features not found in Nautilus, such as the Oben as Root option in the right-click menu. This is very useful in Linux in siturations were you need access to configuration files, but you are often limited due to permissions.

For the above reason, the extra features available in Nemo are really important for many desktop users. It is hard to understand why Nautilus is the default file-manager in Ubuntu, considering how bad it is, and that they have removed useful features, such as compact view. The lack of Open as Root in Nautilus also makes it less siutable to to carry out system tasks.

Nemo in ArchLinux

I recently installed ArchLinux, just to try something new, and maybe learn more about Linux. One of the problems I ran into, was that the Open as Root option was not working. At first, when clicking, a password prompt would show, but nothing would happen afterwards. I tried multiple times after that, and nothing happened, not even a prompt for my root password.

It turns out this problem is caused by Gnome using the Wayland window system instead of X.org. It is a compatibility problem with Nemo and Wayland. X programs are handled via Xwayland, and most apps will likely work fine. However, apps running as root are currently not allowed access to the X server run by the user, meaning that they can not display their GUIs on the users screen. There are two solutions to this problem that I am aware of:

  1. Do not use Wayland (login via a X11 session instead)
  2. Turn off access control with XHOST +local: from terminal, (You can turn it back on afterwards with XHOST -local:)

Beware that using XHOST + is unsafe, as it could potentially allow any computer connect to your window system, open windows, and even catch your keystrokes! The scenario is unlikely for home users behind routers and firewalls, but you should still be very careful, especially if you have sensitive data at your home desktops.

A better alternative, if your system has multiple users, may be to only allow the root user to connect to your X server. You can do this by typing the following (without sudo):

XHOST +si:localuser:root

If you later wish to revoke access from the root user, simply type the same commend, only with -si instead.

Tell us what you think:

  1. Understanding file permissions in Unix / Linux based systems, and how to make files immutable.
  2. How to search a directory and subdirectories for a given string of text in Linux with the grep command.
  3. Worth knowing in order to make a bootable USB memory stick with Windows on from Linux.
  4. This is why I decided to encrypt my new Flash Drive, and why I think you should too.
  5. About the problem with using sudo with graphical programs in Linux.

More in: Linux Tutorials