<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=5611&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / How to remove .dbus from home directory?]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=5611</link>
		<description><![CDATA[The most recent posts in How to remove .dbus from home directory?.]]></description>
		<lastBuildDate>Thu, 18 Sep 2025 07:08:54 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: How to remove .dbus from home directory?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=58077#p58077</link>
			<description><![CDATA[<p>Thanks for necro-posting @boughtonp remarks. This cleared the first of two systemd warnings in my ~/.xsession-errors file.<br />A second warning is triggered by similar argument in <em>/etc/X11/Xsession.d/90qt-a11y</em>. Removing same cleared the second warning.</p>]]></description>
			<author><![CDATA[dummy@example.com (ceeslans)]]></author>
			<pubDate>Thu, 18 Sep 2025 07:08:54 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=58077#p58077</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to remove .dbus from home directory?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=58059#p58059</link>
			<description><![CDATA[<div class="quotebox"><blockquote><div><p>One other change I made was to /etc/X11/Xsession.d/95dbus_update-activation-env - removing the --systemd argument stops a pointless warning being output to xsession-errors.</p></div></blockquote></div><p>Apologies for the necro-post, but wanted to thank @boughtonp for this little nugget. That little warning had been a small thorn in my eye every time I opened .xsession-errors, but I have had a 1000 other fish to fry so never gotten around to it, but stumbled upon this post whilst searching for some dbus info. Thanks! <img src="https://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (greenjeans)]]></author>
			<pubDate>Wed, 17 Sep 2025 20:20:33 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=58059#p58059</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to remove .dbus from home directory?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=41517#p41517</link>
			<description><![CDATA[<p>Ok, so after a bunch of faff dealing with dbus&#039;s convoluted build process, I get it to output a dbus-launch binary.</p><p>Then I update the start of get_homedir in <span class="bbc">dbus-launch-x11.c</span> to do:</p><div class="codebox"><pre><code>home = getenv (&quot;DBUS_HOME&quot;);
if ( home != null )
  return home;</code></pre></div><p>Swap the executables over (because some things use absolute path):</p><div class="codebox"><pre><code>mv /usr/bin/dbus-launch{,.orig}
cp /path/to/custom/dbus-launch /usr/local/bin/dbus-launch
cd /usr/bin &amp;&amp; ln -vsiT /usr/local/bin/dbus-launch dbus-launch</code></pre></div><p>And finally, reset <span class="bbc">/etc/X11/Xsession.d/75dbus_dbus-launch</span> to default, before adding:</p><div class="codebox"><pre><code>DBUS_HOME=&quot;$XDG_RUNTIME_DIR&quot;
export DBUS_HOME</code></pre></div><p>And now I don&#039;t get .dbus in my home directory, because it creates <span class="bbc">/run/user/1000/.dbus</span> instead.</p><p>It is going to mean re-patching each time a relevant D-Bus release happens, but looks like there was only one security update with Chimaera so hopefully wont be too common.</p><p>-</p><p>One other change I made was to <span class="bbc">/etc/X11/Xsession.d/95dbus_update-activation-env</span> - removing the <span class="bbc">--systemd</span> argument stops a pointless warning being output to xsession-errors.</p>]]></description>
			<author><![CDATA[dummy@example.com (boughtonp)]]></author>
			<pubDate>Wed, 15 Mar 2023 19:29:07 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=41517#p41517</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to remove .dbus from home directory?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=41515#p41515</link>
			<description><![CDATA[<p>So the bus address stuff has been a red-herring - that actually gets placed inside the .dbus/session-bus/{uuid} files.</p><p>Looking at the relevant source code (<a href="https://git.devuan.org/devuan/dbus/src/branch/suites/chimaera-security/tools/dbus-launch-x11.c" rel="nofollow">dbus-launch-x11.c</a>), it is hard-coded to create .dbus directly in the home directory, with no conditional &quot;place it elsewhere if X&quot; logic.</p><p>So basically everything I did yesterday and today was a waste of time, all because of another useless idiot from Red Hat.</p>]]></description>
			<author><![CDATA[dummy@example.com (boughtonp)]]></author>
			<pubDate>Wed, 15 Mar 2023 16:17:43 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=41515#p41515</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to remove .dbus from home directory?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=41511#p41511</link>
			<description><![CDATA[<p>Ok, so I reverted all previous changes, then modified <span class="bbc">/etc/X11/Xsession.d/75dbus_dbus-launch</span> with:</p><div class="codebox"><pre><code>if [ -n &quot;$XDG_RUNTIME_DIR &quot;]; then
    SESSION_CONF=&quot;/usr/share/dbus-1/session.conf&quot;
    USER_CONF=&quot;$XDG_RUNTIME_DIR/dbus_user_session.conf&quot;
    sed -r &#039;s|&lt;listen&gt;[^&lt;]+|&lt;listen&gt;unix:path=&#039;&quot;$XDG_RUNTIME_DIR&quot;&#039;/bus|&#039; &quot;$SESSION_CONF&quot; &gt; &quot;$USER_CONF&quot;
    eval $($DBUSLAUNCH --exit-with-session --sh-syntax --config-file=&quot;$USER_CONF&quot;)
else
    eval $($DBUSLAUNCH --exit-with-session --sh-syntax)
fi</code></pre></div><p>This creates the socket at <span class="bbc">/run/user/1000/bus</span> and results in the expected single DBUS_SESSION_BUS_ADDRESS, but is <em>still</em> re-creating the ~/.dbus directory. :@</p>]]></description>
			<author><![CDATA[dummy@example.com (boughtonp)]]></author>
			<pubDate>Wed, 15 Mar 2023 14:46:32 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=41511#p41511</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to remove .dbus from home directory?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=41509#p41509</link>
			<description><![CDATA[<div class="quotebox"><blockquote><div><p>Anyway, I&#039;ll go have lunch then see if I can configure the stupid thing to behave.</p></div></blockquote></div><p><img src="https://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (F_Sauce)]]></author>
			<pubDate>Wed, 15 Mar 2023 13:29:33 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=41509#p41509</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to remove .dbus from home directory?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=41508#p41508</link>
			<description><![CDATA[<p>Yeah, XDG_RUNTIME_DIR defaults to within /run which is tmpfs, so would solve that.</p><p>D-Bus certainly seems to be a convoluted and inflexible mess, for something that should be simple.</p><p>There is a different implementation, <a href="https://github.com/bus1/dbus-broker" rel="nofollow">dbus-broker</a>, which doesn&#039;t write to disk at all, however it has a systemd dependency for the launcher part - they&#039;re open to alternative launchers, but aren&#039;t going to do it themselves:</p><div class="quotebox"><cite>https://github.com/bus1/dbus-broker/issues/256#issuecomment-775034205 wrote:</cite><blockquote><div><p>However, please note that you do need to write a considerable amount of code to write a replacement launcher and integrate the broker into your alternative system.</p><p>If you have a particular question regarding implementing a launcher, please feel free to contact us with further questions! But we do not intend to work on such replacements ourself.</p></div></blockquote></div><p>The current launcher looks to be ~4k non-blank lines across 14 files of C - dunno how much is re-usable: <a href="https://github.com/bus1/dbus-broker/tree/main/src/launch" rel="nofollow">https://github.com/bus1/dbus-broker/tre … src/launch</a></p><p><a href="https://github.com/bus1/dbus-broker/issues/270" rel="nofollow">#270 remove dependency on libsystemd?</a><br /><a href="https://github.com/bus1/dbus-broker/issues/256" rel="nofollow">#256 Support for other init systems (s6 and runit)</a><br /><a href="https://github.com/bus1/dbus-broker/issues/183" rel="nofollow">#183 [question] Run dbus-broker without systemd running</a></p><p>-</p><p>Anyway, I&#039;ll go have lunch then see if I can configure the stupid thing to behave.</p>]]></description>
			<author><![CDATA[dummy@example.com (boughtonp)]]></author>
			<pubDate>Wed, 15 Mar 2023 13:24:49 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=41508#p41508</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to remove .dbus from home directory?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=41506#p41506</link>
			<description><![CDATA[<p>There is another problem with .dbus - the files are not deleted on exit and accumulate.<br />I just put them in tmpfs.<br /><a href="https://dev1galaxy.org/viewtopic.php?pid=38525#p38525" rel="nofollow">https://dev1galaxy.org/viewtopic.php?pid=38525#p38525</a></p>]]></description>
			<author><![CDATA[dummy@example.com (aluma)]]></author>
			<pubDate>Wed, 15 Mar 2023 07:19:59 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=41506#p41506</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to remove .dbus from home directory?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=41499#p41499</link>
			<description><![CDATA[<p>Ok, so setting DBUS_SESSION_BUS_ADDRESS isn&#039;t the answer - that seems to be more of an informational variable and flag of whether the daemon is already running.</p><p>What I think I need to do is duplicate the whole <span class="bbc">/usr/share/dbus-1/session.conf</span> file, edit the address, then modify <span class="bbc">/etc/X11/Xsession.d/75dbus_dbus-launch</span> to pass <span class="bbc">--config-file=FILENAME</span> to <span class="bbc">dbus-launch</span> which should start the dbus-daemon with that config file only, and thus a single address.</p><p>Of course, since the D-Bus config files don&#039;t appear to support variables, it&#039;ll probably also require a mechanism to create a new config file per user.</p><p>Anyway, it&#039;s too late to try all that now, so I&#039;ll test it out tomorrow.</p><p>Tempting to just ditch Mousepad instead, but no doubt some other package is going to depend on dconf/dbus-x11 and have the same issue.</p>]]></description>
			<author><![CDATA[dummy@example.com (boughtonp)]]></author>
			<pubDate>Wed, 15 Mar 2023 00:09:09 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=41499#p41499</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to remove .dbus from home directory?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=41498#p41498</link>
			<description><![CDATA[<p>So I managed to work out that the socket is created by <a href="https://manpages.debian.org/bullseye/dbus/dbus-daemon.1.en.html" rel="nofollow">dbus-daemon</a> which is configured by <span class="bbc">/usr/share/dbus-1/session.conf</span>, and can be overridden by <span class="bbc">/etc/dbus-1/session.d/*</span> or <span class="bbc">/etc/dbus-1/session-local.conf</span></p><p>So creating a config file like so...</p><div class="codebox"><pre><code>egrep -zo &#039;&lt;!DOCTYPE[^&gt;]+&gt;&#039; /usr/share/dbus-1/session.conf &gt; /etc/dbus-1/session-local.conf
echo &#039;
&lt;busconfig&gt;
&lt;listen&gt;unix:path=/run/user/1000/bus&lt;/listen&gt;
&lt;/busconfig&gt;&#039; &gt;&gt; /etc/dbus-1/session-local.conf</code></pre></div><p>...then logging out all user sessions and back in again.</p><p>Now the bus socket is being created, but it&#039;s still re-creating the $HOME/.dbus directory too. :@</p><p>Checking xsession-errors shows DBUS_SESSION_BUS_ADDRESS has two values, and paying closer attention to the relevant part of the documentation:</p><div class="quotebox"><blockquote><div><p>Add an address that the bus should listen on<br />...<br />If there are multiple &lt;listen&gt; elements, then the bus listens on multiple addresses.</p></div></blockquote></div><p><em>FFS!</em></p><p>So I think I need to supply an --address param instead, which I thought was <span class="bbc">/etc/init.d/dbus</span> and <span class="bbc">/etc/defaults/dbus</span> but that&#039;s the system-wide one, not the per-session one, and I&#039;m out of time for now so I&#039;ll try and figure out where that happens later.</p>]]></description>
			<author><![CDATA[dummy@example.com (boughtonp)]]></author>
			<pubDate>Tue, 14 Mar 2023 21:04:40 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=41498#p41498</guid>
		</item>
		<item>
			<title><![CDATA[How to remove .dbus from home directory?]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=41496#p41496</link>
			<description><![CDATA[<p>Installing Mousepad text editor resulted in a <span class="bbc">.dbus</span> directory being added to my home directory.</p><p>This seems to be the fault of <a href="https://pkginfo.devuan.org/dbus-x11" rel="nofollow">dbus-x11</a> which on Devuan is the only provider for &quot;dbus-session-bus&quot; (required by dconf, one of Mousepad&#039;s dependencies), and based on <a href="https://gitlab.freedesktop.org/dbus/dbus/-/issues/46" rel="nofollow">a 2011 dbus bug report</a> I think I need to ensure <span class="bbc">DBUS_SESSION_BUS_ADDRESS</span> is set correctly - specifically to <span class="bbc">unix:path=$XDG_RUNTIME_DIR/bus</span> by a file in <span class="bbc">/etc/X11/Xsession.d/</span></p><p>I tried using <a href="https://sources.debian.org/src/dbus/1.12.24-0+deb11u1/debian/20dbus_xdg-runtime/" rel="nofollow">20dbus_xdg-runtime config file</a> (from Debian&#039;s <a href="https://packages.debian.org/bullseye/dbus-user-session" rel="nofollow">dbus-user-session</a> package), but that fails because of <span class="bbc">[ -S &quot;$XDG_RUNTIME_DIR/bus&quot; ]</span>, (where &quot;-S&quot; checks that a file is a socket), but there is no such file/socket.</p><p>XDG_RUNTIME_DIR is set at login (to <span class="bbc">/run/user/1000</span>), and is used by other things - there&#039;s even a dbus-1 directory in it, so if I can get the socket created I suspect the Debian config script will work.</p><p>But my searches are failing to reveal what is supposed to be creating the bus socket...?</p>]]></description>
			<author><![CDATA[dummy@example.com (boughtonp)]]></author>
			<pubDate>Tue, 14 Mar 2023 19:23:52 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=41496#p41496</guid>
		</item>
	</channel>
</rss>
