You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Wednesday, February 21st 2007, 12:20pm

USB device autodetect in KDE

hello,

I would like to know how to display the window that appears in KDE when a USB stick is inserted. So far, I know it is related with KDE daemon, HAL daemon, D-Bus, udev and hotplug, but I was not able to find the final call that is made to display this window.

Does any of you know how it is done or where/how I could find this information?

Any help would be much appreciated.

2

Wednesday, February 21st 2007, 1:55pm

RE: USB device autodetect in KDE

I discovered that it is the kde media notifier daemon that is responsible of the display of this window. I took a look to the sources, and from that I don't see how I could display this window.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
cat /usr/share/services/kded/medianotifier.desktop
[Desktop Entry]
Encoding=UTF-8
Type=Service
ServiceTypes=KDEDModule
X-KDE-ModuleType=Library
X-KDE-Library=medianotifier
X-KDE-FactoryName=medianotifier
X-KDE-Kded-autoload=true
X-KDE-Kded-load-on-demand=false
Name=Media Notifier Daemon
...


Is it possible to do it?

3

Monday, February 26th 2007, 9:28am

No idea or direction ?

Thanks

dkaddict

Beginner

Posts: 7

Location: London UK

Occupation: loafer

  • Send private message

4

Wednesday, March 7th 2007, 10:20am

re usb

What 'window' are you talking about?

The device should be accessible in the 'storage media' folder if it has been plugged, detected, and mounted.

Elaborate on your what you are looking for-it may help.

dkaddict
As long as it is linux it's ok

5

Wednesday, March 7th 2007, 12:53pm

I am talking about the only window that pops up when you insert a USB stick (it's the same as the one for CDs, ...).

You might not have seen it if your KDE's version is a bit old. I think it appeared with the 3.5.X.

Here it is: (for a cd, but it's the same in the case of a usb device)



I was hoping that some shell command could allow to display that window (whenever I need it). I was able to find the cpp file that handle this window on the kde-base repository, but this does not tell me how I could display it.

So maybe someone here could bring me some lights on that matter...

I hope it is more clear now.

Thanks anyway.

This post has been edited 1 times, last edit by "lorisb" (Mar 7th 2007, 12:56pm)


dkaddict

Beginner

Posts: 7

Location: London UK

Occupation: loafer

  • Send private message

6

Thursday, March 8th 2007, 10:09am

re SMN window

Ok I get you. It is refered to as the SMN, Storage Media Notification window. I can get to configuring it via-

Control Centre>Peripherals>Storage Media

and once in there I can tell it what to display, ie, 'do nothing', 'play media with caffeine' etc etc.

Does that help?

You are able to choose from different mime types and stuff like that.
I haven't tried myself but I think you can customize it to display different options for different types of removable media?
For example, I found this on the Ubuntu forums (always a good place to look for how2s etc I reckon)

http://www.ubuntuforums.org/showthread.p…ia+Notification

There are ways to alter the default behaviour, I'm sure of that, it is Linux, after all.

Anyway, I hope that this at least helps a little bit. If not, good luck.

dkaddict 8)
As long as it is linux it's ok

This post has been edited 1 times, last edit by "dkaddict" (Mar 8th 2007, 10:15am)