TensorKart: Unable to access the X Display, is $DISPLAY set properly?
Hello,
I have recorded my game (luigi_raceway) and trained the data.csv to generate the model_weights.h5 file.
When I run “python play.py”, it shows the followings:
Using TensorFlow backend.
[2017-10-09 07:48:53,027] Making new env: Mario-Kart-Royal-Raceway-v0
('ControllerHTTPServer started on port ', 8082)
initial_disp: :1
Starting xvfb with command: ['Xvfb', ':1', '-screen', '0', '640x480x24', '-fbdir', '/dev/shm']
_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running
(EE)
Fatal server error:
(EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE)
Changed DISPLAY to: :1
Starting emulator with comand: ['vglrun', 'mupen64plus', '--resolution', '640x480', '--input', '/usr/local/lib/mupen64plus/mupen64plus-input-bot.so', '/home/exe/gym-mupen64plus/gym_mupen64plus/ROMs/marioKart.n64']
Calling wx.App() with DISPLAY: :1
Unable to access the X Display, is $DISPLAY set properly?
Close called!
I have searched the Google, but can not find correct answers.
How can I get access to X Display ? Thanks a lot.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 21 (1 by maintainers)
X Display
:0is your primary X11 display. This is what is used by default to display your desktop environment (i.e. all of your windows). The gym environment is attempting to establish a virtual display using XVFB (X Virtual Frame Buffer) to run the N64 emulator. Because most people are running a desktop environment on display:0, I defaulted the configuration to use display:1. In other words, the environment is attempting to spawn a new X display on:1Based on the error message you provided, it looks like the display
:1is already in use. This can happen if you are running a (non-standard) setup with multiple X displays (e.g. multi-monitor with each monitor having its own X server… probably not the case), or more likely, if you had attempted to run the environment and had it crash at some point where it didn’t clean up properly. Unfortunately, there are a few cases where the environment dies and doesn’t close the Xvfb process, leaving the X display in use. Try runningps | grep -i xvfband see if it shows a running Xvfb process. If so, you will need to kill it. That should free up the X display for you to try again. If you are actually using X Display:1for something, you can change theconfig.ymlfile to reference a different display (e.g.:3).Hopefully that makes some sense. Let me know if you have any questions about any of that and I can try to explain it better.