If you want to open some restricted graphical application with your username, you can get the following error:
vbox@core:~$ su - root -c gparted Password: (gpartedbin:27091): Gtk-WARNING **: cannot open display:
Well, there is a better and efficient way, via gksudo
or gksu
. They are doing practically the same thing, only the authentication is different. For gksudo
you need to be in sudoers list and you input your user's password and for gksu
you need the root password. Below you have an example with gksu
:
vbox@core:~$ gksu gparted ====================== libparted : 1.8.8 ======================
At this point, you will be prompted to input the root password:
That's pretty much it!