Target: When one inserts a DVD, it should be automatically - without any question, popup spam and other annoying effects - mounted under /media. Requirements: kdebase package (the rest will be pulled in by kdebase).
Under GNOME, ivman handles this function (if it does anything, besides writing to stderr). When you insert a media, KDE displays a window: "Open in new window" or "Don't do anything". The first is obviously not ok, the sencond does not mount at all. Let's start hacking...
Create the file named ~/.kde/share/config/medianotifierrc with the following content (this will ensure the automatism; unfortunatelly you can't use ~ in the path):
[Auto Actions] media/dvd_unmounted=#Service:/home/boobaa/.kde/share/apps/konqueror/servicemenus/PMount_this_stuff.desktop
Then create the file named ~/.kde/share/apps/konqueror/servicemenus/PMount_this_stuff.desktop with the following content (this links the DVD insert event with the script):
[Desktop Action PMount this stuff] Exec=~/bin/mypmo %u Icon=button_cancel Name=PMount this stuff [Desktop Entry] Actions=PMount this stuff ServiceTypes=media/dvd_unmounted
Finally create the script named ~/bin/mypmo with rights 0700:
#!/bin/bash pmount `echo $1 | sed 's|.*media/\(.*\)|\1|'`
This script is necessary because kded uses the parameter format system:/media/hdc, and pmount won't like that.
(Thanks for VMiklos translating the original post from Hungarian.)
| Mon | Tue | Wed | Thu | Fri | Sat | Sun |
|---|---|---|---|---|---|---|
| << < | > >> | |||||
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 | |||