[Bug 195131] New: Mounting via alternatives (not HAL)

Stef Bon stef at bononline.nl
Wed Jun 3 18:51:35 BST 2009


https://bugs.kde.org/show_bug.cgi?id=195131

           Summary: Mounting via alternatives (not HAL)
           Product: kde
           Version: unspecified
          Platform: Compiled Sources
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: wishlist
          Priority: NOR
         Component: general
        AssignedTo: unassigned-bugs at kde.org
        ReportedBy: stef at bononline.nl


Version:            (using KDE 4.2.85)
Compiler:          gcc 4.1.2 
OS:                Linux
Installed from:    Compiled From Sources

Hello,

I've been developing a construction using autofs and ConsoleKit which mounts
local (USB) and remote (Windows shares, FTP, SSH) resources in a subdirectory
of the users homedirectory.

Everything is detected in a dynamical way. For example the SMB (=Windows)
shares are found with nbtscan and smbclient. USB devices via udev (for
hotplugging).

Now, I've found a way to bypass HAL, which also wants to mount USB devices. By
adding the --timeout=0 option, and to activate the mount just directly after it
has been added to autofs, the mount is written to the global mtab. HAL "sees"
this line, and ignores the device. KDE also sees this line, and behaves like it
should. The device does pop up in the devicenotifier, and shows up in the
places toolbar, with the sign "mounted", like it should. 
Look at: 

http://linux.bononline.nl/linux/autofsmanaged/index.php

and 

http://www.gentoo-wiki.info/Autofs#UDEV_with_autofs

But there are still problems. In an multiuser enviroment (multiseat) the
construction mounts the device at the same time on several places:

$HOME1/Connections/Devices/$LABEL
for user1

and 

$HOME1/Connections/Devices/$LABEL
for user2

Now asume both users are running KDE, KDE gets confused, because both
mountpoints are written to mtab, and KDE does not know which to take. Probably
it takes the first for both sessions, which is for the second user not good. 

Futher I cannot "safely remove" the USB devices, I get the message "it is not
in /media/.hal-mtab so it is not mounted by HAL". This is absolutely correct,
but not what I want.

My idea is that the detection of devices should be configurable, not only via
HAL.

First when a device is added, a file or the output of a script which is run
then should indicating the place where it's mounted, and it an autofs managed
mountpoint or not. This is important because autofs managed mountpoints do not
appear in the /etc/mtab file. So KDE should support autofs managed mountpoints
here.

Also configurable an command to mount the device, which is simply an ls
$MOUNTDIR command (which activates the automounter causing the device to be
mounted)

This bypasses HAL and /etc/mtab. 

Futher the command to "safely remove" a device should also be configurable. In
my case this should be a normal "umount command". The rest (removing device
from autofs maps) is handled by udev running the "REMOVE_CMD".


I hope you can make this changes to KDE,

Stef Bon

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Unassigned-bugs mailing list