2

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

 #!/bin/bash  
 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!...

1 Answer 1

2

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:

    #!/bin/bash
    gksu -- bash -c 'whoami; whoami; whoami # all these return root'
    
4
  • 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, 2012 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, 2012 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, 2012 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. bugs.launchpad.net/ubuntu/+source/gedit/+bug/890041
    – Oli
    Sep 3, 2012 at 22:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .