How-to auto-mount volume when clicking on it ?
How-to auto-mount volume when clicking on it ?
Hello,
I haven't found a document explaining simply how to implement auto mount feature so an average user can access volumes without wondering if they are mounted or not ... May someone point me to such a document if it exists or explain here the process to implement this feature ?
Thanks...
I haven't found a document explaining simply how to implement auto mount feature so an average user can access volumes without wondering if they are mounted or not ... May someone point me to such a document if it exists or explain here the process to implement this feature ?
Thanks...
Hi lvds; Here's a image file mounter I wrote awhile back.
Clicking on certain file types will mount/unmount the file.
OR... right click on the file: [File 'file name'] [Open With..] [Un_Mount]
File types are: image.gz, image, initrd.gz, initrd, *.sfs, *.2fs, *.3fs, *.img
It's also a GUI app., run the file "xfilemount" & a file chooser dialog pops up.
Hope it helps you in your Linux journey, ask if you need more help...
Clicking on certain file types will mount/unmount the file.
OR... right click on the file: [File 'file name'] [Open With..] [Un_Mount]
File types are: image.gz, image, initrd.gz, initrd, *.sfs, *.2fs, *.3fs, *.img
It's also a GUI app., run the file "xfilemount" & a file chooser dialog pops up.
Hope it helps you in your Linux journey, ask if you need more help...
- Attachments
-
- xFileMount.pup
- Sorry about forgetting the file the first time I posted...
- (2.91 KiB) Downloaded 256 times
Last edited by sunburnt on Mon 12 Feb 2007, 11:07, edited 1 time in total.
or did you want to automatically mount partitions?
if so, you could have a script to mount & open /dev/hda4 with:
if you made this executable by changing the permissions, dragged it to desktop, then clicking on this file will open up hda4. i'm not sure how you would allocate the rox hda4 icon to it though.
also it could be risky if you did something similar with a usbkey, as i thought you had to umount them before unplugging.
if so, you could have a script to mount & open /dev/hda4 with:
Code: Select all
#!/bin/sh
mount /dev/hda4 /mnt/hda4
rox -d /mnt/hda4
also it could be risky if you did something similar with a usbkey, as i thought you had to umount them before unplugging.
Let's clarify:
You cannot click on a "volume" (partition) if it is not mounted.
The suggestion to create a script to mount it will create that illusion. Even better if you make that script a ROXapp.
A ROX app is no more than a folder with at least to "special" files, one describing the app and a script that does whatever you want.
In particular, I created a ROXapp that allows my sons to access a shared folder in another computer:
1. Checks if the other computer is turned on
1.1 if it is not, it shows a message saying so.
1.2 if it is, it mounts the share in the same location as the roxapp. masking the roxapp and opens that folder.
It gives a pretty good illusion as it looks just as any other folder.
The only issue is unmounting. You have to right click on the folder and select "unmount". If my sons turn of the other computer without unmounting the share, the computer slows down as rox keeps trying to access the mount.
Something may happen for USB devices or floppies. If the user plugs them out witout properly unmounting of flushing, the data they though they had saved, may actually not be on the device.
Search the forum for an "automounter" that some people were working on. That may be another solution.
You cannot click on a "volume" (partition) if it is not mounted.
The suggestion to create a script to mount it will create that illusion. Even better if you make that script a ROXapp.
A ROX app is no more than a folder with at least to "special" files, one describing the app and a script that does whatever you want.
In particular, I created a ROXapp that allows my sons to access a shared folder in another computer:
1. Checks if the other computer is turned on
1.1 if it is not, it shows a message saying so.
1.2 if it is, it mounts the share in the same location as the roxapp. masking the roxapp and opens that folder.
It gives a pretty good illusion as it looks just as any other folder.
The only issue is unmounting. You have to right click on the folder and select "unmount". If my sons turn of the other computer without unmounting the share, the computer slows down as rox keeps trying to access the mount.
Something may happen for USB devices or floppies. If the user plugs them out witout properly unmounting of flushing, the data they though they had saved, may actually not be on the device.
Search the forum for an "automounter" that some people were working on. That may be another solution.
[url]http://rarsa.blogspot.com[/url] Covering my eclectic thoughts
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to
Rox will do that ... just add the appropriate entries in /etc/fstab
for example, Rox should automatically mount and unmount your cd drive if you put a line like this in fstab:
/dev/hdc /mnt/cdrom iso9660 ro
this is supposed to work:
/dev/hdc /mnt/cdrom iso9660,udf ro
this should mount the cd disk automatically whether it's a regular cd or a udf disc ... it doesn't work because mount is Busybox ... but it does work if you use the mount-FULL executable
one way to work around Busybox, if you don't want to use the real mount executable, is to have 2 entries in fstab, like this:
/dev/hdc /mnt/cdrom iso9660 ro
/dev/hdc /mnt/udf udf ro
and this works for hard drive partitions too ... for example, if you put entries like this in fstab, Rox will mount and unmount the partitions when you click on the mount points (for example, /mnt/hda5, /mnt/hda6 ...):
#
/dev/hda5 /mnt/hda5 vfat noauto,noexec
/dev/hda6 /mnt/hda6 vfat noauto,noexec
/dev/hda7 /mnt/hda7 vfat noauto,noexec
#
/dev/hda9 /mnt/hda9 reiserfs defaults,noauto
/dev/hda13 /mnt/hda13 ext3 defaults,noauto
/dev/hda15 /mnt/hda15 ext3 defaults,noauto
#
all Puppy needs to setup Rox to automatically mount and unmount partitions is a script to setup fstab when Puppy boots (like Knoppix does)
for example, Rox should automatically mount and unmount your cd drive if you put a line like this in fstab:
/dev/hdc /mnt/cdrom iso9660 ro
this is supposed to work:
/dev/hdc /mnt/cdrom iso9660,udf ro
this should mount the cd disk automatically whether it's a regular cd or a udf disc ... it doesn't work because mount is Busybox ... but it does work if you use the mount-FULL executable
one way to work around Busybox, if you don't want to use the real mount executable, is to have 2 entries in fstab, like this:
/dev/hdc /mnt/cdrom iso9660 ro
/dev/hdc /mnt/udf udf ro
and this works for hard drive partitions too ... for example, if you put entries like this in fstab, Rox will mount and unmount the partitions when you click on the mount points (for example, /mnt/hda5, /mnt/hda6 ...):
#
/dev/hda5 /mnt/hda5 vfat noauto,noexec
/dev/hda6 /mnt/hda6 vfat noauto,noexec
/dev/hda7 /mnt/hda7 vfat noauto,noexec
#
/dev/hda9 /mnt/hda9 reiserfs defaults,noauto
/dev/hda13 /mnt/hda13 ext3 defaults,noauto
/dev/hda15 /mnt/hda15 ext3 defaults,noauto
#
all Puppy needs to setup Rox to automatically mount and unmount partitions is a script to setup fstab when Puppy boots (like Knoppix does)
Yes, like if in addition to putting the partition info in /tmp/fsparts.txt, it put it in fstab also.
As MANY have suggested here... Default auto. mount ALL partitions at boot.
Loop devices aren't used for partitions, it seems very little resources are used.
I haven't tried it but... why not do: mount -t $TYPE -o sync (USB, floppy, etc) (MntPt)
If mounted synchronusly, all writes to the device should occur immediately.
I intend to use synchronus type mounting for a newer version of usb-auto,
this way the daemon's process loop which searches for devices won't have to
do a "sync" command every 4 seconds to insure that data is written.
As MANY have suggested here... Default auto. mount ALL partitions at boot.
Loop devices aren't used for partitions, it seems very little resources are used.
I haven't tried it but... why not do: mount -t $TYPE -o sync (USB, floppy, etc) (MntPt)
If mounted synchronusly, all writes to the device should occur immediately.
I intend to use synchronus type mounting for a newer version of usb-auto,
this way the daemon's process loop which searches for devices won't have to
do a "sync" command every 4 seconds to insure that data is written.
well, for Puppy 1.x you could put a line like this in rc.local ... cat /etc/fstab.local >> /etc/fstab and put your configuration in fstab.local ... it wouldn't automount drives when Puppy boots, but Rox would be configured to automount your drives ... and maybe the init scripts could be modified to automount drives from fstab when Puppy boots
fstab can be editied in Puppy 2.x, but it might be a good idea to back up the changes somewhere ... Puppy sometimes writes over system files without asking
fstab can be editied in Puppy 2.x, but it might be a good idea to back up the changes somewhere ... Puppy sometimes writes over system files without asking