This forum has been archived. All content is frozen. Please use KDE Discuss instead.
The Discussions and Opinions forum is a place for open discussion regarding everything related to KDE, within the boundaries of KDE Code of Conduct. If you have a question or need a solution for a KDE problem, please post in the apppropriate forum instead.

How to autoRun "dbus-daemon --config-file=session.conf"?

Tags: None
(comma "," separated)
southgate
Registered Member
Posts
4
Karma
0
OS
:)
hello,everyone
i use the QtDBus in my Qt4.6.2 application. Before run my application, it's necessary to run the DBus session process and the DBus session process must be runing untill my application exit.
I run the DBus session process by input "dbus-daemon --config-file = session.conf" in the hyperterminal at first.
Now I want the DBus session process could autorun in my application, i have tried two method but not succeed:
1. the "dbus-daemon.exe" and the "session.conf" are in the "DBusEssential"

Code: Select all
system("/DBusEssential/dbus-daemon --config-file=/DBusEssential/session.conf");

the "system" excute the command, but it exit at once. My application need the DBus session process is always running.

2.
Code: Select all
QProcess myProcess;
    myProcess.start("/DBusEssential/dbus-daemon --config-file=/DBusEssential/session.conf");


I Know it's not correct to use like this, but i don't know the correct way.

May be the "session.conf" could write to the "config-file" of the "dbus-daemon.exe", and then "start " the "dbus-daemon.exe"? How to??

please help me. thanks very much.
regards for any advice!!!
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
On the standard Linux desktop, D-Bus will always be running. As far as I know, you need to pass the "--session" argument to get it to remain behind until at least the user logs out.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
southgate
Registered Member
Posts
4
Karma
0
OS
thanks very much!

But i still have some doubts for this:

1. if i down the complied project to the development board, the DBus will still run in the development board?

2. i mainly work in qt4.6.2/VS2008. So i want to know how autorun the DBUS in my application instead of input "dbus-daemon --config-file = session.conf" in the hyperterminal.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
You can use QProcess to launch applications from within your application.


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


Bookmarks



Who is online

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