Launch App as Root
Issue when attempting to launch, for example, a file manager app from terminal as root, (always launches fine as standard user). Sometimes works fine, sometimes I get: error: XDG_RUNTIME_DIR not set in the environment. [C] unknown:0 - Failed to create display (No such f ile or directory) Sometimes works fine as with devel-su, sometimes with su, sometimes with sudo. My most consistent method to get it to work so far is to open a terminal app, attempt it, get an error, then open a different terminal app, attempt it, and it works. I have searched the error message, and found advice about exporting display, etc, but seems obviously not a system config issue, since it works sometimes. What is happening, and what could I do to avoid the error? Thanks
there is nothing cool in launching userspace app as root user.
coderus ( 2020-03-30 22:05:55 +0200 )edit@coderus - Thanks for the reminder - I'm mostly just curious about what is happening. Since you mention it, though, what's the difference between doing that, and using a 'run as root' patch? Or, is there a way to grant an app 'root permissions' by some other means?
Levone1 ( 2020-03-30 22:43:37 +0200 )edit