0

I am currently trying to make an autonomous drone using the Robot Operating System (ROS). To do this, I have installed Raspbian Lite (Jessie) on a Rasperry Pi 3 and am currently using ROS Kinetic on it. I decided to go with Openbox Window Manager and installed a terminal onto it for convenience. I can just call sudo startx. Since it is a system-wide terminal, I have also installed tmux for convenience. I am running the xserver on a particular pane and conduct my ROS work on other panes.

Now when I try to run commands that call on a GUI application from my system-wide terminal, I get the error:

QxcbConnection: Could not connect to display
Aborted

After a recommendation from this question, I decided to install xhost on my terminal emulator. After invoking xhost + in the same emulator, I get this:

access control disabled, clients can connect from any host

After which I invoke xhost which returns with:

access control disabled, clients can connect from any host
SI:localuser:root 

Therefore, within my system-wide terminal, I have set the environmental variable to 5 different values which have been listed below, and tried to run the program which calls on the $DISPLAY, but I get the same QxcbConnection: Could not connect to display error.

SI:localuser:root 
localuser:root 
localuser 
root 
SI:localuser
localhost:0

The last one was actually from the linked question. To my understanding, I am doing exactly what is listed out in this man page. What am I doing wrong?

SDG
  • 315
  • In the terminal emulator (the one where you ran xhost +), what is the output of echo $DISPLAY ? – JigglyNaga Jan 04 '17 at 10:48
  • @JigglyNaga it says :0 – SDG Jan 04 '17 at 10:50
  • @JigglyNaga What should I use as the $DISPLAY on my first virtual terminal device? – SDG Jan 04 '17 at 10:51
  • The same. export DISPLAY=:0 – JigglyNaga Jan 04 '17 at 10:56
  • @JigglyNaga Just tried it, and got the error:

    QxcbConnection: Could not connect to display Aborted

    – SDG Jan 04 '17 at 11:00
  • What GUI command are you trying to run? Do you get the same when starting another X client eg. xterm? – JigglyNaga Jan 04 '17 at 11:02
  • I'm not trying to invoke a specific GUI command. I am trying tto however, call upon an application that uses GUI. I don't know what GUI command the application would run. What do you mean by starting another X client like xterm though? – SDG Jan 04 '17 at 11:32
  • @JigglyNaga I have posted a new question that better explains my problem. Please have a look at it. – SDG Jan 04 '17 at 11:33
  • @ I can close this question, once you have had a look at that question. – SDG Jan 04 '17 at 11:34
  • When you say you "call an application that uses GUI", what exactly are you doing? What steps are involved in this "call"? If you don't invoke a command, what do you do just before this error message appears? – JigglyNaga Jan 04 '17 at 12:13
  • @JigglyNaga rosrun turtlesim turtlesim_node is the exact thing I am calling. rosrun is a function that runs a particular node in the ros environment, to my understanding. turtlesim is the name of the library and turtlesim_node is the specific node from that library that is being called. turtlesim_node calls on a GUI window to display the movement of a turtle. If you would like to know more, please take a look at this guide. – SDG Jan 06 '17 at 11:56
  • @JigglyNaga In terms of the steps, I have ROS installed on my Rpi and I run roscore. – SDG Jan 06 '17 at 11:58
  • Please can you try running xterm, or any other simple X11 application (eg. lxterminal - I don't know what else you've got installed), from the same prompt where you're trying to use rosrun? If that works, and the new xterm appears in the already-running X session, then you've correctly set up xhost, and we can start worrying about ROS. – JigglyNaga Jan 06 '17 at 14:16
  • @JigglyNaga let me try that – SDG Jan 06 '17 at 17:36
  • @JigglyNaga none of the other x11 applications work either – SDG Jan 16 '17 at 14:14
  • What error do you get from other x11 apps when they fail? Please edit the question to show the exact command you ran, and the complete error message that it produced. That will make it easier for others to reproduce your problem. – JigglyNaga Jan 16 '17 at 15:00

0 Answers0