Post details: Automounting under KDE - without ivman

Mon, 27 Mar 2006

Permalink 02:09:28 pm, Categories: Frugal, Posted by: Csécsy László

Automounting under KDE - without ivman

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.)

Comments:

Comment from: alex [Member] · http://www.tuxtalk.org
Just a note: GNOME doesn't use ivman, it has it's own system (gnome-volume-manager)
Permalink Mon, 27 Mar 2006 @ 17:45

Leave a comment:

Your email address will not be displayed on this site.
Your URL will be displayed.
Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>
Options:
 
(Line breaks become <br />)
(Set cookies for name, email & url)

authimage

Developers' Blogs: boobaa

July 2008
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      

Search

Categories


Syndicate this blog XML

powered by
Frugalware Linux
the site is valid!
Valid XHTML 1.0!
Valid CSS!
Valid RSS!