Results 1 to 10 of 67

Thread: [SCRIPT] Easily (un)mounting ISO images without sudo

Threaded View

  1. #1
    Join Date
    Jul 2007
    Ubuntu 10.04 Lucid Lynx

    [SCRIPT] Easily (un)mounting ISO images without sudo

    While there are many tutorials regarding ISO mounting, I insist posting this howto script, because I believe this script provides more convenient way to mounting/unmounting ISO files.


    This script will automatically creates shortcut (of the mounted ISO) to your desktop, so you can easily open and unmount the images later, by right clicking the shortcut itself. Yes, you CAN unmount the (mounted) ISO by right-clicking the desktop shortcut -- without having to browse to the origin folder and unmount from there (but you can do that way too, if you insist ).
    This script will automatically remove the desktop shortcut when you've unmounted the images.
    So you know which ISO's are mounted by looking your desktop.

    This script use the fuseiso as a backend.

    Test Machine / Compatible System

    I tested this on Ubuntu Gutsy (7.10) and Ubuntu Hardy (8.04), with latest update applied.

    Also works on:
    • Debian Leny
      (Credits to era506 for confirming this)
    • Kubuntu
      (Credits to #!/bin/bash for porting this)
    • Slackware 12.0
      (Credits to #!/bin/bash for confirming this)
    • Vector Linux 5.9
      (Credits to #!/bin/bash for confirming this)
    • SUSE Linux Enterprise Desktop 11
      (Credits to arizonagroovejet for confirming this)
    • Probably working on Gnome and KDE on all latest distro, please confirm if you have tried in your distro.


    1. You must have these programs installed:
      • fuseiso
      • nautilus-actions
      • zenity

      To install the requirement, open terminal:
      Applications -> Accessories -> Terminal
      then type:
      sudo apt-get install fuseiso nautilus-actions zenity
      and press "Enter". Note: this will also install additional requirement that needed by the above programs.
    2. You have to be a member of "fuse" group.
      Open Terminal and type:
      sudo gpasswd -a yourusername fuse
      Of course, change "yourusername" to your username.
    3. Logout and Login to apply the changes.
      To gain (apply) the "fuse" privilege, you must to logout and re-login.


    Update: This section is for Gnome only (nautilus),
    - for Gutsy's KDE, please follow #!/bin/bash 's instruction on #14.
    - for Hardy's KDE, please follow Gutsy's KDE instruction and then made little modification on #36.
    (KDE user only need to download the attachment from this post).

    1. Create directory called "bin/nautilus-actions" in your home directory
      Copy and paste this command in Terminal will do that.
      mkdir -p /home/`whoami`/bin/nautilus-actions
      E.g. if your username is "ladiesman", the resulting directory must be:
      Note: You must create the directory with the exact name (bin/nautilus-actions), because the script's dependencies currently hard-coded to /home/`whoami`/bin/nautilus-actions/
    2. Download the attachment (fusemounter.tar.gz)
      If you're using Ubuntu Hardy 8.04 (or Gnome 2.22.1), please download the fusemounter-hardy.tar.gz instead.
      The tar.gz file contains 2 files:
      - fusemounter/fusemounter
      - fusemounter/tpl (will shown as fusemounter/ in nautilus, refer to post #5 for explanation)
    3. Extract the attachment to the previously created directory (bin/nautilus-actions)
      This will put directory called "fusemounter" inside the bin/nautilus-actions.
    4. Open the "Nautilus Actions Configuration"
      System -> Preferences -> Nautilus Actions Configuration
      1. Add the "Mount ISO" action
        Press "Add" and enter the values like in this image to the Menu Item & Action Tab and the Conditions Tab respectively.

        Note: Change "tanto" (in the left picture, on the "Path:" field) to your user name.
      2. Add the "Unmount ISO" action (For .iso files)
        Press "Add" and enter the values like in this image to the Menu Item & Action Tab and the Conditions Tab respectively.

        Note: Change "tanto" (in the left picture, on the "Path:" field) to your user name.
      3. Add the "Unmount ISO" action (For desktop shortcuts files)
        Press "Add" and enter the values like in this image to the Menu Item & Action Tab and the Conditions Tab respectively.

        Note: Change "tanto" (in the left picture, on the "Path:" field) to your user name.

    5. Open the "Sessions Configuration"
      System -> Preferences -> Sessions
      1. Press "Add" and enter the values like in this image to the Startup Programs Tab.

        Note: Change "tanto" (on the "Command:" field) to your user name.


    1. Mounting ISO Image
      OK, now the fun part, if everything's installed correctly, now you can mount any ISO images file by right-clicking them and choose "Mount ISO". This will automatically creates the desktop shortcut, that you can use to re-open the images or unmount in later time.
    2. Unmounting ISO Image
      Simply right click the desktop shortcut or the original ISO image file, and select "Unmount ISO". This will unmount and removes the desktop shortcut instantly.

    Update: There's usage screenshot on the #2 post.


    1. Remove the Nautilus Action
      • Open the "Nautilus Actions Configuration"
      • Remove the "Mount ISO", and both the "Unmount ISO" from the list (by pressing "Delete").

    2. Remove the directory "bin/nautilus-actions/fusemounter" from your home directory

    Known Issue
    1. SOLVED IN VERSION 1.2 : If you forget to unmount the ISO images before restart/turn off the computer, the next time you login to your computer, the desktop shortcut is not removed, but you will not be able to open the image, you must manually re-mount the ISO image.
      Solution: Don't forget to unmount each time you turn off your computer, BUT, if you really forget, you can simply remove (delete) the desktop shortcut at the next login -- nothing bad will happen.


    I WILL TRY my best to answer your question regarding this script's installation and usage. BUT -- as usual -- I don't give any WARRANTY for a particular FITNESS NOR RESPONSIBLE for any damage cause by using this script and/or follow this installation guide.

    Bugs Report / Features Request

    Please post to this thread if you discover any bugs.
    And please post if you have idea to improve this script.
    Also, I'm not a bash guru, so if you can improve the script, please do so, and post the enhancement.

    Well, that's all, I hope you like this script, and hope this script can help to simplify your desktop experience . Feedbacks are welcomed.

    - Re-upload image for step 5.1 since it seems to be lost from the server somehow.
    - Added tested on SUSE Linux Enterprise Desktop 11.
    - Gee, it's been a very long time since the last time I visited this forum.

    - Added link to Hardy's KDE modification script.

    - Uploaded the fusemounter-hardy.tar.gz, a compatible version for Hardy Heron (Gnome 2.22.1)
    - Removed warning about script "malfunction" and added Hardy Heron as a tested machine for this script.

    - Added warning about script "malfunction" in Hardy Heron.

    - Switch source version to 1.2 & re-uploaded the new fusemounter.tar.gz attachment.
    - Support for auto-delete (a.k.a. auto-remove) the desktop shortcut for unmounted iso.
    - Change the tmppath structure, so there won't be any interfere if two or more user mounting the same ISO (with the same ISO's filename, of course).
    - Change the tpl file structure, so it can adapt comply with the new tmppath structure.
    - Change the screenshots in main post, so I can upload another picture.

    - Added tested on Slackware 12 & Vector Linux 5.9

    - Added tested on Debian Leny.
    - Added link to #!/bin/bash 's post for porting to Kubuntu.

    - Added uninstallation steps.
    - Fixed "not working" add-to-group fuse command (from usermod to gpasswd).
    - Added the fusemounter/tpl alias shown in nautilus explanation.
    Attached Files Attached Files
    Last edited by Milk & Toast & Honey; November 21st, 2009 at 05:13 AM.
    Mount ISO/MDF/NRG with right-click to your desktop

    Do NOT do or even type "sudo rm -rf anything" or "rm -rf anything", if you're not sure what it'll do.

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts