Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Before upgrading to 12.04 (from 10.04) I used this little launcher script:

 gksudo nautilus /var/www/DFDII & sleep 5; gksudo gedit /var/www/DFDII/iindex.php

This script opened both nautilus and gedit with just one PW entry, now it asks for PW twice ?

Also, annoyingly, now gedit also open "untitled document 1" (close > save changes ? NOOOOO!...

share|improve this question
up vote 3 down vote accepted

Two main options:

  1. Demand that the whole script be run as root. Lots of scripts just exit out and suggest the user prepend the command with gksu.

  2. Run things like this:

    gksu -- bash -c 'whoami; whoami; whoami # all these return root'
share|improve this answer
Thank you Oli - this works: gksu -- bash -c 'nautilus & sleep 5; gedit' But only if I add the "sleep 5" - without it, gedit doesn't start until I close nautilus - why ? – Thomas Sep 3 '12 at 21:14
@Thomas because nautilus is running in the foreground. It's not running as that user so takes over the terminal. The & puts it in the background. nautilus & gedit should work. – Oli Sep 3 '12 at 21:35
Right you are :) Thanks again. Any idea why gedit (also) opens "untitled document 1" (or why it thinks it's been altered when I try to close it) ? – Thomas Sep 3 '12 at 21:58
Sorry - it's a known bug but that's all I can say to help. I tried playing around with its options but nothing seems to work around the tab issue. – Oli Sep 3 '12 at 22:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.