Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
/media hotplug naming scheme changed with KDE 3.5?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
frozenJim
Guru
Guru


Joined: 18 Jun 2004
Posts: 341
Location: Montreal, Quebec, Canada

PostPosted: Wed Feb 01, 2006 10:11 pm    Post subject: /media hotplug naming scheme changed with KDE 3.5? Reply with quote

After upgrading to KDE 3.5, my usb-key would no longer mount.

With a bit of research, I found that now you must belong to the new "plugdev" group in order to mount devices like usb-keys. So fine, I added myself to the group and I can now mount my usb-key.

My shortcuts all point to the NAME of the key (which is JAMES_KEY). So for instance, my tuxcards shortcut points to /media/JAMES_KEY/tuxcards/james.tux.

Since the upgrade - and adding myself to the plugdev group - my usb-key mounts as /media/sda1.

Does anyone know if this is a normal result of upgrading to KDE 3.5? I really do not require IVMAN, or at least I have not in the past.

Am I missing something simple that explains why my devices are now mounted as /sda(x)? It's a pain because I use many devices and all of my shortcuts are seldom pointing to the right device now.
_________________
Who controls the past, controls the future. Who controls the present, controls the past.
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Wed Feb 01, 2006 10:27 pm    Post subject: Reply with quote

With KDE 3.5 you don't need the KDE shortcuts anymore, devices icons will be created automatically.

You don't need ivman, and the devices should be mounted in /media, not /.
Back to top
View user's profile Send private message
frozenJim
Guru
Guru


Joined: 18 Jun 2004
Posts: 341
Location: Montreal, Quebec, Canada

PostPosted: Wed Feb 01, 2006 11:48 pm    Post subject: Reply with quote

I should have been more specific as to which shortcuts I meant.

I have not been using IVMAN up until now because the basic KDE system has done a fine job for me. I simply plug in my device, wait 15 seconds and then it pops up on my desktop. I click "mount" and it mounts just fine in /media.

This has always worked for me using only hotplugd, hald and dbus. No need for anything else unless you want to get fancy.

What has always happened is that my USB-KEY appears in /media as "JAMES_KEY" or "JAMES_KEY_TOB", depending on which key I insert.

This behaviour has changed since upgrading to KDE 3.5. Now the key is simply mounted as "/media/sda1" or "/media/sda2". Also new is the new usbplug group. It took me a while to notice that this new group had been created AND that I have to add all users to this new group in order to mount usb-keys.

The SHORTCUT I refer to is - for instance - my Tuxcards icon. It's always there but won't work until /media/JAMES_KEY is mounted. It points to /media/JAMES_KEY/tuxcards/james.tux. So I just click on my little penguin and up pops tuxcards with the correct file open.

But now, with what appears to be a new behaviour, my key is now mounted as /media/sda1, or 2, or 12. It is no longer mounted as /media/JAMES_KEY or /media/JAMES_KEY_TOB.

It is a small inconvenience, but one that affects all of my clients who have similar shortcuts.

Is anyone familiar with this new behaviour? Is it a bug or is it an expected behaviour?

----------

[edit}
I have just had someone suggest that it is pmount that creates the usbplug group - and it is pmount that requires that you are part of that group in order to mount devices.

But I don't use pmount (that I am aware of). It exists in my /usr/bin, but I have never even known that it was installed.

Does KDE 3.5 use pmount? Does DBUS?

Something is different - I just cannot pinpoint it.
_________________
Who controls the past, controls the future. Who controls the present, controls the past.
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Thu Feb 02, 2006 12:20 am    Post subject: Reply with quote

KDE 3.5 uses pmount. KDE 3.4 used fstab-sync, but there was an option to manually use pmount. The quidelines to setup pmount with KDE 3.4.X are not applicable to KDE 3.5. You shouldn't have to do anything.

I know there are some threads about the name change here somewhere.

Did you format those usb keys in Windows and give the partition names?
Back to top
View user's profile Send private message
frozenJim
Guru
Guru


Joined: 18 Jun 2004
Posts: 341
Location: Montreal, Quebec, Canada

PostPosted: Sun Feb 05, 2006 7:09 pm    Post subject: Reply with quote

headrush wrote:
Did you format those usb keys in Windows and give the partition names?

Yes, I believe that is the case. I don't know if there is a way to name keys from Linux (is there?). But the name is not vital, I just require any unique ID in order to identify which key is plugged in.

So it IS a pmount issue! That explains the new usbplug group.

Well, now I have a place to start. I suppose I can brush up on pmount and see how to get it to name a device rather than use sd(x). It's not so useful to have usb keys named simply by the order in which they are connected - no way to know in advance what name they will have. It makes creating links awfully difficult ;-)

But I can't shake the feeling that by editing config files to hardwire device recognition, I am defeating the purpose of automounting. It's tough to believe that the KDE folks thought it would be an improvement to make all of the usb devices have anonymous sd(x) names instead of the old behaviour. Any ideas?

Thanks headrush.
_________________
Who controls the past, controls the future. Who controls the present, controls the past.
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Sun Feb 05, 2006 7:36 pm    Post subject: Reply with quote

Its simple.

Just make a udev rule in /etc/udev/rules/10-local.rules. Here is an example:
Code:
BUS="usb", SYSFS{idVendor}="090a", SYSFS{idProduct}="1001", NAME="myRedUSBstick", SYMLINK="%k"

This usbstick will always be mounted in /media as myRedUSBstick.

You can find the vendor and product key using lsmod when the key is plugged in.
(If your usb stick has multiple partitions, add %n to the end of name.
Back to top
View user's profile Send private message
frozenJim
Guru
Guru


Joined: 18 Jun 2004
Posts: 341
Location: Montreal, Quebec, Canada

PostPosted: Sun Feb 05, 2006 7:42 pm    Post subject: Reply with quote

Yeah, OK. That is how I used to do it.. before I started letting KDE handle it. I was so happy when it wasn't necessary because my clients are not capable of editing dbus config files. Now we have to do so again? It seems a step backward.

Where does this leave IVMAN? I see on some other threads that IVMAN is still required, but for what? I kind of thought that the purpose of IVMAN was to replace the manual changes to udev rules(?).

What does IVMAN do that pmount/dbus don't handle?
_________________
Who controls the past, controls the future. Who controls the present, controls the past.
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Sun Feb 05, 2006 8:19 pm    Post subject: Reply with quote

frozenJim wrote:
Yeah, OK. That is how I used to do it.. before I started letting KDE handle it. I was so happy when it wasn't necessary because my clients are not capable of editing dbus config files. Now we have to do so again? It seems a step backward.

Maybe for you, but not necessarily for others. I don't use volume names ever, so it defaulting to volume names would do me no good.

frozenJim wrote:
Where does this leave IVMAN? I see on some other threads that IVMAN is still required, but for what? I kind of thought that the purpose of IVMAN was to replace the manual changes to udev rules(?).

Ivman is not required. Remember that ivman isn't tied to 1 DE, so can be used with DEs that don't have automount capabilities.
(There are other features too)

frozenJim wrote:
What does IVMAN do that pmount/dbus don't handle?

Ivman uses pmount.
Directly from the ivman page
Quote:
Ivman is a generic handler for HAL events. Originally for automounting, it can now be used to run arbitrary commands when events or conditions occur or properties are modified on your hardware (e.g., run a command when you close your laptop's lid, run a command when a particular device is attached or a particular CD is inserted, etc).
Back to top
View user's profile Send private message
frozenJim
Guru
Guru


Joined: 18 Jun 2004
Posts: 341
Location: Montreal, Quebec, Canada

PostPosted: Sun Feb 05, 2006 8:43 pm    Post subject: Reply with quote

Well written.

Thanks.

I can see where IVMAN might be better - unless you plan on using KDE exclusively (which is the plan for my clients).
_________________
Who controls the past, controls the future. Who controls the present, controls the past.
Back to top
View user's profile Send private message
Dereck SUN
n00b
n00b


Joined: 15 Dec 2005
Posts: 2
Location: Nantes

PostPosted: Sun Feb 05, 2006 11:10 pm    Post subject: KDE Option ? Reply with quote

Hi,

So, could the user choose wich way KDE will mount USB mass storage Disks ?
Is there an option somewhere to tell KDE to use volume label or kernel name for mounting things in /media ?

That could be a really enhancement for all users...

Tristan.
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Mon Feb 06, 2006 2:07 am    Post subject: Re: KDE Option ? Reply with quote

Dereck SUN wrote:
Is there an option somewhere to tell KDE to use volume label or kernel name for mounting things in /media?

It does use the kernel name if you haven't changed it with a custom udev rule. I don't know about setting it to use volume names.
Back to top
View user's profile Send private message
Dereck SUN
n00b
n00b


Joined: 15 Dec 2005
Posts: 2
Location: Nantes

PostPosted: Mon Feb 06, 2006 9:36 pm    Post subject: Reply with quote

So, if I understand, KDE don't use HAL anymore ?

Because I thought UDEV was only here to create device files, not to tell the userspace softwares where to mount files... And that this second step was done by HAL, wich give to userspace softwares informations about what to do with some devices....

If I remember the steps, there is UDEV, with rules to create device files, and HAL policies, wich is the link between devices (using files created by UDEV) and userspace softwares. So, if you want some devices to be mounted at a place with kernel name, you modify the HAL policies... Or if I want kde to mount files with volume names, I change HAL policies... But in no way I change UDEV to create a device with label-name...

Am I right or wrong ? If I am wrong, could you please give me a link to some docs or HowTo ? I really want to understand how all of this works, what does UDEV and HAL.

Thanks for all.
Tristan.
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Mon Feb 06, 2006 11:11 pm    Post subject: Reply with quote

Kde still uses HAL.

HAL doesn't do the mounting, it just communicates messages between the kernel and other userspace programs.

The default behavior currently in KDE to use pmount. pmount will use the device name in lieu of a label being passed to it.
(It doesn't have anything to to with udev rules from deciding the mount name)
Back to top
View user's profile Send private message
PhanLord
Apprentice
Apprentice


Joined: 19 Nov 2002
Posts: 175

PostPosted: Sat May 20, 2006 4:21 pm    Post subject: Reply with quote

Did anyone find the clean way to enable mount to /media/<label name> instead of /media/<device>
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum