# [HOW-TO] Automounting with KDE-3.5.2 + pmount

## Raftysworld

KDE 3.5 has introduced a new mechanism for the detection of removal media.  Upon a new medium being inserted, a notification box will pop-up, yielding a list of common actions for that type of media.  It can range from a simple "Open in New Window" choice, or a "Play DVD Video in Kaffeine", depending.  It is fully configurable, and represents a leap in Linux userfriendliness.  Previous windows users in particular will find this feature extremely helpful.

Of course, there is a minimal amount of configuration involved to get it just right, and that's why I've created this guide to hopefully catch the key points.  

Enabling Automounting with KDE 

 Step 1 - Set USE Flags 

In order for automounting to commence, we must set some USE flags in /etc/make.conf to ensure that the backends are properly in place.  This includes DBUS and the HAL daemon.

```
cat /etc/make.conf

USE="arts dbus hal kde qt"

```

 Step 2 - Enabling ~arch for needed packages 

 NOTE: This guide may or may not work with the stable versions of udev, dbus and hal.  However, it has been *tested* with the unstable versions.  Feel free to give it a try with your own setup and report back results.

As this guide is designed for KDE 3.5, and 3.5 remains in the unstable branch of portage, we must be sure that it and all needed packages are located in /etc/portage/package.keywords.  This section does NOT apply if you are running ~arch globally (ACCEPT_KEYWORDS="~x86" in make.conf).  There are many packages to unmask in this manner, so we'll use a simple bash script to accomplish the job.

```
   # cd /usr/portage  # or wherever your PORTAGE_DIR is

  > for x in kde-*/*

  > do

  >    echo "<=${x}-3.5.3 ~<arch>" >> /etc/portage/package.keywords

  > done

```

Of course, replace ~<arch> with the architecture for your system.  We also must unmask some unstable versions of KDE's dependencies.  Add the following lines to your /etc/portage/package.keywords file:

 *Quote:*   

> ~sys-fs/udev-079 ~<arch>
> 
> ~sys-apps/dbus-0.50 ~<arch>
> 
> ~sys-apps/hal-0.5.5.1 ~<arch>
> ...

 

This ensures that the unstable versions of the required packages are merged, but no future unstable versions are merged, ensuring compatibility when updates are released.  If you would prefer less recent but more tested versions of the packages, you can simply add

 *Quote:*   

> ~sys-apps/hal-0.47 ~<arch>
> 
> ~sys-apps/dbus-0.36.2 ~<arch>
> 
> sys-apps/pmount ~<arch>
> ...

 

 Step 3 - (Re)merging KDE 

Assuming KDE is already installed on your system, you must now rebuild the needed packages to provide support for dbus and hal.  The best way to accomplish this is to simply run

```
emerge -uDNav world
```

Upon completion, the packages will have been rebuilt, and dbus and hal will be merged.  If this is a new installation, simply set your USE flags as described in step 1, then emerge kde-meta (for the split ebuilds) or emerge kde (for the monolithic ebuilds).  You can also emerge kdebase-startkde for a minimalistic environment, however this will not provide you with the needed funcitonality for this guide to work.  You must at least emerge konqueror following that.

 Step 4 - Services and pmount 

Now that your KDE installation is installed as required, we must start the services required.  Begin by ensuring that you now have the following packages installed:  (If you have elected for the more stable versions of packages, the version numbering will look slightly different)

```
# emerge -pv udev dbus hal pmount

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild   R   ] sys-fs/udev-079  0 kB

[ebuild   R   ] sys-apps/dbus-0.50-r2  USE="+X -debug -doc -gcj -gtk -mono +python +qt +xml2" 0 kB

[ebuild   R   ] sys-apps/hal-0.5.5.1-r1  USE="+acpi -debug -doc -pam_console -pcmcia" 0 kB

[ebuild   R   ] sys-apps/pmount-0.9.6  USE="+crypt" 0 kB

Total size of downloads: 0 kB
```

The USE flags can vary, but that's the general idea.  The next thing we must do is add these services to the default runlevel:

```
rc-update add dbus default

rc-update add hald default
```

 Step 5 - Add User to Required Groups

Your user must be in the plugdev group for automounting to function as required.

```
gpasswd -a <USER> plugdev
```

 Step 6 - Reboot and touchup 

