9

Given that something like Furius ISO Mount installs Nautilus and other stuff in Xfce, what would be more recommendable in Xubuntu?

It seems that a such application must have some level of integration with the File Manger, in this case Thunar.

Having a context menu "mount" option in Thunar for iso files like we have for partitions would be great. Maybe through Thunar custom actions?

enter image description here


I used AcetoneISO in the past with Xubuntu 12.04 and 12.10. Does it work ok in 14.04? I read here, that it works bad with 13.04 (French text: Il semble que sous Ubuntu 13.04 le logiciel fonctionne mal.)


EDIT after comment @Bill:

I do not know why I cannot make work a custom action in Thunar 1.6.3 with the command provided at the link help.ubuntu.com/community/ThunarCustomActions

gksudo mount -o loop -t iso9660 %f /mnt'

I have created a custom action with that command, made it visible in the context menu by making settings similar to those presented in my answer below, but I don't see any mounted device in Thunar's left panel.

2
  • 1
    See: help.ubuntu.com/community/ThunarCustomActions For an exhaustive list of custom actions for Thunar, including mount iso.
    – headkase
    Oct 15, 2014 at 11:23
  • @Bill - are you using that ? i cannot make it work. updated question with info. found a solution that works, see my answer
    – user47206
    Oct 15, 2014 at 12:30

5 Answers 5

9

For the limited purpose of just playing a DVD saved as iso file, open it in VLC.

To add a context menu action in Thunar, open the Thunar file manager anywhere click on Edit -> Configure custom actions

it should look like so:

enter image description here

enter image description here

and for adding the command browse for the VLC executable.


For the larger purpose of mounting iso images as described in the question:

From here.

sudo apt-get install fuseiso

This is not a gui, but Thunar custom actions will provide that.

Opening the Thunar file manager anywhere click on Edit -> Configure custom actions

Now you will need to add two custom actions:

a. Name: Mount image

Description: Mount an ISO disk image (<- this is an example, you can describe it anyway you like)

Command:

mkdir %f.mount & fuseiso %f %f.mount

(note: using %F instead of $f allows you to do this operation for multiple selections)

enter image description here

Under "Appearance conditions" tab - File Pattern: *.iso;*.ISO

Tick 'Other files'

enter image description here

This allows you to mount a file under a folder named after the file + the extension ".mount"

enter image description here

enter image description here

b. Name: Unmount image from this folder

Description: Unmount disk image removing the mount point (<- again an example) Command:

fusermount -u %f & rmdir %f

(note: again, %F is for multiple selections)

enter image description here

Under "Appearance conditions" tab - File Pattern: *.mount

Tick "Directories"

enter image description here

This unmounts the image and removes the directory. To keep the directory, simply remove "& rmdir %f" from the command

enter image description here

Alternative to (b):

To unmount an ISO by right clicking on it, rather than it's mount point, use:

Command:

fusermount -u %f.mount & rmdir %f.mount

enter image description here

Under "Appearance conditions" tab - File pattern: *.iso;*.ISO

Tick 'Other files'

enter image description here

enter image description here

--

What I do not like is that the commands appear in the context menu even if they are not applicable: mount when it is already mounted, unmount when it is not mounted.

1
  • when using fuseiso, you don't need to create the directory - fuseiso will create it itself if you specify a path that doesn't exist, but whose parent folder exist and is writable by the user.
    – Guss
    May 1, 2020 at 19:38
5

You do not have to install fuseiso but can use udisksctl which comes preinstalled and is a lot easier to handle.

In Thunar go to „Custom Actions“ as pointed out by cipricus. Create a new action and add a description. The command to use is

udisksctl loop-setup -f %f

Got to „Conditions“ tab and check „other files“ and enter *.iso;*.ISO as file pattern.

This action will mount your iso into /media/$USER/ and unmounting will be easy for thunar can do that out of the box so there is no need to create an additional custom action.

2
  • your answer is the most simple and straightforward, so I have selected it as my preferred one.
    – user47206
    Nov 9, 2018 at 10:05
  • I had issues with udisksctl, gnome-disk-utility and friends when trying to mount ISO images of games that support both Windows and Mac OS, and were created using a software called "HFS optimizer". When encountering such disks, GNOME utilities prefer to mount the "HFS" view of the file system which does not give you access to the Windows files - which is likely what you would want to play Windows games using Wine. In these cases fuseiso gave better results.
    – Guss
    May 1, 2020 at 19:36
1

This action is default in PCManFM, the default file manager in Lubuntu. You may consider installing that in Xubuntu.

enter image description here

Sorry for the German ;) Einhängen = Mount

3
  • If it is PCManFM, please post it as a solution, for it qualifies as a GUI, whether other application is needed or not beside it.
    – user47206
    Oct 15, 2014 at 12:37
  • 1
    Excuse me, this is actaully Lubuntu and indeed PCManFM. I confused it with Xubuntu for whatever reason. Why are you still using 12.04 if I may ask? I am not sure if I should delete this post since it is not about Xubuntu at all. But maybe this works of you install PCManFM on Xubuntu and it helps someone. There are quite some default things in PCManFM, like rightclick a folder and open it with VLC. I not have that in Ubuntu with Nautilus, lightweight and still not dumped down, I like it. Oct 15, 2014 at 23:51
  • @ very sorry: it's an error in my previous now deleted comment when I said I am in 12.04 - when in fact I am in 14.04. And no, you should not delete, I am very familiar with Lubuntu and pcmanfm, pcmanfm is a GUI for what I am asking, and can be used in Xubuntu.
    – user47206
    Oct 16, 2014 at 10:25
0

You can use the command gksudo 'mount -o loop -t iso9660 %f /mnt'.

I know you said it didn't work, but that is because of a typo. The last character is a ' (single quote), but the one bewtween gksudo and mount was missing.

However, even doing it that way will not cause the cd to show up under devices. I recommends using udisks2 to create a loop device:

udisksctl loop-setup --file %f
0

I made a custom action for thunar, based on qemu-nbd from qemu-img package of archlinux, it supports mounting images that qemu-img supports, i have tried those: iso, img, vdi, qcow2, vhd, dmg, vmdk, parallels, bochs, vhdx using zenity as gui, and pkexec to get privileges.

custom action script is like this:

Name: Mount disk image
Command:
mounttarget=$(zenity --list --title="Mount target" --width=200 --height=400 --column=device /dev/nbd{0..15});
    if [ -n "$mounttarget" ]; then
    ro=$(zenity --info --title "Mount Setting" --text "Would you like to mount as read only or writable?" --ok-label "Read Only" --extra-button "Writeable" --extra-button "Cancel");
    if [ $? = 0 ]; then
    pkexec sh -c "modprobe nbd && qemu-nbd -c $mounttarget --read-only %f";
    elif [ "$ro" = "Writeable" ]; then
    pkexec sh -c "modprobe nbd && qemu-nbd -c $mounttarget %f";
    fi;
    fi

File Pattern

*.qcow2;*.vhd;*.vhdx;*.vmdk;*.img;*.vdi;*.iso;*.dmg

Before this, i have been using fuse or loopctl but they do not mount every iso as they sometimes have different formats inside them, i found out this method is reliable. To unmount, i made another script that i launch from menu

mounttarget=$(zenity --list --title="Unmount target" --width=200 --height=400 --column=device /dev/nbd{0..15});
if [ -n "$mounttarget" ]; then
pkexec sh -c "qemu-nbd -d $mounttarget";
fi

Unmount with this script is required if you are going to use the mounted file like qcow2 in a virtual machine.

1
  • Can you make your script more readable?
    – user68186
    Feb 7, 2023 at 23:25

You must log in to answer this question.