xffm - anomaly + mounting ISO fs

Ric fhj52ads at yahoo.com
Mon Sep 22 23:16:03 CEST 2003


Hey:

There is an anomaly in xffm for the ISO filetype.  If one selects an  *.iso 
file and right clicks, the menu has "Execute <file_name>.iso" under the "Open"
category.  I don't know what execute is supposed to do with an *.iso but one
cannot 'exec' a filesystem. 

In its place I suggest  " Mount <file_name>.iso ".  In Linux, this can be
accomplished with the mount ... -o loop ...  command.   For example, to mount
the currently highlighted file in the emelfm file manager at the existing but
unmounted directory(mount point) named " /mnt/ISO " one can use the user
command:

mount %f /mnt/ISO -t iso9660 -o loop=/dev/loop3

The xffm works a little differently so I do not know if you can provide a
pop-up for the user to enter the mount point.  The mount point has to be an
existing directory that is not mounted, else mount wigs-out.  Obviously, you
already have a way to recognize and substitute the currently highlighted
file(the " %f " in emelfm).

Once mounted, it is no different than mounting ext2, ext3 or any other
filesystem mounted as "read only".  The user can copy, view files with any ap,
delete make a new ISO or perform any other legal operation on the "read only"
files.  E.g., one can open *.doc files with abiword/OOo (then maybe edit the
file and save to another dir) or copy the entire/partial contents of the *.iso
to another directory. Once the files are copied to a fs mounted as rw, any
legal operation is then possible.
The are of course different ways to implement the same function, some are
described with  man mount  under the "Loop" section.
A more general command format is

mount [FILE] [EXISTING UNMOUNTED DIR] -t auto -o loop

which allows auto selection of filetype and auto selection of any available
loopback.  Perhaps needless to say but, the 'oops'  is that some loop device
must be available. I think most systems mount a loopback device during boot,
BICBW.

If you can exchange "Execute" for "Mount" and work out the details of getting
the user to enter an existing unmounted directory*, it would be a nice creature
feature for xffm.  AFAIK, no other file manager(except my emelfm) can do such
things natively.  It has saved me many hours of anguish over the years.

I am not familiar enuf with other *nix or *BSD to know if it works the same way
but it should be since "mount" is common on all *nix.

In any event, I think you should remove the "Execute ..." from the right click
operation for the ISO filetype.


* "/mnt/cdrom " or even " /mnt/floppy "  are usually available mount points
that you might be able to use without asking the user for one...

=====
Have A Great Day!

Ric
***
Thought for today:
After 10 years writing object-orientated enterprise code, one of the most 
important things I've learned is to code as if the next guy to come along and 
maintain your code is a short-tempered 30-stone gorilla who knows where you 
live.
-- Caspian Rychlik-Prince
-- http://www.puppygames.net/articles/alienflux_postmortem.php

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com



More information about the Xfce4-dev mailing list