Now reboot your computer, login to KDE, ensure that the default settings remain in the KControl Center in Peripherals -> Storage Media.  Finally, choose Desktop -> Behavior -> Device Icons and check the Show Device Icons checkbox.  Apply the settings, and you're good to go.  If all goes well, you should now be able to plug in a disc, (be it floppy, cdrom, or USB) and have it immediately recognized by KDE.  You don't even need fstab entries!

 Step 6.1 - Ivman and its role 

Ivman is a tool used for the automounting of removal media.  Upon insertion, the device will be automatically mounted in the /media directory.  However, in order to constrain this topic to the point (the ability to mount and unmount with the kde 3.5 dialogue notification), we ask for you to take questions about ivman and its role to another thread, such as This Thread.  For some more info on ivman and its setup, take a look at this Gentoo-Wiki Post

I hope this guide was of some help, as I see there were many problems getting this to work correctly for some users.

----------

## Headrush

I'm sure this will help some people. A of couple suggestions/points.

1. I don't think the user needs to be in the haldaemon group.

2. Maybe setting the minimum unstable version needed for hal, dbus, and udev for KDE 3.5 would be a better idea. Having it ~arch for all unstable versions might be OK for people with experience, but a lot of noobies will follow this and this could led to a lot more problems or issues. (Look at all the issues in the udev 07X series)

----------

## Raftysworld

 *Headrush wrote:*   

> I'm sure this will help some people. A of couple suggestions/points.
> 
> 1. I don't think the user needs to be in the haldaemon group.
> 
> 2. Maybe setting the minimum unstable version needed for hal, dbus, and udev for KDE 3.5 would be a better idea. Having it ~arch for all unstable versions might be OK for people with experience, but a lot of noobies will follow this and this could led to a lot more problems or issues. (Look at all the issues in the udev 07X series)

 

1)  Guide updated to reflect that change

2) The problem is that I'm not completely sure of the minimum versions required, I know simply that the udev 073 series didnt work, but the update to 077 fixed those problems.  I'll do some testing/forum surfing and hopefully find out..

----------

## Headrush

I can verify that it worked fine with these versions:

```
udev-070-r1 (stable)

hal-0.47-r2

dbus-0.36.2

pmount-0.96
```

Newer versions may or may not be better. (I know there were a lot of issues in the 0.71 to 0.77-rX range of udev.)

----------

## lovedaddy

Just a quick questio, how does Ivman fit into all this?  I was wanting to setup automounting but do it so that it would work at the command line too.  Would it be possible to have one solution that fits all?

----------

## Headrush

 *lovedaddy wrote:*   

> Just a quick questio, how does Ivman fit into all this?  I was wanting to setup automounting but do it so that it would work at the command line too.  Would it be possible to have one solution that fits all?

 

I don't know, but there are several threads already about ivman. (Turning off storage media in kcontrol is probably a good start)

I would suggest avoiding talking about ivman in this thread since this is where users tend to end up with problems.

They start trying all the different automount methods (gvm, ivman, pmount), and then they start having problems.

----------

## Raftysworld

Ivman is not required since KDE-3.5, pmount and the new notification dialog render it useless in this setup, as the devices are mounted upon your selection in the notification.  Ivman would actually conflict with this setup.  Setting it up at the command line doesn't really go along with this guide, so I'd suggest some other solution be found because this is specifically designed for KDE and the graphical aspect.

----------

## nunogt

Thank you Raftysworld, this is a quite informative tip  :Smile: 

Will try it soon.

----------

## PhanLord

for some reason kde 3.5 on ym ssystem si still trying to mount using mount and fstab-syjnc even though that is nto available anymore

message is unable to mount /dev/sdg1, not found in fstab or mtab

any idea what could that be ?

----------

## Raftysworld

What version of udev are you using?

----------

## PhanLord

right now udev-79 update from udev-71 (did not work with 71 so i put 79 to see if that is going to help)

this is the exact message from kde (doesnt look like its using pmount)

Could not mount device.

The reported error was:

mount: can't find /dev/sdg1 in /etc/fstab or /etc/mtab

Portage 2.0.53 (default-linux/amd64/2005.0, gcc-3.4.4, glibc-2.3.5-r3, 2.6.14-gentoo-r5 x86_64)

=================================================================

System uname: 2.6.14-gentoo-r5 x86_64 AMD Athlon(tm) 64 Processor 3400+

Gentoo Base System version 1.12.0_pre9

distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]

dev-lang/python:     2.3.5, 2.4.2

sys-apps/sandbox:    1.2.17

sys-devel/autoconf:  2.13, 2.59-r7

sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1

sys-devel/binutils:  2.16.1-r1

sys-devel/libtool:   1.5.22

virtual/os-headers:  2.6.11-r3

ACCEPT_KEYWORDS="amd64 ~amd64"

AUTOCLEAN="yes"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-O2 -march=athlon64 -fomit-frame-pointer -momit-leaf-frame-pointer -fweb -frename-registers -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /etc/tomcat5 /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib64/mozilla/defaults/pref /usr/share/config /var/qmail/control"

CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d"

CXXFLAGS="-O2 -march=athlon64 -fomit-frame-pointer -momit-leaf-frame-pointer -fweb -frename-registers -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="autoconfig distlocks sandbox sfperms strict"

GENTOO_MIRRORS="http://open-systems.ufl.edu/mirrors/gentoo http://mirror.tucdemonic.org/gentoo/ ftp://mirrors.tds.net/gentoo http://adelie.polymtl.ca/"

LANG="en_US.utf8"

LC_ALL="en_US.utf8"

MAKEOPTS="-j2"

PKGDIR="/usr/portage/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY="/usr/local/portage"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="amd64 X a52 aac aalib acl acpi adns alsa apache2 audiofile avi bash-completion berkdb bitmap-fonts bonobo bzip2 canvas cdda cdparanoia cdr cli crypt cups curl daap dba dbus divx4linux dts dvb dvd dvdr dvdread eds emboss encode esd exif expat faad fam ffmpeg firefox flac foomaticdb fortran freetype gcj gd gdbm gif gimpprint glitz glut gmail gmailtimestamps gmp gnome gnutls gstreamer gtk gtk2 gtkhtml guile hal httpd icq id3 idn imagemagick imap imlib ipv6 java joystick jp2k jpeg jpeg2k junit kde kdeenablefinal kqemu lame lcms libcaca libg++ libwww lirc live lzw lzw-tiff mad matroska mhash mikmod mime mng mod motif mozdevelop mozilla mozsvg mozxmlterm mp3 mp4live mpeg mpeg2 mplayer msn musicbrainz nas ncurses net network nls no_wxgtk1 nptl nptlonly nsplugin nvidia odbc ogg oggvorbis openal opengl oscar pam pcre pdflib pear perl php player png postgres ppds python qt quicktime rar readline real rtc ruby samba sasl scanner screen sdl server shout skins speex spell sqlite ssl stream subtitles svg tcltk tcpd tetex theora threads tiff truetype truetype-fonts type1-fonts udev unicode usb userlocales v4l v4l2 vcd vlm vorbis vorbisi wmf wxwindows xanim xine xinerama xml xml2 xmms xosd xpm xprint xv xvid xvmc yahoo zlib userland_GNU kernel_linux elibc_glibc"

Unset:  ASFLAGS, CTARGET, LDFLAGS, LINGUAS

----------

## Benson

Many thanks for clearing things up - it is working on my machine now without problems. What a christmas gift*   :Wink: 

 *Quote:*   

> udev-079
> 
> hal-0.5.5.1-r1
> 
> dbus-0.50-r2
> ...

 

@PhanLord: I first had this problem too, but only because i forgot to add myself to the plugdev group (see step 5 of this guide).

cheers,

Benson

----------

## PhanLord

im in plugdev group  :Sad:  and stil doesnt work i reverted back to udev -071 cause 79 doesnt seasm to recognize my devices correctly  :Sad: 

however kde still doesn use pmount but trying to mount using fstab  :Sad: 

----------

## Headrush

 *PhanLord wrote:*   

> im in plugdev group  and stil doesnt work i reverted back to udev -071 cause 79 doesnt seasm to recognize my devices correctly 
> 
> however kde still doesn use pmount but trying to mount using fstab 

 

My guess is you have some links in /etc/hal/device.d/ that weren't deleted. You should be able to delete the inner most directory.

(Delete /etc/hal/device.d)

----------

## PhanLord

nope io dont have device.d  :Sad:  i have deleted it 2-3 versions ago  :Sad: 

----------

## Raftysworld

Well all I know is that I had the exact problem and it took the udev update to fix it... I'm kind of shooting in the dark at this point, but I assume that after you added your user to the plugdev group, you logged out and then back in at least once?  Can you test it as root to see if the problem persists?  At least that might help us narrow the focus.

Also please post the output of `emerge -pv udev dbus hal pmount`

----------

