How to use sudo in a bash script?

Dennis Kaarsemaker dennis at
Thu Oct 6 14:22:52 UTC 2005

On do, 2005-10-06 at 10:15 -0400, Chris Dunn wrote:
> For instance I want to include :
> sudo synaptic 
> in a script to put on a button in the task bar.
> I had thought that this would run and bring up a box to allow me to
> enter a password to run the sudo command, but it simply fails to run.
> What am I missing?


If you want it to run graphically, you need gksudo instead of sudo.
Dennis K.
  - Linux for human beings:
  - Linux voor normale mensen:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <>

More information about the ubuntu-users mailing list