Version: (using KDE KDE 3.5.4) Installed from: Slackware Packages OS: Linux Until KDE 3.5.4 mounting of devices with media kio-slave did worked without dbus/hal installed and kio_media_mounthelper did used /etc/fstab entries. Now when I point in Konqueror to my CD-ROM URL (media:/cdrom) error message pop-ups with "Feature available only with HAL" and device is not mounted. Please fix bug in kio media so devices could be mounted again on systems without HAL. Thanks in an advance.
*** Bug 132257 has been marked as a duplicate of this bug. ***
*** This bug has been confirmed by popular vote. ***
Is this bug being worked on? This is an annoying bug, mostly because you're still unable to use, i.e, system:/media/hdc to access the cdrom even after it's been mounted manually. Also, KwikDisk fails with the same error when you try to use it to mount the CDROM.
is your cdrom in /etc/fstab ? If so, can you please attach it?
Here's my fstab: /dev/hda6 swap swap defaults 0 0 /dev/hda5 / ext3 defaults 1 1 /dev/hda3 /boot ext2 defaults,ro,nodev 1 2 /dev/hda1 /mnt/ntfs ntfs ro,dmask=222,fmask=333 0 0 /dev/hda7 /mnt/vfat vfat auto,rw,dmask=000,fmask=111 0 0 /dev/hda8 /mnt/slackroot ext3 defaults 1 2 /dev/cdrom /mnt/cdrom iso9660 noauto,user,ro,unhide 0 0 /dev/floppy /mnt/floppy auto noauto,user 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 proc /proc proc defaults 0 0 none /sys sysfs defaults,noauto 0 0 shm /dev/shm tmpfs defaults,noauto 0 0 /dev/disk/by-id/usb-SanDisk_Cruzer_Mini_SNDK8ABBA4272BE07003-part1 /mnt/usb vfat noauto,user 0 0 I have icons on my desktop which I can use to mount and open konqueror, but using media:/ in konqueror I cannot mount or open devices (except hard drives). I tried mounting my usb stick before opening konqueror, but I could still not access it as media:/usb-SanDisk... I cannot mount my cdrom using media:/, but after mounting it via the desktop icon sometimes I can then open it as media:/cdrom. Right clicking the cdrom icon in media:/ will not allow me to unmount it; I must do that via the desktop icon (or of course Konsole). Mounting the cdrom via Konsole (as user, not root) will not allow me to browse it as media:/cdrom. Basically, I don't rely on media:/*, but use the desktop icons I created instead.
Here is my /etc/fstab. In 3.5.3 mounting DVD using media:/ IO slave was working fine, now after upgrading to 3.5.4 I get the messages "Feature available only with HAL". Slackware-current (11) package here. Kernel 2.6.17.11 /dev/hda1 / ext3 defaults 1 1 /dev/hda2 swap swap defaults 0 0 /dev/hda3 /home ext3 defaults 1 2 /dev/hdc /mnt/dvd auto noauto,user,ro 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 proc /proc proc defaults 0 0
These are the offending commits: http://websvn.kde.org/branches/KDE/3.5/kdebase/kioslave/media/mediamanager/mediamanager.cpp?rev=550578&r1=468233&r2=550578 http://websvn.kde.org/branches/KDE/3.5/kdebase/kioslave/media/mediamanager/mediamanager.cpp?rev=551063&r1=550578&r2=551063
This is a double-whammy for RHEL4 users, since kde-3.5.4 dropped support for hal-0.4.2. ):
the commit in the mediamanager is harmless. You only notice it because the dcop functions are called that shouldn't be called :)
SVN commit 587626 by coolo: adding a mount function to the fstab backend that can be used without hal BUG: 132281 M +23 -0 fstabbackend.cpp M +4 -0 fstabbackend.h M +11 -4 mediamanager.cpp M +2 -0 mediamanager.h --- branches/KDE/3.5/kdebase/kioslave/media/mediamanager/fstabbackend.cpp #587625:587626 @@ -37,6 +37,9 @@ #endif #include <klocale.h> +#include <kio/job.h> +#include <kio/netaccess.h> +#include <kdebug.h> #include <kdirwatch.h> #include <kurl.h> #include <kmountpoint.h> @@ -94,6 +97,26 @@ KDirWatch::self()->removeFile(MTAB); } +QString FstabBackend::mount( const QString &_udi ) +{ + const Medium* medium = m_mediaList.findById(_udi); + if (!medium) + return i18n("No such medium: %1").arg(_udi); + KIO::Job* job = KIO::mount( false, 0, medium->deviceNode(), medium->mountPoint()); + KIO::NetAccess::synchronousRun( job, 0 ); + return QString::null; +} + +QString FstabBackend::unmount( const QString &_udi ) +{ + const Medium* medium = m_mediaList.findById(_udi); + if (!medium) + return i18n("No such medium: %1").arg(_udi); + KIO::Job* job = KIO::unmount( medium->mountPoint(), false); + KIO::NetAccess::synchronousRun( job, 0 ); + return QString::null; +} + void FstabBackend::slotDirty(const QString &path) { if (path==MTAB) --- branches/KDE/3.5/kdebase/kioslave/media/mediamanager/fstabbackend.h #587625:587626 @@ -41,6 +41,10 @@ const QString &fsType, bool mounted, QString &mimeType, QString &iconName, QString &label); + + QString mount(const QString &id); + QString unmount(const QString &id); + private slots: void slotDirty(const QString &path); void handleFstabChange(bool allowNotification = true); --- branches/KDE/3.5/kdebase/kioslave/media/mediamanager/mediamanager.cpp #587625:587626 @@ -77,6 +77,7 @@ mp_removableBackend = 0L; m_halbackend = 0L; + m_fstabbackend = 0L; #ifdef COMPILE_HALBACKEND if ( MediaManagerSettings::self()->halBackendEnabled() ) @@ -85,7 +86,8 @@ if (m_halbackend->InitHal()) { m_backends.append( m_halbackend ); - m_backends.append( new FstabBackend(m_mediaList, true) ); + m_fstabbackend = new FstabBackend(m_mediaList, true); + m_backends.append( m_fstabbackend ); // No need to load something else... m_mediaList.blockSignals(false); return; @@ -108,7 +110,8 @@ } #endif //COMPILE_LINUXCDPOLLING - m_backends.append( new FstabBackend(m_mediaList) ); + m_fstabbackend = new FstabBackend(m_mediaList); + m_backends.append( m_fstabbackend ); m_mediaList.blockSignals(false); } @@ -206,7 +209,9 @@ return i18n("Feature only available with HAL"); return m_halbackend->mount(name); #else - return i18n("Feature only available with HAL"); + if ( !m_fstabbackend ) // lying :) + return i18n("Feature only available with HAL"); + return m_fstabbackend->mount( name ); #endif } @@ -217,7 +222,9 @@ return i18n("Feature only available with HAL"); return m_halbackend->unmount(name); #else - return i18n("Feature only available with HAL"); + if ( !m_fstabbackend ) // lying :) + return i18n("Feature only available with HAL"); + return m_fstabbackend->unmount( name ); #endif } --- branches/KDE/3.5/kdebase/kioslave/media/mediamanager/mediamanager.h #587625:587626 @@ -29,6 +29,7 @@ #include "mediadirnotify.h" class HALBackend; +class FstabBackend; class MediaManager : public KDEDModule { @@ -83,6 +84,7 @@ RemovableBackend *mp_removableBackend; HALBackend *m_halbackend; MediaDirNotify m_dirNotify; + FstabBackend *m_fstabbackend; }; #endif
Created attachment 17898 [details] Backported coolo patch to KDE 3.5.4 vanilla With coolo's media mounting problems are solved. Just apply the patch do KDE kdebase 3.54 and rebuild the slackware package. Thank you guys.
I added the patch and built kdebase using Pat's slackbuild. Sometimes it fully works and somtimes it only partially works, as described below. I haven't determined under what conditions it works and when it doesn't. Using media:/ I can right click on icons and mount/unmount media (cdrom, usb drives). I verified each time by 'cat /etc/mtab'. However, after clicking on the icon it won't show the contents. Also, typing media:/cdrom in konqueror will mount the cdrom, but won't show the contents of the cd.
I confirm Comment #12, please reopen the bug. It still doesn't behave like it used to before KDE 3.5.4 w/o HAL.
Indeed, if I mount a CD and then umount it (via right-click -> unmount), and then mount it again, the CD filesystem will get mounted (as reported by "mount"), but you will be unable to see the contents via system:/media/hdc The KDE icon at the top right will keep moving as if it were working on something. The first time you mount it using either Konqueror or KwikDisk it works properly, the problem just appears after you unmount the drive and then mount it again. That second (or third, or fourth, ...) time KwikDisk does show the proper free space ("[0 B]") of the CD and a mounted CD icon, but it fails to create the Mounted CD Icon on the desktop (which did appear the first time). Konqueror doesn't seem to realize that the drive has been mounted, at all.
hm ... strange things happens with 3.5.4 and 3.5.5 ... it looks like same problem like I've described in #135215 . Possible that 135215 (but using supermount) is duplicate. I've also fixed (it works for me ;) ) removable media problem with supermount & kde 3.5.4 in #135139 .
I'm comfirming Comment #14. That's the exact same problem I'm having. I'm using Slackware Linux 11, with official KDE 3.5.4 packages. The bug is listed as resolved, but it's a little unclear. Do I need to use a patch? I noticed that all the comments are dated before Slackware 11 was released. Has the status changed in the Slackware 11 official release? Has this issue been resolved in KDE 3.5.5?
I have exact the same problem as that described in comment #12, #14 and #16.
Just as Jakob, I have exact the same problem as that described in comment #12, #14 and #16. Could you please reopen this bug? Or else could you please explain why to leave it closed? Regards!
+QString FstabBackend::mount( const QString &_udi ) +{ + const Medium* medium = m_mediaList.findById(_udi); + if (!medium) + return i18n("No such medium: %1").arg(_udi); + KIO::Job* job = KIO::mount( false, 0, medium->deviceNode(), medium->mountPoint()); + KIO::NetAccess::synchronousRun( job, 0 ); + return QString::null; +} What if mount fails? Does this code check for errors at all?
Like in Comment #12 it works the first time I mounted a CD-ROM. After that when I had unmounted the CD-ROM and try to mount it again the CD will be mounted but not show as mounted !!