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.
Code:
#!/bin/bash
#
# nautilus-mount-iso
# gksudo -u root -k /bin/echo "got r00t?"
mkdir ~/media/"$*"
if sudo mount -o loop -t iso9660 "$*" ~/media/"$*"
then
if zenity --question --title "ISO Mounter" --text "$* Successfully Mounted.
Open Volume?"
then
nautilus ~/media/"$*" --no-desktop
fi
exit 0
else
rmdir ~/media/"$*"
zenity --error --title "ISO Mounter" --text "Cannot mount $*!"
exit 1
fi
Bookmarks