Re: how to execute commands in script after program is closed
sudo is meant for terminal only. Try gksudo instead.
The simplest would be to invoke your script with gksudo script instead of calling gksudo four times in it.
To execute banshee as yourself (not root) edit the line to look like this:
Code:
su <yourname> -c banshee
So to wrap up:
Code:
# must be run as superuser
mkdir /media/A220742420740199
mount /dev/sda2 /media/A220742420740199
su <yourname> -c banshee
umount /dev/sda2
rmdir /media/A220742420740199
Cheers!
Last edited by LewisTM; August 19th, 2012 at 01:02 AM.
husband@wife$ make sandwich
Permission denied
husband@wife$ sudo make sandwich
Bookmarks