You are not logged in.
I got tired of typing the same stuff in a terminal over and over, so put this script together to add to Thunar's custom actions.
If you are looking at .iso files a lot it might be handy. It will make a folder in the current directory, mount the iso file to it (with gksu) and open thunar in that folder. If the iso is mounted already it will unmount it. The folder is deleted once you've unmounted it. You won't be able to edit the iso file, just view it, or copy stuff out of it.
edit 130321: Now modified to use fuseiso - no password needed. Also,the folder is no longer opened in Thunar - that seemed more annoyance than help. (Also works with .bin, .mdf, .img and .nrg files.) You'll need to install fuseiso:
sudo apt-get install fuseiso#!/bin/bash
# open-iso.sh
# mount .iso file in new folder, unmount if mounted already
# requires fuseiso and libnotify-bin (for notify-send messages)
shopt -s nocasematch
[[ -f $1 ]] && [[ $1 =~ \.(iso|bin|mdf|img|nrg)$ ]] || { notify-send "open-iso.sh" "$1 is not a supported file type"; exit 1 ;}
shopt -u nocasematch
foldername=${1}.mount
if grep "^fuseiso[[:space:]]$(readlink -f $foldername)" /etc/mtab >/dev/null
then
fusermount -u "$foldername" || { notify-send "open-iso.sh" "failed to unmount $1"; exit 1;}
notify-send "open-iso.sh" "$1 has been unmounted"
else
[[ -d $foldername ]] && [[ $( ls -A $foldername ) ]] && { notify-send "open-iso.sh" "$foldername is not empty" ; exit 1 ;}
fuseiso -p "$1" "$foldername" || { notify-send "open-iso.sh" "failed to mount $1"; exit 1;}
notify-send "open-iso.sh" "$1 has been mounted on $foldername"
fi
exitAs usual, put it in ~/scripts or somewhere handy and add a custom action like '~/scripts/open-iso.sh %f'. Make the appearance conditions "Other Files" and File pattern '*.iso;*.ISO;*.bin;*.BIN;*.img;*.IMG;*.nrg;*.NRG;*.mdf;*.MDF'.
Last edited by johnraff (2013-03-20 16:51:34)
John
--------------------
( a boring Japan blog , and idle twitterings )
Offline
Nice!
I just have an ISO shortcut (to a previously created dir) on the side with a custom action (same appearance conditions) to mount the iso file:
sudo mount -o loop -t iso9660 %f /mnt/ISOand another one to umount it. Not as fancy. 
On an ASRock VisionX 321B, Asus EeeBoxPC 1501P and EeePC 1000H with Debian Sid/Experimental Xfce 4.10 Linux
How to: Install Xfce 4.10 with upgraded Apps and Plugins
Offline
Edited it a bit: decided to delete the folder once the iso is unmounted, and added a few checks and error messages to 'notify-send' (it's installed by default in #!).
This kind of stuff is fun - once you've got it set up, the computer does the work! 
Last edited by johnraff (2010-03-05 18:06:19)
John
--------------------
( a boring Japan blog , and idle twitterings )
Offline
Excuse the necro-bump but thanks for the tip, using it now myself 
Offline
are we talking about statler/debian?
I am and if I insert a cd etc. or a usb stick, the system mounts it and opens thunar for me already!
am I doing something wrong ?!
p.s. I always close thunar and start mc, but it's usefule to see the contents straight away.
regards
Linux - It's not rocket surgery, after all!
web - nigelhoward.site90.com
skype - nogg321
Offline
am I doing something wrong ?!
you think/talk about CDs (actual physical discs made of plastic) they are talking about .iso image files (just some file format like any other)
Last edited by luc (2010-10-20 20:41:16)
Offline
When I run this script on ubuntu 11.10 it works great but it opens another instance of thunar?
Offline
Yes, it opens a new thunar window with the mounted iso file system. Unfortunately, you need to close that window manually after the iso is unmounted.
To be honest, I think that script has been outdated by the fuseiso package, which lets you mount iso files without having to use root privileges. I might write a new version, which would be much simpler. Meanwhile, check the Arch Wiki.
John
--------------------
( a boring Japan blog , and idle twitterings )
Offline
Just an update to this post, using thunar, the following is very simple:
On an ASRock VisionX 321B, Asus EeeBoxPC 1501P and EeePC 1000H with Debian Sid/Experimental Xfce 4.10 Linux
How to: Install Xfce 4.10 with upgraded Apps and Plugins
Offline
Thank you jotapesse. Fuseiso really makes it simple! 
John
--------------------
( a boring Japan blog , and idle twitterings )
Offline
I had to open an iso file multiple times last week, finally got tired of typing my password and rewrote the script to use fuseiso, which makes things much simpler. In fact, although a script gives you more flexibility, if you don't want the error checking and popup notifications you can just put a fuseiso command straight into Thunar's custom actions, as jotapesse pointed out:
Just an update to this post, using thunar, the following is very simple:
John
--------------------
( a boring Japan blog , and idle twitterings )
Offline
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.