LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-09-2018, 04:15 AM   #1
cgorac
Member
 
Registered: Oct 2009
Posts: 115

Rep: Reputation: 54
disabling D-Bus


Following is probably well-known by many, but it took me some time to figure it out, so I'll write it here for reference:

I wanted to disable D-Bus on my laptop, and all the stuff that it pulls in (ConsoleKit, PolicyKit, gconfd), however I found that "chmod ugo-x" on /etc/rc.d/rc.messagebus and /etc/rc.d/rc.consolekit has no effect, as D-Bus daemon would get started somehow anyway. So after some searching, I found it's possible to disable its launching by setting DBUS_SESSION_BUS_ADDRESS environment variable to some string that is not valid filesystem path (or something similar, as I tried with /dev/null and it worked too). Alternatively, one could of course just "chmod ugo-x /usr/bin/dbus-daemon".

I found that PulseAudio is not working afterwards, however here D-Bus seems just to be used by some PulseAudio modules, so I commented out loading Bluetooth and ConsoleKit modules in /etc/pulse/default.pa, and if works fine now.

If someone has alternate suggestions on how to achieve this, I'd like to hear.
 
Old 01-09-2018, 04:56 AM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1 on Lenovo Thinkpad W520
Posts: 7,958

Rep: Reputation: 2833Reputation: 2833Reputation: 2833Reputation: 2833Reputation: 2833Reputation: 2833Reputation: 2833Reputation: 2833Reputation: 2833Reputation: 2833Reputation: 2833
Just edit the /usr/bin/start<graphical environment> that you use to remove or comment out the dbus launch code snippet.

e.g. in /usr/bin/startwmaker you will see this:
Code:
 if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
   eval `dbus-launch --sh-syntax --exit-with-session`
fi
Of course if you don't use any graphical environment this is pointless

But if you use Lumina, if I understand well you won't need this plumbing anyway as they don't use it.

Last edited by Didier Spaier; 01-09-2018 at 04:58 AM.
 
Old 01-09-2018, 05:16 AM   #3
cgorac
Member
 
Registered: Oct 2009
Posts: 115

Original Poster
Rep: Reputation: 54
Thanks for the hint.

I'm still somewhat confused how it get started in my case. Namely, I'm using Openbox. My machine boots into runlevel 3, and then I have .bash_login set up so that if I login at tty1, it would run xinit, that in turn would find in my ~/.xinitrc that it should exec openbox-session. The Openbox scripts don't mention dbus-launch, and according to pstree output, it doesn't seem to be active after X started. However, as soon as I start any GTK program (I'm using Emacs, Firefox and Xpdf - I think all of these are GTK3 by now), dbus-daemon would appear in the pstree output, accompanied by all the other fellas: ConsoleKit and PolicyKit daemons, gconfd daemon, and even some accessibility daemons in case Emacs launched.
 
Old 01-09-2018, 05:50 AM   #4
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1 on Lenovo Thinkpad W520
Posts: 7,958

Rep: Reputation: 2833Reputation: 2833Reputation: 2833Reputation: 2833Reputation: 2833Reputation: 2833Reputation: 2833Reputation: 2833Reputation: 2833Reputation: 2833Reputation: 2833
I didn't dig but assume that these apps do use some mechanism to do so, like dbus-glib.

Out of curiosity I did this to find which packages depend on dbus in Slackware64-14.2:
Code:
wget http://slackware.uk/salix/x86_64/slackware-14.2/PACKAGES.TXT
grep -B4 dbus, PACKAGES.TXT|grep NAME|sed "s/.* //;s/-[^-]*-[^-]*-[^-]*$//" > packages_depending_on_dbus.txt
The output is attached. Maybe you can compile some of them without dbus if there is a configure option to do that. Good luck.

PS grepping "dbus," may be makes miss a few, but you get the idea.
Attached Files
File Type: txt packages_depending_on_dbus.txt (1.7 KB, 12 views)

Last edited by Didier Spaier; 01-09-2018 at 05:55 AM.
 
Old 01-09-2018, 06:25 AM   #5
cgorac
Member
 
Registered: Oct 2009
Posts: 115

Original Poster
Rep: Reputation: 54
Quote:
Originally Posted by Didier Spaier View Post
I didn't dig but assume that these apps do use some mechanism to do so, like dbus-glib.
Yeah, probably. It seems to me that GTK is more "problematic" toolkit than Qt in the sense that the separation between the toolkit and the desktop environment that is based on the toolkit is more blurred, so applications written using the toolkit often inadvertently end up depending on corresponding desktop environment technologies.

In any case, it's early to tell but it seems that apps that I use work fine (admittedly, it's also rather small sample, as I actually spend most of my day in xterm) with the setup described above, so there is no need to recompile anything. Still, it would be nice if the whole thing was designed to be fully optional.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
getting bus error massy Linux - Networking 2 07-23-2014 03:32 PM
Dbus System bus and Session bus mainloops deimus Linux - Distributions 0 08-20-2010 07:49 AM
Bus ID phoenix_wolf Linux - Newbie 1 12-17-2004 12:42 PM
Bus ID p0rt Linux - Hardware 1 06-27-2003 04:34 PM
Bus error anamika123 Linux - General 2 08-01-2002 05:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration