Vscode: VS Code not working on Ubuntu when connected using XRDP.

Created on 25 Feb 2016  ·  112Comments  ·  Source: microsoft/vscode

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?

electron help wanted linux upstream upstream-issue-linked

Most helpful comment

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

All 112 comments

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.

  • VSCode Version: 1.5.2 Linux deb version
  • OS Version: Windows 10 Pro Insider Preview
  • Remote Connection to: Ubuntu 16.04.1 LTS Desktop
  • Linux xrdp: Xfce-session

Steps to Reproduce:

  1. On Windos 10, open Remote Desktop application
  2. Connect to Linux machine using IP Address provided.
  3. At the Xfec session, click on "Applications | Development | Visual Studio Code"

Results:
Nothing opens

Provide VS Code Verbose results:
maxt@orion:~$ code --verbose
Xlib: extension "XInputExtension" missing on display ":10.0".
(4:29:39 PM) ### VSCode main.js ###
(4:29:40 PM) /usr/share/code/resources/app { _: [],
paths: [],
performance: false,
verbose: true,
debugPluginHost: undefined,
debugBrkPluginHost: undefined,
logExtensionHostCommunication: false,
'new-window': false,
'reuse-window': false,
goto: false,
diff: false,
extensionHomePath: undefined,
extensionDevelopmentPath: undefined,
extensionTestsPath: undefined,
'disable-extensions': false,
locale: undefined,
wait: false }
Xlib: extension "XInputExtension" missing on display ":10.0".
Xlib: extension "XInputExtension" missing on display ":10.0".

Try Workaround from:
https://github.com/Microsoft/vscode/issues/3451
https://github.com/Microsoft/vscode/issues/9016
https://github.com/Microsoft/vscode/issues/11873

Changing both '/usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0' and '/usr/lib/x86_64-linux-gnu/libxcb.so.1'
information: 's/BIG-REQUESTS/_IG-REQUESTS/' -> Didn't work!

This issue shouldn't be resolved with a workaround. It VS Code should work like JetBrains Python Editor "PC PyCharm" in a xrdp session.

pycharm_2016-09-18_18-10-30

See attached image:
vscode_notremoting_2016-09-18_17-43-13

In summary! I was able to make it work in Ubuntu 16.04.1 remote session.

There are two files I changed which I don't know which is the correct one:
libxcb.so.1 and libxcb.so.1.1.0

Here are the steps for the workaround:

  1. Using (sudo su) nautilus, Search and found files on folder "/usr/lib/x86_64-linux-gnu"
  2. Backup both files to a backup folder.
  3. Then, execute the following command (sudo su):
  4. sudo sed -i 's/BIG-REQUESTS/_IG-REQUESTS/' /usr/lib/x86_64-linux-gnu/libxcb.so.1
  5. sudo sed -i 's/BIG-REQUESTS/_IG-REQUESTS/' /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
  6. Copy both files to "/usr/share/code"
  7. In Windows, open Remote Desktop connection, assign Linux IP-Address.
  8. In Linux Remote session, click on the Applications menu, go to Development, then Visual Studio Code and the application open.

Honestly, there most be a better way to do this but it works.
xrdp_code-session

@rcarmo This worked perfectly on Ubuntu 16.04 and IMO the best workaround. Modifying that file globally broke my wireshark install, but this doesn't and is simple to do. Thank you!

@wirecat : thanks. I've just added a few more notes to my original comment. I don't know why it didn't work for other people, but I've used this around a dozen times, since I routinely deploy new development VMs and have the whole thing scripted by now. Hasn't failed me yet.

FYI.. The image may not be clear enough. I'm demonstrating Remote Desktop connection from within Windows 2016 VM to my Physical Ubuntu laptop. I'm using Xfce Session which I couldn't make VS Code to work via xrdp unless I use the above set of instructions.

VS Code in Ubuntu works Great!

:)

@rcarmo Your fix works for me.
Thanks

Thanks @rcarmo. Worked with no issues.

This is the upstream issue if anyone wants to look into it https://github.com/electron/electron/issues/2256, I'd love to get it fixed in Electron instead of relying on this hack.

11/26/2016
Just an FYI

This issue still hasn't been resolved. I just installed the VS Code Insider version and doesn't work when using XRDP.

I had to copy over the two files: libxcb.so.1 and libxcb.so.1.1.0 from 'usr/share/code' into /usr/share/code-insider' folder and it WORKS!!

:)

Here's my solution for running vs code in a remote ubuntu desktop:

http://pjsjava.blogspot.no/2016/12/my-vnc-based-development-environment.html

I installed libxss1 and libasound2 in order to get vs code to run (no hack with libxcb).

@rcarmo 's solution works for me.
I'm using on the remote: MATE, x2go server, CentOS 7
and on the client: OS X, x2go client, quartz

It also works with XFCE if you don't have MATE

For me it's working out of the box, but performance is bad. I'm using Ubuntu 16.04 through X11rdp. I've been using Emacs under Xfce flawlessly, with top performance. I move thru text, scrolling, etc perfectly, almost like working on local. But with VSCode (same rdp session, Emacs/VSCode side by side) I got a lot of redraw flickering and cursor jump, barely usable. CPU is at 40% max, so it's not a machine performance problem.

I tried @MaximoTrinidad approach in my Ubuntu xenial VM in Azure with Mate Desktop and everything worked fine!!

@javierglozano Do you get good performance? For me VSCode works, but UI performance is too bad, unusable. There is a notable lag between key presses and screen actions. Within the same session, Emacs performance is perfect.

@Peluko I would say that Code performance is at least as good/bad as my desktop performance. Now I'm using xfce with a D3_V2 VM and Code performs acceptable (Chromium performance when refreshing canvas is more than worse)

If you want to avoid the risk of changing system libraries -
In your home directory:
mkdir lib
cp /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0 lib/
cd lib
ln -s libxcb.so.1.1.0 libxcb.so
ln -s libxcb.so.1.1.0 libxcb.so.1
sed -i 's/BIG-REQUESTS/_IG-REQUESTS/' libxcb.so.1.1.0

Then to run code - in a terminal session -
export LD_LIBRARY_PATH=$HOME/lib
code

You can also change your desktop file for code to set LD_LIBRARY_PATH before running code

The libgconf-2-4 package might be missing preventing the application to launch.
This might help:
sudo apt-get install libgconf-2-4

The libgconf-2-4 package might be missing preventing the application to launch.

This was added as a dependency in the .deb recently (coming in 1.12).

goone, you are a stud. the SED line works for the ubuntu 14.04 GUI.
sudo sed -i 's/BIG-REQUESTS/_IG-REQUESTS/' /usr/lib/x86_64-linux-gnu/libxcb.so.1

@groone exactly what I was looking for, thanks!

hi

any permanent fix for this issue yet??
i am on debian jessie trying to connect over relavnc viewer
i used the hack by @groone . it works inconsistently. sometimes it works and some times it doesnt. the vscode just freezes

i wish there is more permanent solution

other applications like ANdroid studio work perfectly without any issues.

any suggestions?

thanks

Hello.
It works for XFCE x2go (xubuntu 16.04)

sudo cp /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0 /usr/share/code/libxcb.so.1
sudo sed -i 's/BIG-REQUESTS/_IG-REQUESTS/' /usr/share/code/libxcb.so.1

I don't have the rights to exectu this command :/ has someone another idea ?

I've done to resolve the dependency and the hack workaround. However, I still have an error. I use MobaXterm as X Server and my machine is Surface book 2 15 inch. I still have this error.

[552:0309/200728.635265:ERROR:sandbox_linux.cc(343)] InitializeSandbox() called
 with multiple threads in process gpu-process.
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.3 LTS"
ver

Microsoft Windows [Version 10.0.16299.248]

Hi @TsuyoshiUshio,

I would recommend to try using VcXsrv application. It works work me on Windows 10.
You can install it from Cocholatey site:

choco install VcXsrv

Of course, you'll need to install the Chocolatey Package Management in Windows:
https://chocolatey.org/

:)

For Raspberry Pi 3 B+
First find libxcb.so.1 location ( for me this is /usr/lib/arm-linux-gnueabihf )
Then:

mkdir ~/lib
cp /usr/lib/arm-linux-gnueabihf/libxcb.so.1 ~/lib
sed -i 's/BIG-REQUESTS/_IG-REQUESTS/' ~/lib/libxcb.so.1
sudo cp ~/lib/libxcb.so.1 /usr/share/code-oss 

A lot of similar issues have been marked as duplicate and redirected to here, but this ticket is pointing to an upstream ticket https://github.com/electron/electron/issues/2256 which was closed due to Closing due to abandonment. (Not sure why abandoned that ticket). This deadlock situation might make this ticket open forever.

This problem seems to have been fixed in Ubuntu 18.04. Since installing 18.04 I have been using code with xrdp without any patch and with no problems, xrdp in 18.04 is changed and that may have fixed it.

@bennettpeter

Thanks for the previous comment on running VS Code in Ubuntu 18.04. I haven't try yet!
:)

Hi i am having the same issue on centos. Anyone knows how to solve?

@roterdam & @groone,

Thanks a lot! That trick worked for me on ubuntu 16.04

All the solutions do not works for me...16.04 xubuntu

I would be nice if this issued was fixed.

It is fixed in Ubuntu 18.04.

My issue is with centos 7. I saw other comment having that issue in this ticket and commented because the ticket is still open.

It worked in ubuntu 14.04.

@hannesne do you still see this?

@bpasero I think this is still an issue, got this recently https://github.com/Microsoft/vscode-docs/pull/1831

still an issue: https://github.com/Microsoft/vscode/issues/35530 - workaround there worked best for me

Is that issue is related to X11 Forward access via SSH with X or Y options too?

This fix worked for me: https://github.com/Microsoft/vscode/issues/33879#issuecomment-345896868

Note this doesn't involve anything crazy like in the other replies of sed replacing text inside a shared library, the comment above shows how to disable BIG-REQUESTS in x2go via a config file setting. After restarting my remote session vscode started up without issue.

Re Ubuntu 18.04 and VNC (and XFCE4): note that Ubuntu packages multiple VNC server implementations:

  • If you are using the Ubuntu 18.04 provided RealVNC/TightVNC server (i.e. the vnc4server/tightvncserver package) then you will need to use one of the broken BIG-REQUESTS workarounds (e.g. nobbling the libxcb.so.1 library) otherwise code will quietly fail to start.
  • If you are using the Ubuntu 18.04 provided TigerVNC server (i.e. the tigervnc-standalone-server package) then you will find code starts without any workarounds (perhaps tigervncserver ships with a working BIG-REQUESTS implementation?).

If you are launching an Ubuntu installed VNC server via the vncserver command use

update-alternatives --list vncserver

to see which implementation you are using. The "solution" for me was to switch from using the TightVNC server to using the TigerVNC server.

(Could someone also add VNC to the title of this issue?)

Seeing this on CentOS 7.6.1810, after all these fixes in the end which is the one I need to use? I'm using a clean install of CentOS displaying via SSH X11 Forwarding. Able to display 'konsole', so the forwarding is working. Error from running code:

code --verbose
[main 9:17:18 PM] Starting VS Code
[main 9:17:18 PM] from: /usr/share/code/resources/app
[main 9:17:18 PM] args: { _: [],
  help: false,
  h: false,
  version: false,
  v: false,
  wait: false,
  w: false,
  diff: false,
  d: false,
  add: false,
  a: false,
  goto: false,
  g: false,
  'new-window': false,
  n: false,
  'unity-launch': false,
  'reuse-window': false,
  r: false,
  'open-url': false,
  performance: false,
  p: false,
  'prof-startup': false,
  verbose: true,
  logExtensionHostCommunication: false,
  'disable-extensions': false,
  disableExtensions: false,
  'list-extensions': false,
  'show-versions': false,
  nolazy: false,
  issue: false,
  'skip-getting-started': false,
  'skip-release-notes': false,
  'sticky-quickopen': false,
  'disable-restore-windows': false,
  'disable-telemetry': false,
  'disable-updates': false,
  'disable-crash-reporter': false,
  'skip-add-to-recently-opened': false,
  status: false,
  s: false,
  'file-write': false,
  'file-chmod': false,
  'driver-verbose': false,
  trace: false }
[main 9:17:18 PM] Resolving machine identifier...
[main 9:17:18 PM] Resolved machine identifier: 2f724d255357f36e6704135f0f60c5c84060741cdff6f8e533ef08d1cb4ded7f
[main 9:17:18 PM] [storage :memory:] open()
[main 9:17:18 PM] telemetry/optInStatus { optIn: true }
[main 9:17:18 PM] [storage :memory:] Trace (event): PRAGMA user_version = 1;
[main 9:17:18 PM] [storage :memory:] Trace (event): CREATE TABLE IF NOT EXISTS ItemTable (key TEXT UNIQUE ON CONFLICT REPLACE, value BLOB)
[main 9:17:18 PM] [storage :memory:] getItems(): Map(0) {}
[main 9:17:18 PM] update#setState idle
[main 9:17:18 PM] windowsManager#open
[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
code: xcb_io.c:259: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.

@karezza Your issue looks different to the one mentioned here and is likely worth a separate issue of its own.

This issue covers the problem of people running code under (VNC-like) X servers with a buggy BIG-REQUEST implementation. You're using X forwarding (via SSH) so it's unlikely either X server (local or remote) in your case has a buggy BIG-REQUEST implementation...

(@karezza I did a quick search via https://www.google.com/?q=visual+studio+code+%22xcb_xlib_threads_sequence_lost%22 and ended up at #35553 . You're not running your local X via Windows' WSL are you?)

I'm not. I'm running Xming.

Sorry to cut in on this conversation, but I'm having the same issue. Also, what's Xming? It sounds interesting.

@karezza ah I didn't mean "are you running everything on WSL", I meant "are you running a local X (e.g. via Xming) on Windows Subsystem for Linux and having the session posted back over SSH X remoting" (which was more to type :-). Given that you're using Xming I think #35553 is the issue for you.

@JL2210 we're getting a bit off-topic but Xming is an X11 server implementation for Windows (see https://en.wikipedia.org/wiki/Xming ). If you're struggling to run code under an X server that might be based off old X11 code which contained a certain type of bug (e.g. certain VNC-like/XRDP X servers) and you're seeing the issue described here then I think you're following the right issue (but then the workarounds will, er, work for you). If you're in some other set up then I suspect this is not the right issue for you even though it may sound similar to what you're seeing...

35553 looks right. Kind of a sudden... not supported. I would have thought this setup would have been almost the most common. I had always thought using XServer was normal for Linux, and has the interesting benefit that you could have an XServer running pretty much anywhere and display there. ... does not appear to be the case with this product. I've recently become interested in using PowerShell w/ .net core for Linux, but I will need some sort of ISE / vscode, with suggestion/tab-completion before its use will be practical. Thanks for the info guys.

I managed to fix this with a single command, don't need to override LD_LIBRARY_PATH, it works for all users of the server system, and doesn't mess with applications other than code. I do have to write to / though.

sed 's/BIG-REQUESTS/_IG-REQUESTS/' /usr/lib/x86_64-linux-gnu/libxcb.so.1 | sudo tee /usr/share/code/libxcb.so.1 > /dev/null

That doesn't seem like a good idea... Messing with libraries is pretty
dangerous.

my sed command makes a copy in /usr/share/code. i'm not messing with the library file itself with -i

I know, however modifying libraries is still dangerous. If you changed the
length of the file at all there could be serious repercussions (e.g.
Segmentation faults).

On Sat, Jan 5, 2019, 6:45 PM Jayen Ashar <[email protected] wrote:

my sed command makes a copy in /usr/share/code. i'm not messing with the
library file itself with -i


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/vscode/issues/3451#issuecomment-451702054,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AlC1CZPhNnoYXL2ZPGNbcA71JToQRXQ8ks5vATkRgaJpZM4HioO2
.

sure, but only code would be affected, same as @rcarmo 's solution...

No code changes needed, just do this below it worked for me:

/etc/x2go/x2goagent.options:

X2GO_NXAGENT_DEFAULT_OPTIONS+=" -extension BIG-REQUESTS"

On Sat, Jan 5, 2019, 6:57 PM Jayen Ashar <[email protected] wrote:

sure, but only code would be affected, same as @rcarmo
https://github.com/rcarmo 's solution...


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/vscode/issues/3451#issuecomment-451702672,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABe33sJ3k82oX6An0VIGHS4_QMe8L61ks5vATvngaJpZM4HioO2
.

See, now that's a less "hacky" solution.

agreed, but i'm using vnc

I work around it by using @AlexZeitler and @rcarmo , which i copy the libxcb.so.1 to /usr/share/code and change it as @rcarmo and then build a softlink to /usr/share/code/code.

I have the same problem, and i already tried to fix it via the "BIG-REQUESTS/_IG-REQUESTS" method but without success.

EDIT:
I was making mistakes while applying the fix. Now it works. Many thanks to @paulirotta for the helping comment!

$ code --verbose
[25325:0307/171153.292515:ERROR:bus.cc(394)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[25325:0307/171153.468003:ERROR:bus.cc(394)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[25325:0307/171153.468305:ERROR:bus.cc(394)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[25325:0307/171153.468543:ERROR:bus.cc(394)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[main 2019-03-07T16:11:53.467Z] Starting VS Code
[main 2019-03-07T16:11:53.469Z] from: /usr/share/code/resources/app
[main 2019-03-07T16:11:53.469Z] args: { _: [],
  diff: false,
  add: false,
  goto: false,
  'new-window': false,
  'reuse-window': false,
  wait: false,
  version: false,
  help: false,
  'list-extensions': false,
  'show-versions': false,
  verbose: true,
  status: false,
  'prof-modules': false,
  'prof-startup': false,
  'disable-extensions': false,
  'disable-gpu': false,
  'max-memory': false,
  logExtensionHostCommunication: false,
  'skip-getting-started': false,
  'skip-release-notes': false,
  'sticky-quickopen': false,
  'disable-restore-windows': false,
  'disable-telemetry': false,
  'disable-updates': false,
  'disable-crash-reporter': false,
  'skip-add-to-recently-opened': false,
  'unity-launch': false,
  'open-url': false,
  nolazy: false,
  issue: false,
  'file-write': false,
  'file-chmod': false,
  'driver-verbose': false,
  force: false,
  'prof-code-loading': false }
[main 2019-03-07T16:11:53.471Z] Resolving machine identifier...
[main 2019-03-07T16:11:53.471Z] Resolved machine identifier: 19b239ed6a0bede593e1d138f74344f5e5d94758855584663f1ca2d083da61d9
[main 2019-03-07T16:11:53.474Z] telemetry/optInStatus { optIn: true }
[main 2019-03-07T16:11:53.474Z] telemetry/machineIdFallback { usingFallbackGuid: false }
[main 2019-03-07T16:11:53.475Z] [storage state.vscdb] open(/home/felix/.config/Code/User/globalStorage/state.vscdb, retryOnBusy: true)
[25325:0307/171153.475488:WARNING:power_observer_linux.cc(162)] Failed to connect to PrepareForShutdown
[25325:0307/171153.475550:WARNING:power_observer_linux.cc(162)] Failed to connect to PrepareForSleep
[25325:0307/171153.475563:WARNING:power_observer_linux.cc(63)] org.freedesktop.login1 not available
[main 2019-03-07T16:11:53.483Z] [storage state.vscdb] Trace (event): PRAGMA user_version = 1;
[main 2019-03-07T16:11:53.501Z] [storage state.vscdb] Trace (event): CREATE TABLE IF NOT EXISTS ItemTable (key TEXT UNIQUE ON CONFLICT REPLACE, value BLOB)
[main 2019-03-07T16:11:53.502Z] [storage state.vscdb] Trace (event): SELECT * FROM ItemTable
[main 2019-03-07T16:11:53.503Z] [storage state.vscdb] getItems(): Map(27) {
...
}
[main 2019-03-07T16:11:53.505Z] update#setState idle
[main 2019-03-07T16:11:53.507Z] windowsManager#open
[25325:0307/171153.640870:ERROR:browser_main_parts.cc(135)] X IO error received (X server probably went away)
$

@FelixQuehl

There's a few things to be in place beside the string fix.

Have you checked the following link? https://github.com/Microsoft/vscode/issues/12233
:)

@FelixQuehl The old fix from "groon" May 8 2016 above still works. It is sad that this issue still dangles around. It worked in Windows Subsystem for Linux / Ubuntu at least.

For convenience: sudo sed -i 's/BIG-REQUESTS/_IG-REQUESTS/' /usr/lib/x86_64-linux-gnu/libxcb.so.1

@paulirotta @MaximoTrinidad Thank you very much! It seems that i was making a mistake during the fix. I just executed the command you posted:

sudo sed -i 's/BIG-REQUESTS/_IG-REQUESTS/' /usr/lib/x86_64-linux-gnu/libxcb.so.1

Afterwards I could start vscode but i recognized that i was unable to resize or drag the window.
To resolve this problem i applied another fix from @Tyriar which was to add this line

{ "window.titleBarStyle": "native"  }

to this file:

~/.config/Code/User/settings.json

Thank you all and much love to the community!

@FelixQuehl

Awesome!!

:)

A note for those trying the BIG-REQUESTS hack on Xubuntu 18.04 + VNC (tightvnc) with VS Code installed via a Snap -- the workaround didn't work. I had to remove the snap and install VS Code from a .deb. I'm not sure if it's the Snap's security model -- perhaps it doesn't respect LD_LIBRARY_PATH?

@scovetta I think snaps use LD_LIBRARY_PATH as one of the things to do the sandboxing and use the internal libs

folks - I admit to being a unix novice, however trying to set this up had been a total cluster. I have an ubuntu 16.04 VM set up on AWS. The manual VS-CODE install appeared to run fine. However I get this same issue.
When I attempt to edit that file (/usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0) in either UTF-8 or UNICODE it comes up as gibberish - it's not editable. Same with the ".1" file. What am I missing?
I've been using RDP from Windows 10 using Putty to tunnel the X session and it works fine for launching the XFCE (?) GUI, Chrome, etc. VS-CODE does nothing however.
I even installed XMing - and it works for Firefox, but not for VS-CODE.
I just installed the latest version of VS-CODE, but I"m not sure what the origin is of that libxcb file - don't know why mine would be different from everyone else's here.
Appreciate any help getting this working...ideally a better/more perm fix than editing this file - but if that's all I can do....I obviously need some coaching.

TIA !

p.s. - the file(s) appear as binary or compressed - anything but text.

Secondly, the verbose output from manually launching 'code' :

[main 2019-10-22T01:09:26.307Z] Starting VS Code
[main 2019-10-22T01:09:26.312Z] from: /usr/share/code/resources/app
[main 2019-10-22T01:09:26.312Z] args: { _: [], verbose: true, diff: undefined }
[main 2019-10-22T01:09:26.314Z] Resolving machine identifier...
[main 2019-10-22T01:09:26.315Z] Resolved machine identifier: 7e8a785c0bee2372fa33c7eef84c3799cb1191009b462f78d101de9512637210 (trueMachineId: undefined)
[main 2019-10-22T01:09:26.335Z] update#setState idle
[main 2019-10-22T01:09:26.339Z] [storage state.vscdb] open(/home/bitnami/.config/Code/User/globalStorage/state.vscdb, retryOnBusy: true)
[main 2019-10-22T01:09:26.340Z] lifecycle (main): phase changed (value: 2)
[main 2019-10-22T01:09:26.342Z] windowsManager#open
[6505:1022/010927.090905:ERROR:browser_main_parts.cc(137)] X IO error received (X server probably went away)

don't try modifying the file with a text editor - as you have discovered it's not text but compiled code

this command will make a modified copy for vscode (only) to use:

sed 's/BIG-REQUESTS/_IG-REQUESTS/' /usr/lib/x86_64-linux-gnu/libxcb.so.1 | sudo tee /usr/share/code/libxcb.so.1 > /dev/null

thanks so much for the clarification - I was afraid to try this until I
knew for sure....

This worked - thank you!

Q: would the instructions using vi have worked also? I wasn't aware vi
could edit files of this type.

On Mon, Oct 21, 2019 at 10:10 PM Jayen Ashar notifications@github.com
wrote:

don't try modifying the file with a text editor - as you have discovered
it's not text but compiled code

this command will copy the file and modify it for vscode use only.

sed 's/BIG-REQUESTS/_IG-REQUESTS/' /usr/lib/x86_64-linux-gnu/libxcb.so.1 |
sudo tee /usr/share/code/libxcb.so.1 > /dev/null


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/microsoft/vscode/issues/3451?email_source=notifications&email_token=AMUZ4O6T5JW5ICKIVWI3V3DQPZOH5A5CNFSM4B4KQO3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEB4KW4Q#issuecomment-544779122,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AMUZ4O7KZCBTXH62M5TO7R3QPZOH5ANCNFSM4B4KQO3A
.

@rcarmo thanks rcarmo very much , i have spent many time using vscode through vnc,unfortunately all of them failed and i had given up before i met your answers. if you could change some ,it will be more convenient for someone who is newcomer like me.

LD_LIBRARY_PATH=$HOME/lib code ---> export LD_LIBRARY_PATH=$HOME/lib code
Exec=sh -c "env LD_LIBRARY_PATH\=\$HOME/lib /usr/share/code/code" %U ---> sh -c "env LD_LIBRARY_PATH\=\$HOME/lib /usr/share/code/code" %U ( I spent some time in here)

an adviser from a newcomer to linux and native language is not english .

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.

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)

I get it to work with snap like that: https://github.com/microsoft/vscode/issues/86372#issuecomment-563924444

A note for those trying the BIG-REQUESTS hack on Xubuntu 18.04 + VNC (tightvnc) with VS Code installed via a Snap -- the workaround didn't work. I had to remove the snap and install VS Code from a .deb. I'm not sure if it's the Snap's security model -- perhaps it doesn't respect LD_LIBRARY_PATH?

https://github.com/microsoft/vscode/issues/86372#issuecomment-563924444
The above link works, but I got annoyed with updates breaking it so I have a modified the non-snap solution to work via LD_PRELOAD instead of LD_LIBRARY_PATH and it works.

create the modified lib

  • mkdir ~/lib
  • cp /usr/lib/x86_64-linux-gnu/libxcb.so.1 ~/lib
  • sed -i 's/BIG-REQUESTS/_IG-REQUESTS/' ~/lib/libxcb.so.1
  • LD_PRELOAD=$HOME/lib/libxcb.so.1 code

@groone Thanks! its worked you are a savior

#86372 (comment)
The above link works, but I got annoyed with updates breaking it so I have a modified the non-snap solution to work via LD_PRELOAD instead of LD_LIBRARY_PATH and it works.

create the modified lib

  • mkdir ~/lib
  • cp /usr/lib/x86_64-linux-gnu/libxcb.so.1 ~/lib
  • sed -i 's/BIG-REQUESTS/_IG-REQUESTS/' ~/lib/libxcb.so.1
  • LD_PRELOAD=$HOME/lib/libxcb.so.1 code

On top of this, I made an alias to inject the LD_PRELOAD variable whenever "code" is executed.

In your shell config,

alias code="LD_PRELOAD=$HOME/lib/libxcb.so.1 code"

This issue has been around for a few years, more since the beginning of VSCode. I'm surprised that they still leave it to us to do the hack instead of fixing it.

This issue has been around for a few years, more since the beginning of VSCode. I'm surprised that they still leave it to us to do the hack instead of fixing it.

yes, it's super annoying. Why can't they just fix that?

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

#86372 (comment)
The above link works, but I got annoyed with updates breaking it so I have a modified the non-snap solution to work via LD_PRELOAD instead of LD_LIBRARY_PATH and it works.
create the modified lib

  • mkdir ~/lib
  • cp /usr/lib/x86_64-linux-gnu/libxcb.so.1 ~/lib
  • sed -i 's/BIG-REQUESTS/_IG-REQUESTS/' ~/lib/libxcb.so.1
  • LD_PRELOAD=$HOME/lib/libxcb.so.1 code

On top of this, I made an alias to inject the LD_PRELOAD variable whenever "code" is executed.

In your shell config,

alias code="LD_PRELOAD=$HOME/lib/libxcb.so.1 code"

Thanks a lot!

mkdir ~/lib
cp /usr/lib/x86_64-linux-gnu/libxcb.so.1 ~/lib
sed -i 's/BIG-REQUESTS/_IG-REQUESTS/' ~/lib/libxcb.so.1
echo 'alias code="LD_PRELOAD=$HOME/lib/libxcb.so.1 code"' > ~/.bash_aliases
bash

code --version
1.44.2
ff915844119ce9485abfe8aa9076ec76b5300ddd
x64

works like a charm on ubuntu_18.04+novnc+xfce4

@FelixQuehl The old fix from "groon" May 8 2016 above still works. It is sad that this issue still dangles around. It worked in Windows Subsystem for Linux / Ubuntu at least.

For convenience: sudo sed -i 's/BIG-REQUESTS/_IG-REQUESTS/' /usr/lib/x86_64-linux-gnu/libxcb.so.1

This worked perfectly fine for me! Thanks a lot. Mine was a ubuntu 18.04 LTS with LXDE over TightVNCServer. Accessing through screenshare app from Mac.

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...)

I'm use ubuntu vnc too. The exec cmd need --no-sandbox parameter.

if no that, vscode will fail:
[27719:0916/111425.651934:FATAL:electron_main_delegate.cc(275)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
Trace/breakpoint trap (core dumped)

vscode version:
version: 1.49.0
Commit: e790b931385d72cf5669fcefc51cdf65990efa5d
Date: 2020-09-10T13:20:50.359Z (5 days ago)
Electron: 9.2.1
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Linux x64 4.4.0-184-generic

This problem no longer happens with xubuntu 20.04 and the latest vs code. I don't know when or where it was fixed, but I have not used the workaround for a long time and vs code now runs fine under xrdp.

I'm running xubuntu 20.04 with a tighvnc server and I still need the workaround.

same problem (the workaround works) with Ubuntu 20.04 with XMing via SSH (with X11 forwarding), no problem for running vscode without X11 Forwarding

#86372 (comment)
The above link works, but I got annoyed with updates breaking it so I have a modified the non-snap solution to work via LD_PRELOAD instead of LD_LIBRARY_PATH and it works.

create the modified lib

  • mkdir ~/lib
  • cp /usr/lib/x86_64-linux-gnu/libxcb.so.1 ~/lib
  • sed -i 's/BIG-REQUESTS/_IG-REQUESTS/' ~/lib/libxcb.so.1
  • LD_PRELOAD=$HOME/lib/libxcb.so.1 code

This saved the day for me.

The resolution to this issue has been around for a few years now.
I'm not sure WHY forcing us to continue to manually fix it ourselves. This should have been resolved a long time ago.
;(

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!

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 which workaround? mine is at https://github.com/microsoft/vscode/issues/3451#issuecomment-544779122

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 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'
}

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 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...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

omidgolparvar picture omidgolparvar  ·  3Comments

ryan-wong picture ryan-wong  ·  3Comments

biij5698 picture biij5698  ·  3Comments

mrkiley picture mrkiley  ·  3Comments

lukehoban picture lukehoban  ·  3Comments