LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   KDE 3.4 - Media protocol (possibly Slackware specific) (https://www.linuxquestions.org/questions/slackware-14/kde-3-4-media-protocol-possibly-slackware-specific-304833/)

apachedude 03-22-2005 04:23 PM

KDE 3.4 - Media protocol (possibly Slackware specific)
 
When I had used KDE 3.3.2, I wrote udev rules to define my device and to create a symlink to the device node. I had those symlinks in my fstab, so that by merely clicking on the button in the devices:/ protocol, the device would mount and I could access it. This had a very high success rate, as long as the node was created (give it a few seconds). I might get an error message, but a mere refresh fixed the problem.

With KDE 3.4, the device protocol is gone, and is replaced by media:/. My udev rules are exactly the same, but I have a very low success rate with media:/. Suppose I opened media:/ and I see all the devices in my fstab. One of the drives is my jumpdrive, a link at /dev/jumpdrive that usually points to /dev/sda1 and according to fstab, mounts at /mnt/jumpdrive. So I click on the jumpdrive icon in media:/ (under Konqueror).

The device almost always successfully mounts, but Konqueror doesn't always detect it. It will often hang up. The expected behavior (the case under 3.3.2) was that the device would mount, and media:/jumpdrive would allow me to browse the files under my device. The current behavior, at least 70% of the time, is that the device would mount, but media:/jumpdrive would hang, displaying a blank filelist. A refresh would tell me that "The process for the media protocol died unexpectedly."

Now, I can go straight to /mnt/jumpdrive and access the files on the device myself. However, because konqueror has not detected the mount, I have no option to unmount the device. (If the media protocol had worked successfully, I would right click on the jumpdrive icon in media:/ and choose unmount). That means I have to go to root to unmount, or otherwise, do the entire mount process from command line.

This is a minor nuisance for me, but it gets worse if I allow a friend or someone else to use my computer, because I would like them to be able to mount and unmount the devices properly themselves.

One "problem" I have noted was that rc.hotplug loads blazingly fast. Under Slackware 10.0 and KDE 3.3.2, my bootup into KDE would take about 1 min, with 20 seconds of the process in the rc.hotplug sequence. Under 10.1 and 3.4, it takes merely 40 seconds, with about 1 second of the process under hotplug. It seems to me that hotplug is skipping something--but is that necessarily the case? About 30% of the time, the media:/ protocol works as expected.

I'd appreciate any help I can get--heck, I would appreciate it if any of you managed to read this far.

suslik 03-23-2005 01:58 PM

I have (almost) solved this by going the D-BUS and HAL route.

When I stick in a CD or a Flash drive, they show up in media:/// It even detects an instertion of a new flash card on multi-card readers! That required unplug/replug od the reader before.

I generally followed the this DBus HAL for KDE wiki Note, I went the pmount route. There was something unsettling about continuous changes to /etc/fstab if I went the other way.

3 quick notes if you are eager to start compiling.
1. DO NOT get the latest HAL and DBUS. They dont have the calls KDE 3.4 media kioslave relies on. I had lots of compiling grief going for DBUS 0.31 and HAL 0.5. Instead, go for latest DBUS 0.2x and HAL 0.4.x.
2. HAL WILL botch on kernel-headers (2.4 series) that came with Slack. Even the 2.6.10 headers Pat provided on CD2 (testing folder) HAL didn't like. I found somewhat un-borked headers (2.6.10 in my case) here (ftp) from Polish Linux Distro
3. The most fickle was HAL compile. with 2 head-scratchers:
a) The BLK*64 issue. The WIKI mentioned is already old. Headers were fixed already, but the problem remains because some other headers are botched > test compile fails. So GET trully good/well assembled headers.
b) You might have a scsi compile error when compiling the HAL if you go with PLD headers. Downgrade the sg.h headers a bit.

EDITS:
(almost) - devices automagically show up, but their names are ugly (ie swap shows up in it as DRV1_VOL1, and my flash card shows up as "_") I need to fiddle with the scripts more to make this look proper.

here is a screenshot Not the nifty "Safely Remove" option on the flash drive.

I am going to either: make a guide and post it here, or submitt changes to the above-mentioned WIKI some time in the next few days. I am not going to provide binaries, as I cant guarantee the stability/reliability cause it was compiled on a Slack 10-10.1, customized headers mix.

apachedude 05-30-2005 07:45 PM

Sorry, I haven't been tinkering with my Linux for a while.

I've just read up on D-BUS, HAL, and pmount, but I don't want to compile my KDE, at least not right now. I do like that the devices automatically show up. How much work does compiling involve? Can I expect Pat to incorporate these features in his next Slackware?

I've also read that a 2.6.x kernel is preferred. I'm considering actually going back to 2.4.x, however, as it seems more stable, with better support for CD burners and multimedia keyboards (some of my buttons don't register keypress events on 2.6.x).

apachedude 05-31-2005 02:29 AM

I've decided to look for HAL and DBUS from Dropline Gnome, but to continue using KDE 3.4. Is there anything I need to do besides installing those packages? Such as maybe deleting udev, autofs, or anything?


All times are GMT -5. The time now is 12:59 AM.