Say I have a folder open in Nautilus that's in my /home/user/temp
directory. I'd like to move a folder from there to my /opt
directory (it's a program). Is there a way I can elevate the copy command up to a sudo
so that I can copy the folder without having to start a new instance of Nautilus from the command line?
Ubuntu – How to elevate nautilus privileges to move or copy a folder as root
nautilus
Related Question
- Ubuntu – How to be granted root rights while browsing files/directories with Nautilus
- Ubuntu – How to move between Nautilus panes
- Ubuntu – How to open Nautilus at current command line directory
- Ubuntu – How to copy a path out of a open/save dialog and paste it into Nautilus
- Ubuntu – How to change the default folder location that nautilus opens
Best Answer
As far as I can say, based on what I know and have experienced:
sudo
is used for command line applications/commands andgksudo
is useful when you try to run a program using the Run Application dialog window by pressing Alt+F2.I have read that
gksudo
is just the graphic version ofsudo
.Anyway, you can both drop
sudo nautilus
and/orgksu nautilus
in a terminal for the purpose to do what you wish, having the same effect both commands. But if you want to omit the terminal and you wish to run it directly with the "Run Application" dialog window, just press Alt+F2 and writegksu nautilus
, after which you will be prompted to enter your password, then the nautilus file browser will open with root privileges.Additionally, you can achieve to open files/folders as root with a single click by using the "Open as Administrator" option via right click. Which in any case will open a new nautilus instance for the given folder and will open files as root, this may also open/run applications as root but I haven't tested it yet.
You can get the "Open as Administration" option in your contextual menu by installing nautilus-gksu via command line:
sudo apt-get install nautilus-gksu
or by using synaptic as shown in the next image:Good luck!