Skip to content

Instantly share code, notes, and snippets.

@abelardojarab
Last active December 17, 2017 00:21
Show Gist options
  • Select an option

  • Save abelardojarab/c43b9198f63edc0d94e85ee8ee61bcee to your computer and use it in GitHub Desktop.

Select an option

Save abelardojarab/c43b9198f63edc0d94e85ee8ee61bcee to your computer and use it in GitHub Desktop.
Fix Visual Studio not launching under vncserver

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment