VS Code not working on Ubuntu when connected using XRDP.
Hi, it seems like the bug with either Atom or XRDP discussed in Atom issue here: https://github.com/atom/atom/issues/4360 is keeping VSCode from working in Ubuntu when you connect to it with RDP. Trying to launch the app gives the following output:
Xlib: extension "XInputExtension" missing on display ":10.0". Xlib: extension "XInputExtension" missing on display ":10.0". libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/tls/swrast_dri.so libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so libGL: Can't open configuration file /home/hannesne/.drirc: No such file or directory. libGL: Can't open configuration file /home/hannesne/.drirc: No such file or directory. libGL error: No matching fbConfigs or visuals found libGL error: failed to load driver: swrast bash: cannot set terminal process group (-1): Inappropriate ioctl for device bash: no job control in this shell Xlib: extension "XInputExtension" missing on display ":10.0". Xlib: extension "XInputExtension" missing on display ":10.0". [ , [Error: channel closed] ]
This happens regardless of using the MATE or LFCE desktop. An output of GLXInfo gives the following:
libGL error: No matching fbConfigs or visuals found libGL error: failed to load driver: swrast name of display: :10.0 display: :10 screen: 0 direct rendering: No (If you want to find out why, try setting LIBGL_DEBUG=verbose) server glx vendor string: SGI server glx version string: 1.2 server glx extensions: GLX_EXT_import_context, GLX_EXT_visual_info, GLX_EXT_visual_rating client glx vendor string: Mesa Project and SGI client glx version string: 1.4 client glx extensions: GLX_ARB_create_context, GLX_ARB_create_context_profile, GLX_ARB_create_context_robustness, GLX_ARB_fbconfig_float, GLX_ARB_framebuffer_sRGB, GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_buffer_age, GLX_EXT_create_context_es2_profile, GLX_EXT_fbconfig_packed_float, GLX_EXT_framebuffer_sRGB, GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_INTEL_swap_event, GLX_MESA_copy_sub_buffer, GLX_MESA_multithread_makecurrent, GLX_MESA_query_renderer, GLX_MESA_swap_control, GLX_OML_swap_method, GLX_OML_sync_control, GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group, GLX_SGI_make_current_read, GLX_SGI_swap_control, GLX_SGI_video_sync GLX version: 1.2 GLX extensions: GLX_ARB_get_proc_address, GLX_EXT_import_context, GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_multithread_makecurrent OpenGL vendor string: Mesa project: www.mesa3d.org OpenGL renderer string: Mesa GLX Indirect OpenGL version string: 1.3 Mesa 4.0.4 OpenGL extensions: GL_ARB_imaging, GL_ARB_multitexture, GL_ARB_texture_border_clamp, GL_ARB_texture_cube_map, GL_ARB_texture_env_add, GL_ARB_texture_env_combine, GL_ARB_texture_env_dot3, GL_ARB_transpose_matrix, GL_EXT_abgr, GL_EXT_blend_color, GL_EXT_blend_minmax, GL_EXT_blend_subtract, GL_EXT_draw_range_elements, GL_EXT_multi_draw_arrays, GL_EXT_texture_env_add, GL_EXT_texture_env_combine, GL_EXT_texture_env_dot3, GL_EXT_texture_lod_bias, GL_SGIS_texture_border_clamp, GL_SUN_multi_draw_arrays
8 GLX Visuals visual x bf lv rg d st colorbuffer sr ax dp st accumbuffer ms cav
id dep cl sp sz l ci b ro r g b a F gb bf th cl r g b a ns b eat
0x024 24 tc 1 24 0 r y . 8 8 8 0 . . 0 16 0 0 0 0 0 0 0 None 0x025 24 tc 1 24 0 r y . 8 8 8 0 . . 0 16 8 16 16 16 0 0 0 None 0x026 24 tc 1 24 0 r y . 8 8 8 8 . . 0 16 8 16 16 16 16 0 0 None 0x027 24 tc 1 24 0 r . . 8 8 8 8 . . 0 16 8 16 16 16 16 0 0 None 0x028 24 dc 1 24 0 r y . 8 8 8 0 . . 0 16 0 0 0 0 0 0 0 None 0x029 24 dc 1 24 0 r y . 8 8 8 0 . . 0 16 8 16 16 16 0 0 0 None 0x02a 24 dc 1 24 0 r y . 8 8 8 8 . . 0 16 8 16 16 16 16 0 0 None 0x02b 24 dc 1 24 0 r . . 8 8 8 8 . . 0 16 8 16 16 16 16 0 0 None
Any suggestions?
Open up ''/usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0'' and remove BIG_EXTENSIONS to something else like FIG_EXTENSIONS.
sudo vi /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0 s/BIG_EXTENSIONS/FIG_EXTENSIONS
This is a total hack, but it does work.
@Tyriar maybe you can put this in your release notes or something. The reason is that XRDP only works with Ubuntu MATE (or XFCE, etc.) lighter weight desktops, and there this BIG REQUEST thing doesn't seem to work.
Same issue tracked in atom https://github.com/atom/atom/issues/4360, here's the upstream electron issue https://github.com/atom/electron/issues/2256
@roterdam I'm facing this problem with vscode 1.0.0 on ubuntu 14.4 LTS but when I try to edit the file as you indicated with vi, it says pattern not found
for anyone else encountering this, I worked around this problem by uninstalling xrdp and installing tigervnc on my ubuntu box, then I installed tightvnc viewer on my windows 10 box and now when I remote in vscode works for me. rdp seems a little nicer to me than vnc so hoping maybe when ubuntu 16 LTS comes out I can change back to rdp
@joeaudette that sucks. did you make sure it was case sensitive? vnc is not as performant. Same issue in 16.04 LTS I just tried. Damn Ubuntu. It works fine on Fedora 22.
@roterdam yes I tried lower and upper case but it could not find any match. tried also looking for BIG_REQUEST, big_request, BIG-REQUEST per the similar atom issue but no variants I tried could be found.
strangely while atom and electron bugs are still open some are saying it works fine with rdp using atom 1.5.4, so wondering what version of electron is used for vscode 1.0.0, maybe it is working in the latest version
vnc performance seems ok to me since I'm just using it on a local network, I had to futz around with display settings to get a good experience whereas rdp seemed to automatically scale the screen just right for me.
@joeaudette I believe the latest insiders build was upgraded to Electron 0.37.6 (https://github.com/Microsoft/vscode/pull/5378) 2 days ago.
Just updated to the latest Insiders build on Ubuntu 14.04. Still doesn't work via RDP.
Hack worked vscode works via xrdp in Ubuntu MATE 16.04:
- make a backup first
- sudo sed -i 's/BIG-REQUESTS/_IG-REQUESTS/' /usr/lib/x86_64-linux-gnu/libxcb.so.1
@groone Thanks! will give that a try soon
@groone Thanks. it worked.
@groone Thanks! This worked for me as well.
That worked for X2go on Debian Jessie as well. 👍
Thanks a lot it worked for me too on Ubuntu 14.04 TLS
Thanks - also worked for me - I can now use Atom over XRDP on Debian Jessie 8.5.0
The hack "works" (x2go via LXDE) but then seems to break other apps like VLC for me (under normal desktop login, nothing remote).
There is a much cleaner workaround that won't break other apps:
# make a copy of the relevant library
mkdir ~/lib
cp /usr/lib/x86_64-linux-gnu/libxcb.so.1 ~/lib
sed -i 's/BIG-REQUESTS/_IG-REQUESTS/' ~/lib/libxcb.so.1
# set the dynamic loader path to put your library first before executing VS Code
LD_LIBRARY_PATH=$HOME/lib code
Obviously, you can tweak your .desktop files and other launchers to set the environment variable solely for VS Code. Go to /usr/share/applications/code.desktop, copy it to ~/.gnome/apps (or wherever your desktop manager likes it) and change the Exec line to read something like:
Exec=sh -c "env LD_LIBRARY_PATH\=\$HOME/lib /usr/share/code/code" %U
The sh -c makes sure the command is evaluated and variables expanded, and env sets the variable itself. This is not very pretty, but not all desktop managers handle environment variables inside .desktop files the same way, so it's a sort of belt and suspenders approach.
I just tested this on Xenial (Ubuntu 16.04) inside vnc4server. Of course the real issue needs to be fixed upstream in Electron (I have to wonder why they don't have cleaner fallbacks for lack of graphics acceleration...)
Worked on CentOS 7 on x2go ; TYVM for this tip!
@rcarmo Thanks for the tip but it doesn't work (the tips above don't work neither). XRDP to Ubuntu Mate on Ubuntu Server running in AWS.
I just located the directory using dpkg -L visual-studio-code which pointed me to /usr/share/code.
After copying the modified version of libxcb.so.1 into that directory, I was able to start Code (but only works if I start it from /usr/share/code not by just typing code everywhere.