Skip to content

VS Code not working on Ubuntu when connected using XRDP. #3451

Closed as not planned

Description

@hannesne

Hi, it seems like the bug with either Atom or XRDP discussed in Atom issue here: atom/atom#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?

Activity

  1. added
    help wantedIssues identified as good community contribution opportunities
    linuxIssues with VS Code on Linux
    on Mar 10, 2016
  2. roterdam commented on Mar 21, 2016

    @roterdam

    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.

    Daniel Imms (@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.

  3. Tyriar commented on Apr 4, 2016

    @Tyriar
    Contributor

    Same issue tracked in atom atom/atom#4360, here's the upstream electron issue electron/electron#2256

  4. added
    upstreamIssue identified as 'upstream' component related (exists outside of VS Code)
    bugIssue identified by VS Code Team member as probable bug
    and removed
    help wantedIssues identified as good community contribution opportunities
    on Apr 4, 2016
  5. joeaudette commented on Apr 18, 2016

    @joeaudette

    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

  6. joeaudette commented on Apr 18, 2016

    @joeaudette

    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

  7. roterdam commented on Apr 21, 2016

    @roterdam

    Joe Audette (@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.

  8. joeaudette commented on Apr 22, 2016

    @joeaudette

    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.

  9. Tyriar commented on Apr 22, 2016

    @Tyriar
    Contributor

    Joe Audette (@joeaudette) I believe the latest insiders build was upgraded to Electron 0.37.6 (#5378) 2 days ago.

  10. AlexZeitler commented on Apr 26, 2016

    @AlexZeitler

    Just updated to the latest Insiders build on Ubuntu 14.04. Still doesn't work via RDP.

  11. groone commented on May 8, 2016

    @groone

    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
  12. 112 remaining items

  13. jayenashar commented on Nov 6, 2020

    @jayenashar

    This is still not working for me, neither is the work around. It has been known for four years, surely, something can be done about this!

    Dantali0n (@Dantali0n) which workaround? mine is at #3451 (comment)

    Yes, I get:

    buffer.js:585
        slice: (buf, start, end) => buf.utf8Slice(start, end),
                                        ^
    
    RangeError: Index out of range
        at Object.slice (buffer.js:585:37)
        at Buffer.toString (buffer.js:782:14)
        at Object.readFileSync (fs.js:386:41)
        at Object.fs.readFileSync (electron/js2c/asar.js:542:40)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:1050:22)
        at Module.load (internal/modules/cjs/loader.js:862:32)
        at Module._load (internal/modules/cjs/loader.js:774:14)
        at Function.Module._load (electron/js2c/asar.js:769:28)
        at Function.Module.runMain (internal/modules/cjs/loader.js:1103:10)
        at internal/main/run_main_module.js:17:11 {
      code: 'ERR_OUT_OF_RANGE'
    }
    

    i don't think that is related to this issue...

  14. duskygloom commented on Dec 23, 2020

    @duskygloom

    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.
    Daniel Imms (@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.

    for me it was sudo vi /usr/lib/aarch64-linux-gnu/libxcb.so.1.1.0
    and it worked! vscode on android! (on ubuntu on termux)

    Can you please help me with that? I'm also having the same problem, but am not able to fix it

  15. bennettpeter commented on Dec 23, 2020

    @bennettpeter

    What version of ubuntu are you using? I use xubuntu and I had this problem on xenial (16.04). However in 18.04 and 20.04 this is no longer a problem, vs code just works under xrdp with no change. Perhaps some other issue is causing your problem.

  16. duskygloom commented on Dec 23, 2020

    @duskygloom

    What version of ubuntu are you using? I use xubuntu and I had this problem on xenial (16.04). However in 18.04 and 20.04 this is no longer a problem, vs code just works under xrdp with no change. Perhaps some other issue is causing your problem.

    It maybe a bit off track... but I'm actually using debian 10.1

  17. defenestratexp commented on Dec 28, 2020

    @defenestratexp

    The sed BIG_REQUESTS thing worked for me. Using fluxbox 1.35 as the wm. Served with tightvnc. Accessing the desktop via the viewer built into guacamole, but that appears to be irrelevant

  18. isanmu commented on Sep 22, 2023

    @isanmu

    Use code --user-data-dir=/tmp/remote.

    $ code --help
    ...
      --user-data-dir <dir>             Specifies the directory that user data is
                                        kept in. Can be used to open multiple
                                        distinct instances of Code.
    ...
    

    I'm sure they just pass it through to chromium, because I have to use the same flag for it when using xrdp with multiple sessions.

    https://chromium.googlesource.com/chromium/src.git/+/master/docs/user_data_dir.md

    Thanks a lot. This method worked for me! (PS. sed BIG_REQUESTS thing didn't work for me.)

  19. YLRK commented on Nov 1, 2023

    @YLRK

    When I encountered the same problem in Ubuntu20, I did not solve it by modifying the lib method above. Instead, I solved it by adding a command to the launcher.
    image
    Add the --no-sandbox command to open it
    /usr/share/code/code --unity-launch --no-sandbox %F

    • VS Code Version: 1.83.1
    • OS Version: Ubuntu 20.04.6 LTS
  20. Niclorix commented on Nov 9, 2023

    @Niclorix
  21. deepak1556 commented on Dec 12, 2023

    @deepak1556
    Collaborator

    Closing as issue is in upstream component and it does not seem actionable from our end. Things have improved since the issue was created, you can now use our remote development suite as a workaround.

  22. locked as resolved and limited conversation to collaborators on Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

electronIssues and items related to Electronhelp wantedIssues identified as good community contribution opportunitieslinuxIssues with VS Code on Linuxremote-desktopupstreamIssue identified as 'upstream' component related (exists outside of VS Code)upstream-issue-linkedThis is an upstream issue that has been reported upstream

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions