0

I have more than a few ISO files that don't behave with archivers, file managers, or any other graphical tools. For these, only mount or udisksctl will work, but I'd hoped for a seamless solution without resorting to bash commands in a terminal.

I decided to craft a .desktop file using udisksctl and xdg-open to accomplish what I wanted.

The below commands successfully mount an ISO file from terminal without password prompts:

udisksctl loop-setup -r -f foobar.iso
udisksctl loop-setup -r -f ./foobar.iso

Using a .desktop with the line:

Exec=udisksctl loop-setup -r -f %f

should be enough to mount the file (%f should be substituted for the filename with path).

The .desktop file fails to mount the ISO file when set as the default for this filetype. Since this works fine in my terminal emulator, I suspect the issue lies with %f substitution.

I've tried opening some ISO files using xarchiver, Thunar, Dolphin, Konqueror, mounting with Krusader, & Ark. None of these options are capable of handling UDF ISO files properly. I thought it could be poorly crafted ISO files, so I used udfinfo (i.e., from udftools) to see if there was an issue.

The output included a few interesting lines:

udfinfo: Warning: Partition Space overlaps with other blocks
...
blocksize=2048
blocks=2786960
usedblocks=2786703
freeblocks=0
behindblocks=0
numfiles=11
numdirs=11
udfrev=1.02
udfwriterev=1.02
integrity=closed
accesstype=readonly
start=16, blocks=3, type=VRS
start=32, blocks=16, type=MVDS
start=48, blocks=16, type=RVDS
start=64, blocks=1, type=LVID
start=256, blocks=1, type=ANCHOR
start=257, blocks=2786703, type=PSPACE
start=2786959, blocks=1, type=ANCHOR

So, is this an issue of dirty ISO files? The command line tools are able to mount this without issue & the data seems intact.

I've modified the .desktop file many times with different syntax to no avail. The xdg-open portion was removed during my testing because mounting isn't working using udisksctl in the .desktop file.

[Desktop Entry]
Name=Udisks ISO Mount
Type=Application
Encoding=UTF-8
NoDisplay=true
Version=1.0
Terminal=false
Exec=udisksctl loop-setup -r -f %f && xdg-open /run/media/$USER/$(basename %f)
Terminal=false

I want to use a .desktop file for udisksctl mounting an ISO file. I can't get this to function, so perhaps someone here has a solution I'm unaware of.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.