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 for the information.

0 Responses to “Mount ISO Files With Nautilus”


  1. No Comments

Leave a Reply

Quote selected text