Logging in as root

Peter Garrett peter.garrett at optusnet.com.au
Thu Jun 22 06:26:56 UTC 2006


On Wed, 21 Jun 2006 22:40:35 -0700
Matthew Kuiken <matt.kuiken at verizon.net> wrote:

[snip]

> 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

 $ sudo gedit foo
Password:
(now hit "ctrl+z")
[1]+  Stopped                 sudo gedit foo
$ bg
[1]+ sudo gedit foo &
$ 


the process is now in the background and you have your prompt back :)

Peter





More information about the ubuntu-users mailing list