Logging in as root

Matthew Kuiken matt.kuiken at verizon.net
Thu Jun 22 05:40:35 UTC 2006


Chanchao wrote:
> Daniel Carrera wrote:
>
>>>  gksudo nautilus
>>
>> No need. "sudo nautilus" will work perfectly. There is no such thing 
>> as "sudo for commands and gksudo for GUI programs". Sudo and gksudo 
>> are equivalent, the only difference being where you type the 
>> password. With sudo you type on your terminal and with gksudo you 
>> type on a dialog.
>
> Ah, yes, you're right of course.  I guess gksudo is useful when you 
> use the 'Run' window (Alt-F2), then you're not in a terminal so then 
> gksudo should probably be used. (unless you tick the box for 'run in 
> terminal' of course, but at this point you don't really need a terminal)
>

gksudo is also useful if you are backgrounding the task using &.

'sudo gedit /etc/X11/xorg.conf &' would result in sudo asking for a 
password in the background, but no way for you to enter said password, 
as you have already been given a new command prompt.  I believe that 
this is the situation gksudo is made for, as 'gksudo gedit 
/etc/X11/xorg.conf &' would pop up the gui password prompt at the same 
time as giving you your new command prompt.

-Matt





More information about the ubuntu-users mailing list