![]() Registered Member ![]()
|
Hi all,
Currently I'm facing a problem with the Device Notifier, which doesn't show the mounted devices of my users. My scenario is a bit complex, but resuming, my aim is to have one server and multiple thin-clients connected to it and use KDE. Only the server runs KDE sessions and it creates one per user. All this works fine, but when one of these clients stick in an USB drive, even if it actually is mounted, the user can browse thru it, etc, it's not shown up on the 'Device Notifier' applet. My KDE version is 4.3.4 (yes, I'm aware it's an old version, but due to the above explaination, which uses a very specific hardware configuration, this version of KDE is a must). Making some tests, turns out that the USB drive is recognized by the 'udisks' tool, so if I call 'udisks --dump' I see this information related to the device:
On the other hand, the 'solid-hardware list' command (which seems to be the KDE's hardware control tool) doesn't list this device, which I guess is the problem. I also tried sticking the USB device to the server instead of the client, and it gets mounted and notified. So it's just the case where the user sticks in the USB drive into the thin-client and it gets mounted this way where it it's not shown. Being stuck at this situation, I'd like to ask some questions to debug this: 1) What mechanism uses the 'Device notifier' to work? I mean, is it listening to HAL/UDEV/... and whenever something changes, it shows it up? 2) Is there a way to manually notify a storage device, so it's shown upon some user's action to force it being shown? Any help related with this will be very appreciated. Thanks! |
![]() Administrator ![]()
|
The Device Notifier uses Solid, which in turn relies upon the appropriate subsystem. KDE 4.3, from what I recall and can tell of the shipped source code relies upon HAL rather than UDisks. Can you post the output of "solid-hardware list" that you got?
If Solid is not aware of the device it will be very difficult to fix (as it will require debugging/patching of the source code). Is there anything in particular which prevents you from moving to KDE 4.4 and above?
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
Thanks very much for your answer. The output of the mentioned command would be this:
As you say, in this version, the device notifier seems to be forced to use HAL and there's no way to change it. I've been debugging a little bit further and it seems that HAL indeed recognizes the device, but it won't add it to the tree because it cannot find an appropiate parent. The reason why I can't upgrade to another version is because the thin-client infrastructure I'm using is only supported by a few operating systems (being Oracle Linux 6.3 one of them, which is in turn based on CentOS), and this one is shipped with its own repos which will install you this version, and the latest upgrades change the build at most, not the minor, so we're still on the 4.3.x version. I guess I could try installing the KDE 4.4 by hand but I wonder if that could become a hell because of the number of packages to upgrade by hand, unless I find a repo for this version with all the needed packages. Still, I'll try to patch the hal code as you suggested. I don't know how hard could be forcing a parent for the plugged in devices, but I think it's worth trying. |
![]() Administrator ![]()
|
If UDisks/UDev/UPower are present and working on that system, you could try copying the appropriate backends in for those and recompiling kdelibs. Which version of CentOS is Oracle Linux 6.3 based on? There should be community distributions available for CentOS which have newer versions of KDE available.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
That sounds good, could you please provide some guidelines on how to do that, or some reference link? I tried modifying the hal package to patch it, now I'm forcing the device to attach to the tree. It appears in the lshal info, but unfortunately the Device Notifier still can't detect the device. I don't know whether the Device Notifier expects the device to pend over some concrete branch, of whether it checks some property... I'll keep trying, though.
I believe that this version is concretely based on the same version of CentOS (i.e., 6.3), but I'm not quite sure on this. I've been trying to find some CentOS packages for this version of KDE for updating, but up until now I was unable. Thanks for your help! ==== EDITED ==== I just compared the output of the 'lshal' command when I plug in the USB device directly into the server and when I plug it into a client and both of them seem very similar, but the Device notifier is still unable to detect it, which is logic, because it probably doesn't know who this mountpoint belongs to and to which KDE desktop send the notification. I wonder is there is some 'signal' that should be sent to the device notifier to make it know that the device should be attached to the corresponding desktop, or some filter... I'll keep digging into this. These are the outputs: For the USB plugged in directly:
For the USB being plugged into a client:
Last edited by emarqe on Tue Sep 16, 2014 5:24 pm, edited 1 time in total.
|
![]() Administrator ![]()
|
Is the output you posted above from "solid-hardware details"?
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
This was the output of lshal, which was very alike to the one shown by solid-hardware. I finally got it running (seems that a reboot was needed to make the new patched HAL package work entirely), but unfortunately I realized this is not going to work as I expected
![]() Basically what happens patching the HAL to make it detect the USB drives on the thin-clients is that devices get mounted and HAL gathers the necessary information of the new device, and afterwards it sends the notification to all the users. So if an user mounts an USB drive, all the clients connected to the same server will see the notification in their Device Notifier saying that there's a new device, although they can't access it thanks to the appropiate permissions. I think this is the expected behavior, because HAL actually doesn't know who mounted a device, it just recovers the information about it and propagates it to whoever, so with this schema neither KDE knows who belongs a device that was plugged into a client. It's logic, when you are running KDE and you want to mount a device having several desktop instances, the device is also shown on all of them... In any case, thanks so much for your help, it made clear to me how the Device Notifier works in this old versions. |
![]() Administrator ![]()
|
Unfortunate. I think you may have this problem with UDisks also - you can use the "udisks --monitor" command to verify if this is the case. I'm not sure if it is seat aware or not. If it is, then a migration to using the UDisks backend might be worth looking into.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
I guess UDisks would have the same behavior as it neither handles information about owners. I will try to build a similar scenario with udisks and a bigger version of KDE and see whether I can reproduce it, though.
Thanks. |
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]