Mount ISO images easily under Nautilus
Open the terminal window(Applications -> Accessories -> Terminal ) and issue the following commands in the terminal window :
wget http://www.debianadmin.com/images/iso/mount.sh
and
wget http://www.debianadmin.com/images/iso/unmount.shNow we need to change the file permissions , to make the above script executable. Which we could do by issuing the following command in the terminal window :
sudo chmod +x mount.sh
sudo chmod +x unmount.shFinally we move the above scripts to nautilus directory by issuing the following command in the terminal window ;
sudo mv mount.sh ~/.gnome2/nautilus-scripts/
sudo mv unmount.sh ~/.gnome2/nautilus-scripts/Now open nautilus and inside nautilus open directory containing ISO image you want to mount. Right Click on the ISO image and you will find menu similar to one shown below :
Click on the mount.sh file , if ISO file mounts properly you will find two dialog boxes similar to one shown below :
Also on the desktop you should find the icon of the mounted DVD/CD ISO file .
Now if you want to unmount the ISO volume , right click on the icon of the mounted ISO and click on the unmount.sh as shown in figure below :
Tutorial Written by : Ambuj Varshney (blogambuj@gmail.com)
For Desktop on Linux Blog , http://linuxondesktop.blogspot.com
(C) 2008 , Ambuj Varshney
Brilliant tip, thanks
ReplyDeletehttp://tnetech.net
I loved your post on APTonCD, but I have used up several discs keeping my standalone PC updated. Now I can bypass the CD, and even use DVD images without a DVD reader!
ReplyDeleteYour Blog has been the best source of the tips I actually can use!
Great Tip
ReplyDeleteIve been recently looking into an A120/Dtools type program or a simple way to RIGHT Click on an ISO/CUE
and choose Mount/UNmount
Is there a method to extend your tutorial so the user does NOT have to go into the Scripts section instead in the same area that it gives the user the choice down the bottom to Burn or extra it , put Mount or Unmount ISO along in that area ?
i'm not getting that option in nautilus. i did as described above but i'm not getting anything.
ReplyDeleteany ideas?
NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER NEVER
ReplyDeleteNEVER NEVER NEVER EVER run ANY shell script without first reading it all the way through.
I mean no offense to Ambuj, but on the internet anything can change. Whose to know that this site hasn't been compromised.
Regardless of how much you trust someone, NEVER run ANY script that you've acquired from the internet without first reading
every single line.
Of all the security holes, backdoors and so on that compromises our systems, the one thing that compromises the security of
a computer more than anything else, is the user.
I realize that some scripts can get a bit lengthy and are too large to post the entire text on the site, but when you can't do
a copy/paste script written on the site PLEASE advise that everyone read the script before you do anything else.
Great tutorial, thanks. Just FYI, you shouldn't need to use sudo for these commands :)
ReplyDeleteUpdate scripts to allow iso files names with white spaces:
ReplyDelete#!/bin/bash
# mount
gksudo -k /bin/echo "got r00t?"
BASENAME=`basename "$(echo $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS)" .iso`
sudo mkdir "/media/$BASENAME"
zenity --info --title "ISO Mounter" --text "$BASENAME in $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS"
if sudo mount -o loop -t iso9660 "$(echo $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS)" "/media/$BASENAME"
then
if zenity --question --title "ISO Mounter" --text "$BASENAME Successfully Mounted. Open Volume?"
then
nautilus /media/"$BASENAME" --no-desktop
fi
exit 0
else
sudo rmdir "/media/$BASENAME"
zenity --error --title "ISO Mounter" --text "Cannot mount $BASENAME!"
exit 1
fi
-------------------------------------------------------------------------------
#!/bin/bash
# unmount
gksudo -k /bin/echo "got r00t?"
BASENAME=`basename "$(echo $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS)" .iso`
sudo umount "/media/$BASENAME"
sudo rmdir "/media/$BASENAME"
zenity --info --text "Successfully unmounted /media/$BASENAME"
exit 0