By default, ubuntu-minimal uses vim-tiny, and after >20 years of using vim/emacs, I am cured, and realize that despite their obvious power, the user interface itself of both editors is not designed for humans and a horrible joke.
So I would like to replace it completely. Preferably with Kate, Tilde and KDiff3.
Of course I already uninstalled vim-tiny, and removed the dependency for it from ubuntu-minimal; installed Tilde, Kate and KDiff3, and added scripts named vim
and the like, to run Tilde instead, so programs that expect vim (like ubuntu-minimal) keep working.
The problem is that when a GUI is available, Kate should be run, even when I’m root and editing system files. But Kate is smart enough to know it doesn’t need to be root the entire time, but only for saving (or sometimes opening). So I cannot just run it from root. I need it to run from that user’s session, but triggered from a root script, which then only exists when kate returns to the shell in the user’s session.
In the past, I remember that various combinations of su
, and exporting session variables to be able to access X, did let me run things in another session. But it was anything but elegant.
So now I would like to do it cleanly. Done in a proper way. Problem is: I don’t know what that way is. Or if there even is one defined at all.
Sure, I might have a listener in my X session, that get sent the things to open via a FIFO or the like. But on modern systems, it feels like such facilities already exist in much more general and powerful ways. (Something like policykit or whatever it was called? … Offering more fine-grained access controls too.)
Given that other people probably already fully implemented what I want here, I’d rather ask for that, than start coding a at first hackish solution on my own.
Oh, and: I know what I’m doing. I do it for a reason. If it blows up in my face, then that was my choice, and I do not need anyone from OSHA to hold my hand, to operate a spoon. ;)