You are not logged in.

#1 2011-05-13 20:25:51

xdunlapx
Member
From: Ohio, USA
Registered: 2011-05-12
Posts: 19

How to start dbus upon login? [solved]

I'm wondering how to start dbus when I log in or when I start X. I've searched the forum and wiki and not found the answer. Also how do I make pulseaudio start at the same time, right after dbus? I'm brand new to Arch and did the core install, then installed a few other things. I currently use startx to start e17 as my window manager. XFCE was laggy, which is odd.

Thanks!

Brittany

Last edited by xdunlapx (2011-05-14 01:31:38)

Offline

#2 2011-05-13 21:19:51

uc50ic4more
Member
From: Windsor, Ontario, Canada
Registered: 2011-03-21
Posts: 50

Re: How to start dbus upon login? [solved]

I start dbus by including it in the DAEMONS array in /etc/rc.conf. I don't know much about pulseaudio; but I'd presume you could add it into the appropriate section of /etc/rc.conf as a daemon or kernel module *if it is either of those things*; or just include it in whatever file you use to start up applications at X. For me, that is openbox's autostart.sh file. There are different ways to do this for different desktop environments and window managers.

Offline

#3 2011-05-13 21:22:22

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: How to start dbus upon login? [solved]

You can put these in your .xinitrc file. Somewhere before you start e17, put these

eval $(dbus-launch --sh-syntax --exit-with-session)
start-pulseaudio-x11

You may also want to start the dbus system bus (as opposed to the session bus, which this starts) by putting dbus is the DAEMONS array of rc.conf, if you haven't already.

Offline

#4 2011-05-13 21:28:46

demian
Member
From: Frankfurt, Germany
Registered: 2009-05-06
Posts: 709

Re: How to start dbus upon login? [solved]

You don't want those to be started before you log in?

Anyway, one way to do the desired is to add NOPASSWD entries via visudo.

Controling daemons like dbus is done with /sbin/rc and since I don't use pulseaudio I just assume its binary is /usr/bin/pulseaudio. Accordingly, the entry in /etc/sudoers would have to look like this:
xdunlapx ALL=(ALL) NOPASSWD: /sbin/rc, /usr/bin/pulseaudio

Depending on wether you use a login manager or xinit you'll want to add the commands (rc start dbus and pulseaudio --start) to some script parsed by your login manager respectively ~/.xinitrc for the xinit method.


There might be a way to do this without root privileges via groups for audio and the likes, devicekit policies maybe? Hopefully, someone else can tell you more about that. Until then, visudo should do.

Regards,
demian


no place like /home
github

Offline

#5 2011-05-14 01:31:15

xdunlapx
Member
From: Ohio, USA
Registered: 2011-05-12
Posts: 19

Re: How to start dbus upon login? [solved]

ataraxia wrote:

You can put these in your .xinitrc file. Somewhere before you start e17, put these

eval $(dbus-launch --sh-syntax --exit-with-session)
start-pulseaudio-x11

You may also want to start the dbus system bus (as opposed to the session bus, which this starts) by putting dbus is the DAEMONS array of rc.conf, if you haven't already.

Thanks, that worked! smile

Thanks for all your help guys. I will mark this as solved.

Offline

Board footer

Powered by FluxBB