## PhanLord

Ill test it as root tonight,

emerge -pv udev dbus hal pmount

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild     U ] sys-fs/udev-079 [071] (-selinux) 0 kB 

[ebuild   R   ] sys-apps/dbus-0.50-r2  +X -debug -doc +gtk (-mono) +python +qt +xml2 1,572 kB 

[ebuild   R   ] sys-apps/hal-0.5.5.1-r1  +acpi -debug -doc -pam_console -pcmcia 1,482 kB 

[ebuild   R   ] sys-apps/pmount-0.9.6  +crypt 0 kB 

i reverted back to 71 cause 79 doesnt even create device nodes, and devices dont even show up in a list

(for me)

----------

## Headrush

Maybe there is some leftover files from when you did have fstab-sync.

Is there any output from

```
find / -iname fstab*
```

----------

## PhanLord

-=[root@amon]=->find / -iname fstab*

find: /proc/14694/task/14694/fd/5: No such file or directory

find: /proc/14694/fd/5: No such file or directory

/etc/fstab

/usr/include/fstab.h

/usr/include/gentoo-multilib/x86/fstab.h

/usr/include/gentoo-multilib/amd64/fstab.h

/usr/lib64/perl5/site_perl/5.8.7/x86_64-linux/fstab.ph

/usr/lib64/mupad/packages/scilab/linux/Scilab/macros/robust/fstabst.bin

/usr/lib64/mupad/packages/scilab/linux/Scilab/macros/robust/fstabst.sci

/usr/lib64/mupad/packages/scilab/linux/Scilab/man/robust/fstabst.cat

/usr/lib64/mupad/packages/scilab/linux/Scilab/man/robust/fstabst.man

/usr/lib64/transgaming_cedega/fstab.py

/usr/share/man/man5/fstab.5.gz

/usr/share/doc/busybox-1.01/bootfloppy/fstab.gz

/usr/share/doc/util-linux-2.12r-r2/examples/fstab.gz

/usr/share/vim/vim64/syntax/fstab.vim

/usr/share/xfce4/doc/C/images/fstab_popup_mount.png

/usr/share/xfce4/doc/C/images/fstab_popup_unmount.png

/usr/share/xfce4/doc/fr/images/fstab_popup_mount.png

/usr/share/xfce4/doc/he/images/fstab_popup_mount.png

/usr/share/baselayout/fstab

/usr/kde/3.5/share/apps/katepart/syntax/fstab.xml

/usr/mips-unknown-linux-gnu/include/fstab.h

/home/crossdev/mips/mips-unknown-linux-gnu/sys-include/fstab.h

nothing that could cause this crap (IMHO)

----------

## Headrush

Only other thing I can think of right now, is recompile kdebase-kioslaves making sure hal USE flag is set.

----------

## PhanLord

already recompiled kdebase and kdelibs just to be on a safe side  :Sad: 

did not help

ill check in a few is i working under root

----------

## knizek

 *Headrush wrote:*   

>  *lovedaddy wrote:*   Just a quick questio, how does Ivman fit into all this?  I was wanting to setup automounting but do it so that it would work at the command line too.  Would it be possible to have one solution that fits all? 
> 
> I don't know, but there are several threads already about ivman. (Turning off storage media in kcontrol is probably a good start)
> 
> I would suggest avoiding talking about ivman in this thread since this is where users tend to end up with problems.
> ...

 

Actually, you could use both ivman and kde automounting together. I had issues with kde automounting usb storage devices as /media/sda1, /media/sdb1, etc, which is really not what I expect from my desktop computer. Hence, I setup ivman to start (it uses pmount, too) when I login to kde.

Now, when I plug in a usb stick, ivman mounts it to /media/usbdisk or whatever userfriendly name (and always the same!) and kde pops up a window. After confirming kde pop-up window, kde does not try to mount the usb stick again and it works. Alternatively, I could switch off kde media notifier, however I like it asking me to open the file browser for the new device. I am also able to use kde's unmount option while right-clicking on the desktop icon of the device.

----------

## Raftysworld

My preferred behavior (and as such, the preferred behavior of this guide) is that the device only be mounted if we choose to open it.  But I did not know that Ivman uses pmount and can be so easily integrated with this setup, thanks for the info.

----------

## Headrush

 *knizek wrote:*   

> Actually, you could use both ivman and kde automounting together. I had issues with kde automounting usb storage devices as /media/sda1, /media/sdb1, etc, which is really not what I expect from my desktop computer. Hence, I setup ivman to start (it uses pmount, too) when I login to kde.

 

