Quantcast
Channel: Active questions tagged 22.04 - Ask Ubuntu
Viewing all articles
Browse latest Browse all 4446

Why is my DISPLAY variable 1, when I am using a single monitor?

$
0
0

I just got a new PC and I put Ubuntu 22.04 on it. Next, I worked in a docker container with some simulation programs regarding ROS (Gazebo, Rviz), all worked fine (I wasn't checking DISPLAY variable at this time).
Skip to the next day, and I try entering my container and running simulations again. I try running Gazebo, it prints out a lot of stuff in terminal as it usually does but a new Gazebo window is not opening. Then I try running Rviz and I get:

Authorization required, but no authorization protocol specifiedqt.qpa.xcb: could not connect to display :1qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.Aborted (core dumped)  

I then check DISPLAY variable in the container as well as on my ubuntu and I get

echo $DISPLAY:1

I have a single monitor, and as far as I understood it, this variable should be 0 for my case. My suspicion is that perhaps my docker container messed something up with X sessions.
Any help is very much appreciated.

The image that I am running was provided to me and I had to run this docker run script (perhaps someone can see an issue with it):

#!/bin/bashxhost +docker run \  -it \  --gpus all \  -e "ACCEPT_EULA=Y" \  -e DISPLAY=$DISPLAY \  -e SSH_AUTH_SOCK=/run/host_ssh_auth_sock \  --env LOCAL_USER_ID \  --env LOCAL_GROUP_ID \  --env LOCAL_GROUP_NAME \  --net=host \  --privileged \  -v /tmp/.X11-unix:/tmp/.X11-unix \  -v $HOME/Documents/Projects/docker_exchange:/home/user/exchange \  -v /var/run/docker.sock:/var/run/docker.sock \  --runtime=nvidia \  tiago_arl \  bashxhost -

And finally, here is my neofetch:

            .-/+oossssoo+/-.               sergej@sergej-vienna         `:+ssssssssssssssssss+:`           --------------------       -+ssssssssssssssssssyyssss+-         OS: Ubuntu 22.04.4 LTS x86_64     .ossssssssssssssssssdMMMNysssso.       Host: B760M DS3H AX DDR4    /ssssssssssshdmmNNmmyNMMMMhssssss/      Kernel: 6.5.0-28-generic +ssssssssshmydMMMMMMMNddddyssssssss+     Uptime: 4 hours, 36 mins  /sssssssshNMMMyhhyyyyhmNMMMNhssssssss/    Packages: 2240 (dpkg), 13 (snap) .ssssssssdMMMNhsssssssssshNMMMdssssssss.   Shell: bash 5.1.16 +sssshhhyNMMNyssssssssssssyNMMMysssssss+   Resolution: 4096x2304 ossyNMMMNyMMhsssssssssssssshmmmhssssssso   DE: GNOME 42.9 ossyNMMMNyMMhsssssssssssssshmmmhssssssso   WM: Mutter +sssshhhyNMMNyssssssssssssyNMMMysssssss+   WM Theme: Adwaita .ssssssssdMMMNhsssssssssshNMMMdssssssss.   Theme: Yaru-dark [GTK2/3]  /sssssssshNMMMyhhyyyyhdNMMMNhssssssss/    Icons: Yaru [GTK2/3] +sssssssssdmydMMMMMMMMddddyssssssss+     Terminal: x-terminal-emul    /ssssssssssshdmNNNNmyNMMMMhssssss/      CPU: 13th Gen Intel i7-13700KF (24) @ 5.300GHz     .ossssssssssssssssssdMMMNysssso.       GPU: NVIDIA 01:00.0 NVIDIA Corporation Device 2786       -+sssssssssssssssssyyyssss+-         Memory: 6251MiB / 31919MiB         `:+ssssssssssssssssss+:`            .-/+oossssoo+/-.                                       

Viewing all articles
Browse latest Browse all 4446

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>