gksudo 16.10
Ralf Mardorf
silver.bullet at zoho.com
Fri Nov 4 11:46:21 UTC 2016
Hi Nils,
that doesn't explain if the OP knows the difference.
Working with root privileges doesn't require the usage of a command, it
requires understanding what we do.
If you use sudo or gksudo to run as another user, but root, you
anyway need to use xhost and you always could override HOME. However,
configs in home and e.g. dconf in /run not necessarily get owned by
root, when using sudo, even without setting the HOME variable, if you
e.g. use sudo -i.
ubuntu-mate at ubuntu-mate:~$ sudo echo $HOME
/home/ubuntu-mate
ubuntu-mate at ubuntu-mate:~$ sudo -i
root at ubuntu-mate:~# echo $HOME
/root
ubuntu-mate at ubuntu-mate:~$ sudo HOME=/home/root pluma
ubuntu-mate at ubuntu-mate:~$ ls -hAld .config/pluma/ .config/pluma/*
drwxr-xr-x 2 ubuntu-mate ubuntu-mate 80 Nov 4 12:33 .config/pluma/
-rw-r--r-- 1 ubuntu-mate ubuntu-mate 12K Nov 4 12:33 .config/pluma/accels
-rw-r--r-- 1 ubuntu-mate ubuntu-mate 73 Nov 4 12:33 .config/pluma/pluma.ini
ubuntu-mate at ubuntu-mate:~$ echo $HOME
/home/ubuntu-mate
Since the OP seems not to be able to install gksudo, it's anyway
questionable if gksudo is the right nanny. Understanding the reasons
that gksudo might make a difference are important, not just using
another command. At least root privileges require self-responsibility,
IOW learning, even when using Ubuntu and even if you shouldn't expect
self-responsibility of users with non-root privileges.
IMO gksudo is useful if you want to use it with a launcher, but not
necessarily when running apps from a terminal.
Regards,
Ralf
More information about the ubuntu-users
mailing list