Page 1 of 7 123 ... LastLast
Results 1 to 10 of 67

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

  1. #1
    Join Date
    Jul 2007
    Beans
    Hidden!
    Distro
    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.


    Introduction

    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.

    Update:
    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.



    Requirements

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

      To install the requirement, open terminal:
      Code:
      Applications -> Accessories -> Terminal
      then type:
      Code:
      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:
      Code:
      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.



    Installation

    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.
      Code:
      mkdir -p /home/`whoami`/bin/nautilus-actions
      E.g. if your username is "ladiesman", the resulting directory must be:
      Code:
      /home/ladiesman/bin/nautilus-actions
      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/iso.name 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"
      Code:
      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"
      Code:
      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.




    Usage

    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.


    Uninstallation

    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.



    Support

    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.


    EDIT:
    Changelog
    21/11/2009
    - 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.

    16/06/2008
    - Added link to Hardy's KDE modification script.

    16/05/2008
    - 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.

    15/05/2008
    - Added warning about script "malfunction" in Hardy Heron.

    08/03/2008
    - 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.

    01/03/2008
    - Added tested on Slackware 12 & Vector Linux 5.9

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

    23/02/2008
    - 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.

  2. #2
    Join Date
    Jul 2007
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

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

    I can't post this images to the previous post (because of the forum's restriction I think). Now, here's the some screenshots of the usage:

    1. Mounting ISO image



      You can see in the 2nd image, the shortcut for the ISO appears instantly on the desktop.

    2. Unmounting (mounted) ISO from desktop



      After you select "Unmount ISO", the shortcut will be removed, and the ISO will be unmounted.
    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.

  3. #3
    Join Date
    Feb 2008
    Beans
    7

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

    I can't get this to work...yet.
    As far as I can tell, I've done everything as laid out in your post, but when I click 'Mount' nothing happens.
    One discrepancy I noted: The files you attached are 'fusemounter' and 'iso.name' instead of the claimed 'fusemounter' and 'tpl'. Perhaps this is the issue?

    I hope this can be resolved, I really like the idea!

  4. #4
    Join Date
    Jul 2007
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

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

    Quote Originally Posted by Voidhawk9 View Post
    I can't get this to work...yet.
    As far as I can tell, I've done everything as laid out in your post, but when I click 'Mount' nothing happens.
    One discrepancy I noted: The files you attached are 'fusemounter' and 'iso.name' instead of the claimed 'fusemounter' and 'tpl'. Perhaps this is the issue?

    I hope this can be resolved, I really like the idea!
    Hi Voidhawk9, thanks for trying this script!

    Sorry, seems that the mistake is this command:
    "sudo usermod -a fuse -G yourusername"

    Please execute this command in the terminal:
    Code:
    sudo gpasswd -a yourusername fuse
    Note: change "yourusername" to your username.

    Logout and re-login.
    Sorry for the inconvenience, I have fixed the original thread now.
    Last edited by Milk & Toast & Honey; February 23rd, 2008 at 06:29 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.

  5. #5
    Join Date
    Jul 2007
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

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

    Voidhawk9, forget to mention, the included files:
    - fusemounter/fusemounter
    - fusemounter/tpl

    will appear like this in nautilus:
    - fusemounter/fusemounter
    - fusemounter/iso.name

    This is normal, if you see from terminal, it will print the "original" name, which is fusemounter/tpl. This happens because the "tpl" file actually is a *.desktop (configuration) file, and nautilus will automatically display the name according to the value inside this file (which is Name=iso.name) in this case.
    Last edited by Milk & Toast & Honey; February 23rd, 2008 at 06:40 AM. Reason: Typo makes perfect...
    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.

  6. #6
    Join Date
    Feb 2008
    Beans
    7

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

    That's got it, works perfectly. Thanks for posting this!

  7. #7
    Join Date
    Jul 2007
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

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

    You're welcome
    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.

  8. #8
    Join Date
    Jan 2008
    Location
    Romania
    Beans
    403
    Distro
    Ubuntu Development Release

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

    It works, thank you!
    ...Things To Tweak After Installing Ubuntu 12.04 Precise Pangolin

    http://www.webupd8.org - Daily Ubuntu / Linux news and application reviews.

  9. #9
    Join Date
    Nov 2005
    Location
    Oz
    Beans
    4,408

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

    It works perfectly for me.

    Thank you very much for posting the great how-to for us.

  10. #10
    Join Date
    Jul 2007
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

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

    Quote Originally Posted by nilarimogard View Post
    It works, thank you!
    Quote Originally Posted by handy View Post
    It works perfectly for me.

    Thank you very much for posting the great how-to for us.
    Hi, thank you for trying this script!
    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.

Page 1 of 7 123 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

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