The Visual Studio Code is a free IDE that Microsoft created for Windows, Linux and MacOS. It integrated GIT functions, you can also add various extensions to make it more useful.

It is powerful and easy to use. The problem for me initially was that it doesn’t seem to run in VNC sessions (I am using Ubuntu 14). Here are the message if I run using “code –verbose”.

 Xlib: extension "XInputExtension" missing on display ":1.0".
 Xlib: extension "XInputExtension" missing on display ":1.0".
 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
 (5:39:25 PM) ### VSCode main.js ###
 (5:39:25 PM) /usr/share/code/resources/app { pathArguments: [],
 programStart: 0,
 enablePerformance: false,
 verboseLogging: true,
 debugExtensionHostPort: undefined,
 debugBrkExtensionHost: false,
 logExtensionHostCommunication: false,
 debugBrkFileWatcherPort: undefined,
 openNewWindow: false,
 openInSameWindow: false,
 gotoLineMode: false,
 diffMode: false,
 extensionsHomePath: undefined,
 extensionDevelopmentPath: undefined,
 extensionTestsPath: undefined,
 disableExtensions: false,
 locale: undefined,
 waitForWindowClose: false }
 Xlib: extension "XInputExtension" missing on display ":1.0".
 Xlib: extension "XInputExtension" missing on display ":1.0".

 

I did find a working solution over internet. Kudos to @rcarmo.

https://www.bountysource.com/issues/31271515-vs-code-not-working-on-ubuntu-when-connected-using-xrdp

Here is a summary of  the changes needed:

# 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

And I created an alias to start code in my .bashrc

alias vscode='LD_LIBRARY_PATH=$HOME/lib code'

After that it works great.

If you are interested in Visual Studio Code, you can check it out at their official website.




How to Use Visual Studio Code in Ubuntu VNC Session?
Tagged on:         

One thought on “How to Use Visual Studio Code in Ubuntu VNC Session?

  • May 28, 2017 at 12:16 am
    Permalink

    Thank you very much. This worked. I tried several places but what you have above worked.

    Reply

Please tell us what's in your mind ...

%d bloggers like this: