4

I have installed Visual Studio Code on my Ubuntu Server 14.04 VM using the following method:

sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make
sudo apt-get update
sudo apt-get install ubuntu-make
umake web visual-studio-code

When I run ./Code, I get the following output:

[3796:1030/102647:ERROR:browser_main_loop.cc(173)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
[3810:1030/102647:ERROR:gl_implementation_osmesa.cc(22)] Failed to load libGL.so.1: libGL.so.1: cannot open shared object file: No such file or directory
[3810:1030/102647:ERROR:gpu_child_thread.cc(163)] Exiting GPU process due to errors during initialization
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
Code: Fatal IO error 11 (Resource temporarily unavailable) on X server 192.168.56.1:0.0.

X11 Forwarding is working OK (tested using xclock) so I'm wondering if it's possible to X11 Forward Visual Studio Code?

2
  • What about this line? Failed to load libGL.so.1: libGL.so.1: cannot open shared object file: No such file or directory Oct 30, 2015 at 1:14
  • I've since ran sudo apt-get install libgl1-mesa-glx to fix that dependency. I now see this error: [1419:1030/130517:ERROR:gl_surface_glx.cc(347)] GLX 1.3 or later is required
    – cvandal
    Oct 30, 2015 at 2:08

2 Answers 2

1

Yes it works. I just tested it.

First off, fix your dependencies

Failed to load libGL.so.1: libGL.so.1: cannot open shared object file: No such file or directory

What I did

I used a Virtualbox VM running Ubuntu 15.04, and VSCode. I did not have to install anything. Because it was the Desktop version, X11 libraries and such were already there.

I sshd in from an Ubuntu 15.10 workstation with ssh -Y and ran ./Code. It started up just fine.

Though I did get these errors, likely because it's a remote X11 rather than directly on a graphics card.

[3540:1029/214400:ERROR:browser_main_loop.cc(173)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
[3540:1029/214401:INFO:audio_manager_pulse.cc(258)] Failed to connect to the context.  Error: Connection refused
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
[3555:1029/214402:ERROR:gl_context_glx.cc(54)] Failed to create GL context with glXCreateContextAttribsARB.
[3555:1029/214402:ERROR:gpu_info_collector.cc(41)] gfx::GLContext::CreateGLContext failed
[3555:1029/214402:ERROR:gpu_info_collector.cc(95)] Could not create context for info collection.
[3555:1029/214402:ERROR:gpu_main.cc(411)] gpu::CollectGraphicsInfo failed (fatal).
[3555:1029/214402:WARNING:x11_util.cc(1474)] X error received: serial 65, error_code 2 (BadValue (integer parameter out of range for operation)), request_code 154, minor_code 34 (Unknown)
[3555:1029/214402:WARNING:x11_util.cc(1474)] X error received: serial 64, error_code 2 (BadValue (integer parameter out of range for operation)), request_code 53, minor_code 0 (X_CreatePixmap)
[3555:1029/214402:ERROR:gpu_child_thread.cc(163)] Exiting GPU process due to errors during initialization
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell

It doesn't seem to matter, VScode is working anyways.

5
  • I've since ran sudo apt-get install libgl1-mesa-glx to fix that dependency. I now see this error: [1419:1030/130517:ERROR:gl_surface_glx.cc(347)] GLX 1.3 or later is required. Is it possible to upgrade GLX to 1.3 on 14.04?
    – cvandal
    Oct 30, 2015 at 2:14
  • @cvandal Try running this to see what files/libs it's looking for: strace -e trace=open ./Code 2>&1 | grep NOENT. Once you think you know, use dpkg -S <file> to determine it's package. Then install it. Try again. Oct 30, 2015 at 2:25
  • Cheers, Ryan! Turns out, thanks to your strace idea, I have installed the necessary dependencies and that when I ran glxinfo, it was actually reporting the version from my host (Windows) which was running Xming 6.9.0.31. I've since made a donation to the devs to get the latest version and I am now able to X11 forward VSCode :)
    – cvandal
    Nov 1, 2015 at 22:35
  • How was your performance? I tried running it in VirtualBox, Headless Ubuntu 14.04 - Host running OS-X / XQuartz. It worked, but it was so slow that it was basically unusable.
    – Pete
    Dec 11, 2015 at 8:05
  • Using it from one ubuntu box to another and performance seems fine. Unnoticeable performance degradation. Trying to get it to work on a Windows box and am having trouble.
    – sam yi
    Aug 16, 2016 at 8:54
2

This is the solution that worked for me if you're coming from a Windows machine:

https://stackoverflow.com/a/40013437/3011683

User Frank Liu was nice enough to come back and answer his own question, which was to use VcXsrv rather than Xming. Apparently this is due to Xming not supporting some features VS code needed, but the referenced answer dosen't go into detail on why that is.

1
  • 1
    Welcome to superuser. While SO's a sister site, posts there could get deleted. It would be nice to have a little more detail on how this worked for you and what needs to be done, rather than a single link and a minimal explaination
    – Journeyman Geek
    Feb 2, 2017 at 9:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .