This is just you not forwarding the user environment to the root process you're starting. Hence, GRC doesn't know how to talk to your graphical interface. That is standard Unix/X11 – and personally: that's good that way; you'd really only want to execute as little software as possible as root.
As the software maintainer: I can attest that there's literally no good reason to run a software design tool such as GRC as root. Even if your flow graph for some reason needs root privileges for execution, the appropriate way of dealing with that would be generating the python file and then executing that as root (e.g. using sudo). In all likelihood, however, your flow graph doesn't actually need root privileges for what you're trying to do, and there's a more elegant way of making things work[1]! Maybe you could tell us why you need to, and we'd come up with an appropriate workaround. Best regards, Marcus [1] http://xyproblem.info On Sat, 2019-06-08 at 14:00 -0400, Eamon Heaney wrote: > Hey all, I'm getting a gtk error when I try to run gnuradio-companion > as root. Error message below. > > File "/usr/bin/gnuradio-companion", line 97, in <module> > check_gtk() > File "/usr/bin/gnuradio-companion", line 64, in check_gtk > die(err, "Failed to initialize GTK. If you are running over ssh, > " > File "/usr/bin/gnuradio-companion", line 42, in die > import gtk > File "/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py", > line 69, in <module> > _init() > File "/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py", > line 57, in _init > warnings.warn(str(e), _gtk.Warning) > gtk.GtkWarning: could not open display > > > The instructions on the github repo I'm working from indicate that I > should be running this as root, so I do think it's necessary. Any > ideas on how to fix this? > > > > _______________________________________________ > Discuss-gnuradio mailing list > Discuss-gnuradio@gnu.org > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio