
MountFile
Source (link to git-repo or to original if based on someone elses unmodified work):
It includes a desktop icon and a Konqueror/Dolphin/D3lphin service menu entry for ISOs
(Though the script should be able to mount any filesystem image, not just ISOs).
I wrote this script about a year ago, when I was "getting in to" bash, so I just gave it a bit of a clean up.
I put it here because I hear people asking the question "How can I mount ISOs?" and "Isn't there a GUI to mounting them?" and it reminded me of the script I wrote.
Use the installGUI.sh rather than manual install, it should work for everyone (tell me if it doesn't).
--Manual Install--
Just copy the script in to ~/bin/ and it should "just work". I also included a .desktop file that you can place on your Desktop to run the script.
--Note--
With manual install:
If you install the script in another location (ie, not ~/bin/) then just edit the .desktop file to reflect the location of the script.
----------
--GUI Installer--
There is now an installer script that will install the script and put a link in the KMenu (under Utilities), it will also ask if you want a link on the desktop too.
--Note--
If you choose to install system wide then it won't ask to put a link on the desktop, but it will put one in the KMenu.
----------
--Dependencies--
It really only depends on KDE, but here's a more technical dependency list:
* kdebase(-bin) (for kdialog and kdesu)
* a posix compliant shell (sh)
* mount (to mount)
* Loopback device support in the kernel or as a module. (Most, if not all, should have this anyway).
For those running Kubuntu I have set up an apt repository:
deb http://ppa.launchpad.net/tsimpson/ubuntu gutsy main
(doesn't matter if you use gutsy or not, it will be ok to use that release name)
It should also work for any Debian based distribution, all packages should be the same.
Also note that my repository no longer has a universe/multiverse etc, everything is in main (not my choice).
It also is FULL of KDE4 RC1 packages, so if you get upgrade notifications of KDE4 packages and don't want to use mine you should just download the .deb below.
1.0
1st release
1.1
Fixed a couple things, it will warn you if you try to mount a file over another mount.
I also did a but of work for the UnMounting part, as it was a bit buggy.
1.1.1
Added installer script, as a stand-in for a GUI installer
1.2
Replaced stand-in installer with a GUI installer script
Installer script should work without 'tempfile' now.
1.3
You wanted it, you got it.
Added a service menu for ISOs
1.3.1
Code tidy, it needed it.
Now the code is more generic, it should work wherever KDE is installed to (doesn't assume /usr for the icons etc)
--Non-code related--
Changed the icon for mountserv.desktop to use a relative icon (not all users have KDE in /usr)
Added ChangeLog
Updated README
Added licence info in COPYING
Added TODO
Added AUTHORS
1.3.2
make sure $mounts is created before use, from service menu
Quote the file:// url to allow for spaces in directories
Add sevice menu for Dolphin
move MountFile.desktop to ${prefix}/applications/kde for standards
Updated email address to new address
Added copyright info to COPYING
1.3.2.{1,2}
Fixed service menu install path and typo
1.3.2.3
D3lphin service menu
Ratings & Comments
28 Comments
would be nice have a umount function to umount isos mounted with this script :)
It does umount ISOs mounted with the script, just start mountfile and choose the "Unmount" option.
nicely done. I installed 1.3.1-1 with the .deb and then updated to 1.3.2.2-0. The only improvement I can think of now is including a d3lphin servicemenu in any future updates. (https://marrat.homelinux.org/D3lphin) As far as I can tell, it would be the same as the dolphin servicemenu, the only difference being the spelling of filenames and paths -- d3lphin instead of dolphin. In any case, it was a simple matter to copy the servicemenu from my dolphin directory to the equivalent d3lphin one. So if you don't feel like bothering with the d3lphin support, it's no big deal. I'm assuming that anyone that has d3lphin installed probably had (and still has) dolphin also installed, and can simply copy the dolphin servicemenu to d3lphin as I did.
Should work with d3lphin now too. The updated package should also be in the repository soon, direct link to a .deb is also available
I installed using the GUI installer for user only on Kubuntu, but I'm not getting the ISO service menu. Other than that, it works great! Thanks for a nice tool.
Ok, can you make sure that "~/.kde/share/apps/konqueror/servicemenus/mountserv.desktop" exists, if it does then try restarting Konqueror, with "killall konqueror", or just logout and back in. Sometimes Konqueror needs a kick to reread it's configuration files. Let me know if it works or not :)
That file isn't there, I fear. The directory exists, but it is empty.
After coping the missing file from the archive and loggin in again, it works.
It's strange that the installer didn't copy the file over. But I guess that's the problem with installer scripts, they sometimes don't do what they should. The good news, however, is that I've finally learnt how to create a .deb package, so that should make life easier. The only think it doesn't do is install for the user only (but that's the nature of packages).
Not bad work for 3 days :)
Very nice utility! The only thing I miss is being able to use it from the right-click menu. (Or is it already there, and I just don't see it? :-) )
That functionality isn't there yet. I'd have to modify the script a bit to do that, I'll put it on my to-do list.
just in case you don't know: http://www.kde-apps.org/content/show.php?content=44805 bye :)
I didn't want a "feature rich" application, I just wanted something simple to do a simple task. Just to mount/unmount filesystem images (mostly ISOs). I could have used fuseiso too, instead of plain mount (and it would be a simple patch to do so), but I don't need to. Like it says in the description, I wrote it when playing with bash scripting, just to make things a bit simpler for me. MountFile just does exactly "what it says on the tin", it un/mounts a file.
yup. I also back ur position. In fact, I couldn't get that AcetoneISO2 installed on my system because of many-many dependencies. This one is too simple and working great. However, if u can add an installer with it, which can create an entry in K-menu, it would be great. Thanks anyway for the good app!
he was just joking ;) keep up the good work :)
I've just added a text installer to it that will do that. Give me a little while and I'll have it converted to use the GUI too :)
And now the GUI installer. (I forgot how much I like scripting :D)
1. If I try to install (as root) using the latest GUI, it gives the following error: [root@maya mountfile-1.2]# ./installGUI.sh ./installGUI.sh: line 12: tempfile: command not found kbuildsycoca running... DCOP Cleaning up dead connections. DCOP Cleaning up dead connections. kbuildsycoca running... unix_connect: can't connect to server (unix:/tmp/ksocket-root/maya-1524-469648a7) Launched ok, pid = 5853 There are already artsd objects registered, looking if they are active... ... cleaned 5 unused mcop global references. ./installGUI.sh: line 72: $TEMPFILE: ambiguous redirect mv: missing destination file operand after `/usr/share/applnk/Utilities/mountfile.desktop' Try `mv --help' for more information. 2. If I try to install (as "user") using the latest GUI, it gives the following error: [shekharc@maya mountfile-1.2]$ ./installGUI.sh ./installGUI.sh: line 12: tempfile: command not found ./installGUI.sh: line 101: $TEMPFILE: ambiguous redirect mv: missing destination file operand after `/home/shekharc/.kde/share/applnk/Utilities/mountfile.desktop' Try `mv --help' for more information. cp: cannot stat `/home/shekharc/.kde/share/applnk/Utilities/mountfile.desktop': No such file or directory It, however, copies the "mountfile" in /usr/bin or $HOME/bin. There seems to be problem with .desktop file.
Hmm, seems you don't have the tempfile command. I should have probably checked if that's standard in most distros first. For me it's in the "debianutils" package (only just checked). You can fix this by setting the tempfile directly, change line 12 from: export TEMPFILE="$(tempfile)" to: export TEMPFILE="/tmp/tempfile" I'll have to find a workaround for this, but that should get you past the install.
You'll be glad to hear that I've removed the usage of 'tempfile' now, so it should work. For those who are interested, TEMPFILE="/tmp/temp.$$"
I am running FC6. I searched for the "tempfile" command but it doesn't seem to exist for fedora. I even couldn't locate the source-code for this file. Could u please provide a link to the "tempfile" source or if possible, use some alternate way to bypass this command?! Thanks!!
I am running FC6. I searched for the "tempfile" command but it doesn't seem to exist for fedora. I even couldn't locate the source-code for this file. Could u please provide a link to the "tempfile" source or if possible, use some alternate way to bypass this command?! Thanks!!
It got installed now properly and working great. Thanks for the quick fix. Please keep the good work up. As one of the users suggested, a service menu entry will be great!!
just in case you don't know: http://www.kde-apps.org/content/show.php?content=44805 bye :)