I followed the instruction to place the script in ~/.gnome2/nautilus-scripts, but it does not work. Every time I got the zenity to show "Cannot Mount xxxxx.iso"
I separately execute the commands in the script, and I found that gksudo is not recognized.
sudo mount works, and I could mount the iso file. However, when put together as a script, it does not work. Does anyone know what is going on?
I have Gnome Desktop under Fedora Core 10. But I don't think there is much difference between Fedora and Ubuntu in terms of the automount script.
The code I used.
# gksudo -u root -k /bin/echo "got r00t?"
if sudo mount -o loop -t iso9660 "$*" ~/media/"$*"
if zenity --question --title "ISO Mounter" --text "$* Successfully Mounted.
nautilus ~/media/"$*" --no-desktop
zenity --error --title "ISO Mounter" --text "Cannot mount $*!"