Can I open a file manager as root without using terminal in xubuntu
Solution 1
Please note that it can be very dangerous to run your file manager as a root user.
You can use gksu
for launching GUI applications as root.
Install gksu
from a terminal:
sudo apt install gksu
After it is installed, you can now launch it without a terminal by pressing Alt+F2 and typing in:
gksu thunar
Thunar is the default file manager in Xubuntu.
NOTE: gksu
is no longer available for Ubuntu 18.04. However, pkexec
is installed by default in 18.04.
You can also use pkexec
as well to launch. Same as above and change gksu
to pkexec
.
pkexec thunar
If you don't want to open a terminal window, press Alt+F2 to bring up a run window and you can type in that command that way you are not leaving any terminal windows open:
Solution 2
Hard-to-use security won't be used. I hope the following answer convincingly demonstrates the imprudence of Debian's failure to replace gksu with a work-alike facility based on PolicyKit.
The following two easy steps will provide with one-click access to thunar (or any other app) with root privileges:
Create an app launcher in which the command line is:
sudo thunar
As root, edit /etc/sudoers.d/ so that it contains:
<username> ALL=(ALL) NOPASSWD:ALL
Afterwards, whoever uses username's X-window session will have root privileges. Since the loss of gksu, however, it's an easy way to have one-click access to a root-privileges app from a non-root GUI.
Related videos on Youtube
Admin
Updated on September 18, 2022Comments
-
Admin over 1 year
I am trying to launch file manager as root in the panel I get a error when I put
sudo
in front of the commandexo-open --launch FileManager
it returns a error. However, if I put the same command in a XFCE terminal (not the emulator) I launch file manager as root and it works. I am very confused-
Rinzwind over 7 yearsYou really should always post the error message into the question for us to be able to help
-
Jacob Vlijm over 7 yearsWhy not make a launcher (.desktop file) running gks...
-