<p>As I reply everyone raising this "bug", get a properly configured <code>sudo</code>.  Even though I don't recommend using Geany as root, I can just fine run <code>sudo geany</code> on my Debian machine and it works flawlessly (as far as I can tell without doing it daily, though), whether or not I have other Geanys running.  It properly uses <em>/root/.config/geany</em> as the configuration directory.</p>

<p><em>Anything</em> that would lead to another user (including root) to writing in a user's home directory should be avoided.  If you <em>did</em> write there as root, the user would be left with root-owned file in his home, files he couldn't modify.  That's not a good thing.</p>

<p>And while I don't want special code for handling <code>sudo</code> use, I don't think any is needed: proof being I can use <code>sudo</code> just fine on my machine.  Yes, Debian does have <code>Defaults env_reset</code>.</p>

<p>If you <em>really</em> want us to change something, you'll need to detail why you'd need inheriting the environment (including <code>HOME</code> and <code>XDG_*</code>, and possibly other) in your sudo session, and what you'd want us to do to fix it (by that I mean actual changes, not "fix it").</p>

<hr>

<p>If "many other GUI tools" work, it might be for a number of reasons, one possibly being that they use DBus (anything using <em>dconf</em> comes to mind), which may or may not use <code>$USER</code> rather than <code>$HOME</code>/<code>$XDG_*</code>.  Or other special handling.  Or possibly simply not have to do any IPC and happily mess up your user's home directory.<br>
If really other tools to something meaningful and it's not a hack, maybe it could be a basis for proposing a change.</p>

<p>Out of curiosity, do you have root-owned stuff in your dotfiles? <code>(cd && find -path './.*' -user root)</code></p>

<hr>

<p><em>I'm not closing it just now, but I still do consider this invalid at least for the moment</em></p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/issues/1150#issuecomment-235136084">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ9DQNdRIehvRx530hEiR3I88Ri-zks5qZWIbgaJpZM4JUsAv">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ7l75Ua0IfhEyiq0wcTKx7xRow8mks5qZWIbgaJpZM4JUsAv.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/issues/1150#issuecomment-235136084"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>