This forum has been archived. All content is frozen. Please use KDE Discuss instead.

A daemon for KDE

Tags: None
(comma "," separated)
User avatar
leonel06033
Registered Member
Posts
7
Karma
0
OS

A daemon for KDE

Sat Nov 13, 2010 2:53 am
Hi friends:

Well, I want to create a daemon, who get up when the system start, and in a moment of the time get up an application for a user's desktop, I do not know if a daemon can get up an application for a desktop environment (KDE) from the background. If this is not possible my question would be, how can I create a daemon for KDE?.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: A daemon for KDE

Sun Nov 14, 2010 6:38 am
Are you trying to autostart an application or provide a background service for a frontend application?

If the task is fairly light ( such as disk space monitoring warnings, etc ) then you probably wish to investigate a KDEDModule.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
leonel06033
Registered Member
Posts
7
Karma
0
OS

Re: A daemon for KDE

Sun Nov 14, 2010 9:01 pm
Well my friend, yes, I'm trying that a daemon that I create startup and application of KDE, a application that have a UI, how can I do that.

And I'll like that if is possible that you provide me some guide, manual or web where I can learn a way to get a background service for a frontend application on KDE?

and here is what exactly i want to do.

I need something like a daemon, being executing in the background, and when he detect the start of some user session, the daemon, pass a time send the execution of a visual program on KDE. Right now I Know how to detect a user's session, this is not a problem, the real problem is that I need to learn how execute an KDE application from a daemon that is execute in the background.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: A daemon for KDE

Mon Nov 15, 2010 3:47 am
Ah, that is something completely different. Is this daemon running as root or as part of the users session itself?

If it is running as root, extra steps will be needed.
If not, you need to ask "KLauncher" to run the application for you.

In KDE4, the following command will demonstrate the call you need to make to it:
Code: Select all
qdbus org.kde.klauncher /KLauncher exec_blind <appname> <args>


If you use KDE3, you need to use DCOP instead. Not sure what the arguments for that is though.

If you are doing this from a daemon running as part of the users session, then I recommend using QDBus or other equivalent API's to connect to the D-Bus session directly to send the message.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
leonel06033
Registered Member
Posts
7
Karma
0
OS

Re: A daemon for KDE

Mon Nov 15, 2010 4:21 am
Yes I'm reading about DCOP, and yes too, my daemon are running has root, what else should I do for using DCOP o DBUS execute an application of KDE form my daemon. Oder thing, I'm usign KDE 3.5.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: A daemon for KDE

Tue Nov 16, 2010 6:02 am
For KDE 3.5, you need to use DCOP then. Simply running the appropriate command using sudo as the user you wish to affect with $DISPLAY set appropriately should be enough to do this.

You can retrieve $DISPLAY data from ConsoleKit using ck-list-sessions if needed. I don't know unfortunately what other parameters or commands are needed to interact with dcopserver, as I don't have access to a KDE 3 system.

I suggest checking for "dcop" and "kdcop"


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], rockscient