I realize that, but I was suggesting keeping it simple. 

Let noobies get this working first, then they can move to ivamn if they need to.

These threads get so convoluted so fast, and I think gives the wrong suggestion that KDE requires ivman.

Maybe Raftysworld could add to the end of his tutorial that if you want to add ivman support..., and then give a link to a new thread that takes over explaining ivman support/features etc. This way we keep things separate. Ivman questions/responses will be in that thread and plain KDE automounting questions/responses will stay in this thread.

----------

## Raftysworld

 *Headrush wrote:*   

> 
> 
> Maybe Raftysworld could add to the end of his tutorial that if you want to add ivman support..., and then give a link to a new thread that takes over explaining ivman support/features etc. This way we keep things separate. Ivman questions/responses will be in that thread and plain KDE automounting questions/responses will stay in this thread.

 

Sounds like a plan   :Smile: 

----------

## metalfan

deleted by user

----------

## Headrush

 *metalfan wrote:*   

> hi,
> 
> kdes automounting works on my machine, i wonder if you could modify it this way:
> 
> 1. create the dirs for cd drive/usb stick in /mnt/ everytime the device is used, so you dont have x dirs around that are useless.

 

pmount makes directories in /media and removes them after devices are unplugged.

 *metalfan wrote:*   

> 2. a uitlity that reflects the current state of all plugable devices, for example kwikdisk. on my system it displays quite some entries that arent connected at the moment *confusing*

 

This thread is about KDE and system:/media in konqueror does just that.

Am I misunderstanding you?

----------

## metalfan

again, my fault

deleted by user

----------

## Headrush

 *metalfan wrote:*   

> well in my case it displays "unmounted" for just everything:

 

Look in Kcontrol -> Desktop -> Behavior -> Device Icons and turn off the ones you don't want for unmounted types.

 *metalfan wrote:*   

> if i remove the fstab entry how should kde know about any options i like to use like.
> 
> noauto,rw,users,noatime   ?

 

Probably the only option you might change for this types of media is the sync option. These things can be set through hal device files.

(Check other threads, defaults should be good for most average users)

----------

## Bjosch

Hi, when I try to insert all kde builds into package.keywords with the above mentioned script I get only a lot of "~ppc" into the file and after the command in the shell lots of 

 *Quote:*   

> bash: x: command not found

 

Where is the error? Do I have to do something before?

----------

## nunogt

Hey guys, I confirm this is working with the latest stable x86 baselayout and udev, marked stable earlier today. I'm using the following versions and USE flags:

 *Quote:*   

> [ebuild   R   ] sys-fs/udev-079  (-selinux) 0 kB
> 
> [ebuild   R   ] sys-apps/hal-0.5.5.1-r3  +acpi -debug -doc -pam_console -pcmcia (-selinux) 0 kB
> 
> [ebuild   R   ] sys-apps/dbus-0.50-r2  +X -debug -doc -gtk -mono +python +qt +xml2 0 kB
> ...

 

It feels great to have such an handy feature in KDE.

----------

## Headrush

 *Bjosch wrote:*   

> Hi, when I try to insert all kde builds into package.keywords with the above mentioned script I get only a lot of "~ppc" into the file and after the command in the shell lots of 
> 
>  *Quote:*   bash: x: command not found 
> 
> Where is the error? Do I have to do something before?

 

You weren't in /usr/portage when you executed the command.

----------

## Bjosch

Indeed, thank you Headrush. In another thread someone helped me yet, so the problem is solved. Thanks.

----------

## MadEgg

I've got a problem with the automounting of floppys.

media:/ displays a 'Floppy Drive' entry, and when I click it the floppy drive is actually mounted on /media/floppy_o by pmount, but KDE doesn't seem to realize this. It keeps saying it's not mounted and tries to mount it again, which of course fails because according to /etc/mtab the floppy drive is actually mounted.

When I double click on the floppy drive icon, a new window opens on media:/0, I think that's quite weird, shouldn't it be something like media:/floppy_0 ? Anyway, the window does open but it stays emtpy, even though when I point konqueror to /media/floppy_0 it does display the files on the floppy.

So somehow KDE does mount the floppy but doesn't realize that it succeeded in doing that! Any clue on how to fix this?

----------

## MadEgg

Hmm, somehow it doesn't work very well at all anymore. I inserted an blank DVD +R into my DVD-writer today and that was correctly recognized, but later I ejected it and now KDE still says it's there. It doesn't change, not when there's nothing at all in the drive, not when I put an official data DVD/CD in there, not when I put an audio CD in there, never.

My second DVD-drive isn't showing up at all. I tried disabling the HAL-backend in kcontrol but that gives me a kcrash dialog saying 'kded' crashed. Enabling it again gives me the same message. Enabling/disabling the  'CD Polling' option has the same effect...

----------

## nunogt

I'm having problems getting this to work with the latest stable dbus-0.60-r3. I had recompile hal and kdeioslaves after emerging the new dbus. KDE doesn't complain, but doesn't detect any events either. Anyone got this working?

----------

## Guinpen

This seems like excellent functionality! Thanks!

Unfortunately, after following the instructions and rebooting to make sure I AM in the plugdev group, I am still only able to mount things readonly. I tried it on a VFAT formatted USB stick that I can mount in read-write more as root. After telling KDE to open a new window, I type 'mount' to see what's going on:

```
/dev/sda on /media/sda type vfat (ro,noexec,nosuid,nodev,quiet,shortname=winnt,uid=1000,gid=100,umask=077)
```

How can I tell it to mount rw? In general, how do I change any of the mount options? Thanks!

----------

## MadEgg

I finally got a decent backtrace from kded:

```

[KCrash handler]

#4  0xb7459727 in QGDict::unlink_int () from /usr/qt/3/lib/libqt-mt.so.3

#5  0xb7459af1 in QGDict::take_int () from /usr/qt/3/lib/libqt-mt.so.3

#6  0xb6787966 in DBusQt::Internal::Integrator::removeWatch ()

   from /usr/lib/libdbus-qt-1.so.1

#7  0xb6786c6a in DBusQt::Internal::dbusRemoveWatch ()

   from /usr/lib/libdbus-qt-1.so.1

#8  0xb66c882e in dbus_watch_handle () from /usr/lib/libdbus-1.so.2

#9  0xb66c6e4f in dbus_threads_init () from /usr/lib/libdbus-1.so.2

#10 0xb66b5de3 in dbus_connection_set_watch_functions ()

   from /usr/lib/libdbus-1.so.2

#11 0xb678724d in DBusQt::Internal::Integrator::Integrator ()

   from /usr/lib/libdbus-qt-1.so.1

#12 0xb6785e4e in DBusQt::Connection::Private::setConnection ()

   from /usr/lib/libdbus-qt-1.so.1

#13 0xb67866c7 in DBusQt::Connection::dbus_connection_setup_with_qt_main ()

   from /usr/lib/libdbus-qt-1.so.1

#14 0xb674bd7d in HALBackend::MainLoopIntegration ()

   from /usr/kde/3.5/lib/kde3/kded_mediamanager.so

#15 0xb674b1cc in HALBackend::InitHal ()

   from /usr/kde/3.5/lib/kde3/kded_mediamanager.so

#16 0xb67345b4 in MediaManager::loadBackends ()

   from /usr/kde/3.5/lib/kde3/kded_mediamanager.so

#17 0xb67354f6 in MediaManager::qt_invoke ()

   from /usr/kde/3.5/lib/kde3/kded_mediamanager.so

#18 0xb71bce15 in QObject::activate_signal () from /usr/qt/3/lib/libqt-mt.so.3

#19 0xb74dc979 in QSignal::signal () from /usr/qt/3/lib/libqt-mt.so.3

#20 0xb71d5b19 in QSignal::activate () from /usr/qt/3/lib/libqt-mt.so.3

#21 0xb71dcce7 in QSingleShotTimer::event () from /usr/qt/3/lib/libqt-mt.so.3

#22 0xb71650d0 in QApplication::internalNotify ()

   from /usr/qt/3/lib/libqt-mt.so.3

#23 0xb7164486 in QApplication::notify () from /usr/qt/3/lib/libqt-mt.so.3

#24 0xb77a3952 in KApplication::notify ()

   from /usr/kde/3.5/lib/libkdecore.so.4

#25 0xb71552bb in QEventLoop::activateTimers ()

   from /usr/qt/3/lib/libqt-mt.so.3

#26 0xb7111f3b in QEventLoop::processEvents ()

   from /usr/qt/3/lib/libqt-mt.so.3

#27 0xb71765cc in QEventLoop::enterLoop () from /usr/qt/3/lib/libqt-mt.so.3

#28 0xb717648e in QEventLoop::exec () from /usr/qt/3/lib/libqt-mt.so.3

#29 0xb71652db in QApplication::exec () from /usr/qt/3/lib/libqt-mt.so.3

#30 0xb7f94622 in kdemain () from /usr/kde/3.5/lib/libkdeinit_kded.so

#31 0x0804872f in ?? ()

#32 0x00000001 in ?? ()

#33 0xbfbae0c4 in ?? ()

#34 0xbfbae098 in ?? ()

#35 0xb697d09a in __libc_start_main () from /lib/tls/libc.so.6

#36 0xb697d09a in __libc_start_main () from /lib/tls/libc.so.6

#37 0x08048671 in ?? ()

```

