DEV Community

Discussion on: Run GUI app in linux docker container on windows host

Collapse
 
darksmile92 profile image
Robin Kretzschmar • Edited

Hey Raquel,

normally this would be set by your WM but sometimes - especially under wsl - sometimes this is not the case.
Try adding the following to your ~/.bashrc file (applies for your current wsl user):

export DISPLAY=:1 #optional
export XDG_RUNTIME_DIR=/home/USERNAME/tmp
Enter fullscreen mode Exit fullscreen mode

You can choose any folder for XDG_RUNTIME_DIR.

In case you are wondering what the hell XDG_RUNTIME_DIR is...
This is an environment variable that any program will access to determine the user specific directory to store small temporary files to. Normally it is set automatically when you log in.

Collapse
 
raquelro profile image
Raquel Rodriguez

Thanks Robin, I tried it but the error persists....any other ideas? :(

Thread Thread
 
raquelro profile image
Raquel Rodriguez

I found this log .... maybe it can help:
Welcome to the VcXsrv X Server
Vendor: The VcXsrv Project
Release: 1.20.8.1

OS: Windows NT 6.2 build 9200 (64-bit)
Contact: marha@users.sourceforge.net

LoadPreferences: C:\Users\RaquelRodriguez\AppData\Roaming.XWinrc not found
LoadPreferences: Loading C:\Program Files\VcXsrv\system.XWinrc
Warning: Locale not supported by X, falling back to 'C' locale.
(II) AIGLX: Testing pixelFormatIndex 1
(II) GLX: enabled GLX_SGI_make_current_read
(II) GLX: enabled GLX_SGI_swap_control
(II) GLX: enabled GLX_MESA_swap_control
(II) GLX: enabled GLX_SGIX_pbuffer
(II) GLX: enabled GLX_ARB_multisample
(II) GLX: enabled GLX_SGIS_multisample
(II) GLX: enabled GLX_ARB_fbconfig_float
(II) GLX: enabled GLX_EXT_fbconfig_packed_float
(II) GLX: enabled GLX_ARB_create_context
(II) GLX: enabled GLX_ARB_create_context_profile
(II) GLX: enabled GLX_ARB_create_context_robustness
(II) GLX: enabled GLX_EXT_create_context_es2_profile
(II) GLX: enabled GLX_ARB_framebuffer_sRGB
(II) AIGLX: enabled GLX_MESA_copy_sub_buffer
(II) 105 pixel formats reported by wglGetPixelFormatAttribivARB
(II) GLX: Initialized Win32 native WGL GL provider for screen 0
winClipboardThreadProc - DISPLAY=127.0.0.1:0.0
Using Composite redirection
OS maintains clipboard viewer chain: yes
winMultiWindowXMsgProc - Fatal error 1 on xcb connection
winClipboardIOErrorHandler!
winClipboardProc - setjmp returned for IO Error Handler.
(II) Server terminated successfully (0). Closing log file.

Thread Thread
 
raquelro profile image
Raquel Rodriguez

Hi Robin!
Finally I made it work :)
I'm not sure what was the problem, I just decided to remove the docker image and container, install it again and ...... worked!
Thank you very much :)

Thread Thread
 
darksmile92 profile image
Robin Kretzschmar

Great news! Sometimes it's the best solution to just start over. Glad you got it working 👍😊