As I reply everyone raising this "bug", get a properly configured sudo. Even though I don't recommend using Geany as root, I can just fine run sudo geany 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 /root/.config/geany as the configuration directory.

Anything that would lead to another user (including root) to writing in a user's home directory should be avoided. If you did 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.

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

If you really want us to change something, you'll need to detail why you'd need inheriting the environment (including HOME and XDG_*, 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").


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

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


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


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.