View Single Post
  #6   (View Single Post)  
Old 29th December 2010
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

I really dislike dbus, but, if you're going to run it.. I recommend NOT running it system wide.

You can create ~/.dbus/session.conf, and launch dbus in your .xinitrc file.
Code:
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
	<type>session</type>
	<keep_umask/>
	<listen>unix:tmpdir=~/.dbus/tmp</listen>
	<policy context="default">
		<allow send_destination="*" eavesdrop="true"/>
		<allow eavesdrop="true"/>
		<allow own="*"/>
		<allow user="zylorx"/>
	</policy>
</busconfig>
I specify a non-default location for the socket, as you can see.

You'll also need something like this in your .xinitrc/.xsession, for example..
exec /usr/local/bin/dbus-launch --sh-syntax --exit-with-session --config-file=~/.dbus/session.conf /usr/X11R6/bin/cwm

I use cwm and this lets my desktop applications play nicely, most should automatically start a dbus session on their own if it doesn't already exist.

This is just how I start it, preferred instructions are installed as part of the dbus package.. in 4.8-current these are installed in /usr/local/share/doc/pkg-readmes/:
Code:
To start a session bus instance of dbus-daemon (needed by at least gvfs
aware applications and /usr/local/share/dbus-1/services/*.service),
add the following lines in .xinitrc or .xsession before starting the
window manager (see dbus-launch(1) for more info) -- note that some
session managers, e.g. gnome-session(1) already do this for you.

if [ -z "${DBUS_SESSION_BUS_ADDRESS}" ]; then
	eval `dbus-launch --auto-syntax --exit-with-session`
fi
Hope that helps.
Reply With Quote