Mount ISO Files With Nautilus

Here’s two short bash scripts that allow you to mount and unmount an ISO image easily within the right-click menu in Nautilus (the file manager in Gnome):

$ sudo mkdir /media/ISO
$ cd ~/.gnome2/nautilus-scripts/
$ gedit “Mount ISO Image”

Now paste this code into the file:

1
2
3
4
5
6
7
8
9
#!/bin/bash
#
for I in `echo $*`
do
foo=`gksudo -u root -k -m "enter your password for root terminal access" /bin/echo "got r00t?"`
sudo mount -o loop -t iso9660 $I /media/ISO
done
done
exit0

Save, and exit gedit.

$ gedit “Unmount ISO Image”

Then paste this code in this file:

1
2
3
4
5
6
7
8
9
#!/bin/bash
#
for I in `echo $*`
do
foo=`gksudo -u root -k -m "enter your password for root terminal access" /bin/echo "got r00t?"`
sudo umount $I
done
done
exit0

Save, and exit gedit. Now finally…

$ chmod a+x *

Now you can mount and unmount ISO files by using the ‘Scripts’ options in the right-click menu. :)

Thanks to the [Ubuntu Blog](http://ubuntu.wordpress.com/2005/10/24/nautilus-script-to-mount-iso-files/) for the information.

Spread the Word
  • Twitter
  • del.icio.us
  • Digg
  • Facebook
  • Google Bookmarks
  • Reddit
  • NewsVine
  • Slashdot
  • connotea
  • HackerNews
  • Print
  • email

1 Response to “Mount ISO Files With Nautilus”


Leave a Reply