I'm using a program called gnuradio-companion. If I start it without root privileges, I can't save anything because I don't have read/write privileges. It gives:
/usr/lib/python2.7/dist-packages/gnuradio/grc/gui/FileDialogs.py:102: GtkWarning: Failed to read filechooser settings from "/home/nick/.config/gtk-2.0/gtkfilechooser.ini": Permission denied
If I start it with
sudo gnuradio-companion
then I'm abusing sudo, and also I get
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
because I lose the runtime variable XDG_RUNTIME_DIR. I can use
sudo -E
to preserve environment variables but then I get
QStandardPaths: wrong ownership on runtime directory /run/user/1000, 1000 instead of 0
I guess because I'm just borrowing root privileges. Using sudo visudo to modify runtime environments gives the same thing.
How should I configure read/write privileges and run time environments to resolve this?