But I still don't know what I can do about it. 

I tried dbus-monitor --system, but there aren't any messages popping up there when I insert a CD, but that does happen when I plug my iPod in. But the CD polling isn't really dbus related, or is it? Because I can disable it separately in kcontrol.

I also tried running hald on the command line in verbose mode, and there no messages appear either whenever I open or close the CD tray... so somewhere something is not right, but where?

----------

## mthayer

Hello everyone - a question: does anyone know the official status of traditional PC floppy drives with the latest stable version of dbus, hal, udev, pmount, kdebase-kioslaves and ivman?  In this configuration CDs, DVDs, USB sticks and a USB floppy drive work fine, but when I insert a floppy into the legacy floppy drive it does not even hum.  Konqueror's "media:/" does not list the floppy, but floppy:/ accesses it (via mtools).  Thanks a lot!

----------

## Headrush

 *mthayer wrote:*   

> Hello everyone - a question: does anyone know the official status of traditional PC floppy drives with the latest stable version of dbus, hal, udev, pmount, kdebase-kioslaves and ivman?  In this configuration CDs, DVDs, USB sticks and a USB floppy drive work fine, but when I insert a floppy into the legacy floppy drive it does not even hum.  Konqueror's "media:/" does not list the floppy, but floppy:/ accesses it (via mtools).  Thanks a lot!

 

This is just like other OSes. Legacy floppy drive don't send events when a disk is inserted removed.

(Not like the old Macs with auto-insert)

The only way to overcome this hardware limitation is to poll the floppy drive, which we don't want to do. (too time consuming with floppies)

So your best option is to have KDE place an icon for unmounted Floppy on your desktop and right-click mount or double click the icon as needed to mount or open and read.

----------

## mthayer

Thanks for the answer!  I wonder though, is it such a big thing?  I thought that the floppy controller had a bit (readable by ioctl) which said whether or not the disk had been changed/inserted/removed since the last poll.  Would it be so bad to check this every two seconds?  And how would one do this?  If I understood correctly how dbus works, one could write a little daemon which polls and sends a message, but I don't know if that would be the best way.  OTOH, if it is something that people don't want to include by default (and if it does work that way) that might do the trick.

----------

## adam_z

Sorry for my english.

In KDE 3.3.2 -> When i go in DEVICES i have got a list of all devices (like HD, FD, CDROMS, DVDROM, ...).

Now i have KDE-3.4.3.

When i try to go in DEVICES i have an error: "Protocol not supported. Devices".

Can anyone hel me?

Thanks in advance.Last edited by adam_z on Wed Feb 22, 2006 5:32 pm; edited 2 times in total

----------

## Headrush

 *mthayer wrote:*   

> Thanks for the answer!  I wonder though, is it such a big thing?  I thought that the floppy controller had a bit (readable by ioctl) which said whether or not the disk had been changed/inserted/removed since the last poll.  Would it be so bad to check this every two seconds?  And how would one do this?  If I understood correctly how dbus works, one could write a little daemon which polls and sends a message, but I don't know if that would be the best way.  OTOH, if it is something that people don't want to include by default (and if it does work that way) that might do the trick.

 

I removed my floppy a while back, but I wouldn't want my floppy drive to be polled like that for a couple reasons:Polling floppies takes longer.

Seeing the light flashing all the time would bother me. (Little things annoy you when you get older  :Smile:  )

Some floppy drives are just plan too noisy, especially when polling and no disk is present.Like you said, you could write a small daemon that polls using that readable bit with ioctl and then add an event message using hal, or even a kdcop call to media manager or something like that.

That the developers haven't added that ability even as an option leads me to believe there is more too it than that.

----------

## sound-mind

 *Headrush wrote:*   

> Only other thing I can think of right now, is recompile kdebase-kioslaves making sure hal USE flag is set.

 

Thanks for the info everyone. I was having problems like PhanLord above.  Everything seemed to be installed properly. Turns out I had updated dbus and not run revdep-rebuild. pmount was linked against a library that no longer existed. All I had to do was re-merge pmount and everything works great  :Smile: 

Works fine with these:

```

emerge -pv udev dbus hal pmount

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild   R   ] sys-fs/udev-084 +selinux 0 kB

[ebuild   R   ] sys-apps/dbus-0.60-r4  +X -debug -doc -gcj +gtk +mono +python +qt +selinux +xml2 0 kB

[ebuild   R   ] sys-apps/hal-0.5.5.1-r3  +acpi -debug -doc +pam_console +pcmcia +selinux 1,482 kB

[ebuild   R   ] sys-apps/pmount-0.9.6  +crypt 0 kB

```

----------

## Desintegr

I have reemerged theses packages is this order :

emerge -pv baselayout udev dbus hal pmount kdebase

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild   R   ] sys-apps/baselayout-1.11.14-r6  USE="unicode -bootstrap -build -static" 155 kB

[ebuild   R   ] sys-fs/udev-086  0 kB

[ebuild   R   ] sys-apps/dbus-0.60-r4  USE="X gtk mono python qt xml2 -debug -doc -gcj" 0 kB

[ebuild   R   ] sys-apps/hal-0.5.5.1-r3  USE="acpi -pam_console -debug -doc -pcmcia" 0 kB

[ebuild   R   ] sys-apps/pmount-0.9.6  USE="crypt" 0 kB

[ebuild   R   ] kde-base/kdebase-3.5.1-r3  USE="cups hal java kdeenablefinal opengl pam samba ssl xcomposite -arts -debug -ieee1394 -ldap -lm_sensors -logitech-mouse -openexr -xinerama -xscreensaver -zeroconf" 0 kB

But « media: » kio-slave isn't working correctly, again, again, again and again.....

1) : /dev/sda5 appears unmounted. It's wrong : it is mounted as /

Devices states are wrong (mounted/unmounted).

2) : my USB key is not automatically mounted, but it appears in « media: ». Then I click on the icon, it's mounted in /media/sdb1, but nothing appears in media:/dev/sdb1

If I click again on the icon, I get an error : Unable to mount device, according to /etc/mtab /dev/sdb1 is already mounted on /media/sdb1 (approximative translation)

3) : same problems as 2) with data CDs and DVDs

Is there any solution to have correct devices states (mounted/unmounted) ?

A solution to have working mounting/unmounting and content displaying in « media: » kio-slave ?

What can I do ?

----------

## joefish

All of the dependencies needed for this are now marked as stable (apart from the KDE packages).

A couple more tips:

One of the dependencies that was emerged on my system was 'cytpsetup-luks'. Before compiling, I got the following message:

```
 * cryptsetup requires dm-crypt support!

 * Please enable dm-crypt support in your kernel config, found at:

 * (for 2.6 kernels)

 *

 *   Device Drivers

 *     Multi-Device Support

 *       Device mapper support

 *         [*] Crypt Target Support

 *

 * and recompile your kernel if you want this package to work with this kernel
```

However this is not necessary for this howto to work.

Also, if you've already got the right version of KDE on your system, you don't need to re-emerge all of kde-base (assuming you're using the split ebuilds). On my system, I only had to re-emerge kdebase-kioslaves.

Thanks for the tutorial, it was just what I was looking for  :Smile: 

----------

## hvengel

I made a little change to the script to update package.keywords to limit the ~arch packages to only those currently needed.

```
 # cd /usr/portage  # or wherever your PORTAGE_DIR is

  > for x in kde-*/*

  > do

  >    echo "<=${x}-3.5.2 ~<arch>" >> /etc/portage/package.keywords

  > done 
```

I found that when I ran emerge world that it compained about a few packages that were masked as there were a few that were -3.5.2-r1 or -3.5.2-r2 but once that was fixed the KDE stuff emerged fine.  By doing this you will freeze the KDE versions until such time that later versions are marked stable.  Makes things a little cleaner since I like to run as much stuff as possible from the stable branch.

----------

## Raftysworld

Thanks, and I agree with your change, however the problem is remedied if the "<" atom is used, so I'll update the guide to reflect the change.    :Smile: 

----------

