Bug 195131 - Mounting via alternatives (not HAL)
Summary: Mounting via alternatives (not HAL)
Status: RESOLVED UNMAINTAINED
Alias: None
Product: solid
Classification: Unmaintained
Component: libsolid (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Alex Fiestas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-03 19:51 UTC by Stef Bon
Modified: 2018-09-04 15:43 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stef Bon 2009-06-03 19:51:28 UTC
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
Comment 1 Stef Bon 2010-10-02 17:23:16 UTC
The links in the report have been changed:

http://linux.bononline.nl/projects/mount.md5key.new/

and 

http://linux.bononline.nl/wiki/index.php/Mount.md5key

My construction has been changed, is a cooperation between a FUSE module fuse-workspace-ll, autofs, ConsoleKit, at and udev.


Stef
Comment 2 Alex Fiestas 2013-03-03 11:59:13 UTC
So, should we support FUSE ?
Comment 3 Andrew Crouthamel 2018-09-04 15:43:38 UTC
Hello! Sorry to be the bearer of bad news, but this project has been unmaintained for many years so I am closing this bug. Please try again with the latest version and submit a new bug to frameworks-solid if your issue persists. Thank you!