<p>One more question/idea - how hard would it be to just check for a userid of 0, but a home directory of [not /root]? And in that case, just go ahead and use whatever $HOME says, but add "<em>root</em>" somewhere in the name (or something like that)? I mean, I get it that sudo is broken in that regard. But it will probably never be "fixed" because too much relies on it's very specific behavior. So why not just work with it? There's quite a bit that can be known about the environment we're running in and how we got there. Why not use it, to address the problem of propagating a very well-known and understood bug in a lower level, up to higher-level users?</p>

<p>Granted I'm probably mixing up the specific locations you use. (I actually recall the "domain socket" files existing in /tmp, not /home/user. But the same concept would apply.)</p>

<p>This would give you a predictable starting location and name, while also allowing geany users to not be inconvenienced by the very inconsiderate sudo bug. I know for a fact from Google that I'm not the only user that experiences this, but even if it were - say, five users, and the fix was literally a 15 minute change to a few lines plus some testing...wouldn't that be satisfying?</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-243676341">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ6H6NR9M34pYB4UXuz53f0l1AvXeks5qlSbbgaJpZM4JUsAv">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJyEBO6l0Olxvd-hSVYPHshgPZ_H-ks5qlSbbgaJpZM4JUsAv.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-243676341"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/geany/geany","title":"geany/geany","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany"}},"updates":{"snippets":[{"icon":"PERSON","message":"@doublemeat in #1150: One more question/idea - how hard would it be to just check for a userid of 0, but a home directory of [not /root]? And in that case, just go ahead and use whatever $HOME says, but add \"_root_\" somewhere in the name (or something like that)? I mean, I get it that sudo is broken in that regard. But it will probably never be \"fixed\" because too much relies on it's very specific behavior. So why not just work with it? There's quite a bit that can be known about the environment we're running in and how we got there. Why not use it, to address the problem of propagating a very well-known and understood bug in a lower level, up to higher-level users?\r\n\r\nGranted I'm probably mixing up the specific locations you use. (I actually recall the \"domain socket\" files existing in /tmp, not /home/user. But the same concept would apply.)\r\n\r\nThis would give you a predictable starting location and name, while also allowing geany users to not be inconvenienced by the very inconsiderate sudo bug. I know for a fact from Google that I'm not the only user that experiences this, but even if it were - say, five users, and the fix was literally a 15 minute change to a few lines plus some testing...wouldn't that be satisfying?"}],"action":{"name":"View Issue","url":"https://github.com/geany/geany/issues/1150#issuecomment-243676341"}}}</script>