We previously wrote about two different methods of mounting ISO images in Windows without using a CD drive (Mount ISO Images in Windows for Free and Create a Virtual CD ROM drive to Mount ISO Images).

This post shows you how to easily mount ISO images in Ubuntu directly in Nautilus, the file browser, using scripts.

Installing the Nautilus Scripts

First, download two script files for mounting and unmounting ISO images. After download the files, change the file extensions from .TXT to .SH.

Next, make sure each file has execute permission:

NOTE: The “~” symbol represents the path to your home directory, /home/username, however, the slash after the username is not included.

$ sudo chmod +x /home/lori/Downloads/mount.sh

$ sudo chmod +x ~/Downloads/unmount.sh

Change the path to the path you used when downloading and saving the files.

Copy the two scripts to the nautilus-scripts directory.

$ sudo mv ~/Downloads/mount.sh /home/lori/.gnome2/nautilus-scripts/

$ sudo mv ~/Downloads/unmount.sh /home/lori/.gnome2/nautilus-scripts/

Now you are ready to use the scripts to mount and unmount an ISO file.

Mounting an ISO File in Ubuntu

As an example, we will use an Ubuntu ISO file. Open Nautilus and navigate to the ISO image you want to mount. Right-click on the ISO file and select Scripts | mount.sh from the pop-up menu. Enter your password when asked.

Selecting mount script

The ISO Mounter notification displays. Click OK.

ISO Mounter dialog box

A dialog box displays informing you that the ISO file was successfully mounted and asking if you want to open the volume. Click OK.

ISO file successfully mounted

A new Nautilus window displays showing the files you would see if the ISO file had been burned to a CD.

Files in the Ubuntu ISO file

Unmounting an ISO File

To unmount the ISO file, you must go back to the directory containing the original ISO file. Right-click on the ISO file and select Scripts | unmount.sh from the pop-up menu. Enter your password when asked.

Unmounting the ISO File the correct way

A dialog box displays telling you that the ISO file was successfully unmounted. Click OK.

Successfully unmounted ISO

If you right-click on the mounted ISO file in Nautilus, as shown in the following image, you will notice an Unmount option. This is NOT the option you should use. Use the one described above.

Trying to unmount an ISO file directly

If you use this option, the following message displays and the ISO file is not unmounted.

Unable to unmount message

As you can see, you need to be root, and the unmount.sh script takes care of that for you. It is not a good idea to run Nautilus as root, so using these two scripts is a better way to graphically mount and unmount an ISO file. [via Debian Admin]

by Lori Kaufman