Just getting started questions

Nils Kassube kassube at gmx.net
Tue Jul 15 15:55:55 UTC 2014


johnny wrote:
> On 07/15/2014 01:16 AM, Nils Kassube wrote:
> > Jkhatri wrote:
> >> for point 4 , try sudo nautilus
> > 
> > Please don't! Use "gksudo nautilus" instead. See
> > <https://help.ubuntu.com/community/RootSudo#Graphical_sudo>.
> 
> Have I got this right? gksudo nautilus gives you root privileges but
> doesn't change owner ship. But sudo nautilus can change owner ship.
> Are am all messed up.

If you use "sudo nautilus" (or any other graphical application) it may 
change ownership of some config files. The reason is that sudo keeps the 
$HOME entry of the user. I'm not sure if it is actually a problem with 
nautilus but to be on the safe side you should NEVER use sudo with any 
graphical application. Using gksudo instead avoids that problem because 
it correctly sets $HOME to /root and any changes to config files would 
then be config files in /root which are owned by root anyway.

If you have used sudo with a graphical application in the past, it may 
be necessary to change back the ownership of your files. It can be 
easily done with the command

sudo chown -R $USER: $HOME

in a terminal. Or if you can't login because your $HOME/.Xauthority is 
now owned by root, you can switch to a virtual terminal with the 
keyboard shortcut "Ctrl-Alt-F2". There you can login and use the command 
above. You can then return to the GUI with "Ctrl-Alt-F7".


Nils




More information about the ubuntu-users mailing list