I am facing a problem when trying to open VS Code on my Virtual machine in Google cloud using VNC viewer. It's Real VNC, and I checked that vscode is not running in multiple VNC sessions.
The VM is running Ubuntu 18.04 LTS.
I was able to install the application [VS Code] and see it listed with the other applications, but I am not able to open it, either by clicking on the icon or running it via the terminal.
When I tried to run VS code through the terminal, it didn't give any errors!
I tried to follow a related issue on Github, but I was not able to solve my problem.
For installation, I installed the deb package from the VS code website and did sudo dpkg –i <package_name> to install it.
After following Robot Johnny's answer below,
this is the response for code --verbose:
Xlib: extension "XInputExtension" missing on display ":1".
Xlib: extension "RANDR" missing on display ":1".
Xlib: extension "XInputExtension" missing on display ":1".
[13988:1206/040556.509538:ERROR:gl_surface_glx.cc(425)] glxQueryVersion failed
[13988:1206/040556.509600:ERROR:gl_initializer_x11.cc(147)] GLSurfaceGLX::InitializeOneOff failed.
[13988:1206/040556.510808:ERROR:viz_main_impl.cc(170)] Exiting GPU process due to errors during initialization
[13966:1206/040556.517587:WARNING:gpu_process_host.cc(1193)] The GPU process has crashed 1 time(s)
Xlib: extension "XInputExtension" missing on display ":1".
[13966:1206/040556.554491:WARNING:gpu_process_host.cc(967)] Reinitialized the GPU process after a crash. The reported initialization time was 14 ms
[main 2019-12-06T04:05:56.578Z] Starting VS Code
[main 2019-12-06T04:05:56.579Z] from: /usr/share/code/resources/app
[main 2019-12-06T04:05:56.579Z] args: {
_: [],
diff: false,
add: false,
goto: false,
'new-window': false,
'reuse-window': false,
wait: false,
version: false,
help: false,
telemetry: false,
'list-extensions': false,
'show-versions': false,
verbose: true,
status: false,
'prof-startup': false,
'disable-extensions': false,
'disable-gpu': false,
'extension-development-confirm-save': 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,
'disable-user-env-probe': false,
'skip-add-to-recently-opened': false,
'unity-launch': false,
'open-url': false,
'file-write': false,
'file-chmod': false,
'driver-verbose': false,
force: false,
trace: false,
'force-user-env': false,
'no-proxy-server': false,
nolazy: false
}
[main 2019-12-06T04:05:56.580Z] Resolving machine identifier...
[main 2019-12-06T04:05:56.581Z] Resolved machine identifier: 8195d34eeeec20241a1db1a84b63b5309fc06715a4960b3481584f41d87c0955 (trueMachineId: undefined)
[main 2019-12-06T04:05:56.597Z] update#setState idle
[main 2019-12-06T04:05:56.600Z] [storage state.vscdb]
open(/home/developer/.config/Code/User/globalStorage/state.vscdb, retryOnBusy: true)
[main 2019-12-06T04:05:56.600Z] lifecycle (main): phase changed (value: 2)
[main 2019-12-06T04:05:56.601Z] windowsManager#open
Xlib: extension "XInputExtension" missing on display ":1".
Xlib: extension "XInputExtension" missing on display ":1".
[13966:1206/040556.659702:ERROR:atom_browser_main_parts.cc(183)] X IO error received (X server probably went away)
Any help would be greatly appreciated.
vs code, along with any output. If it's a fresh VM with nothing on it, it may be worth just starting from scratch rather than trying to uninstall and re-install so we get the most accurate output. FYI some VNC clients don't allow you to copy text. If that's the case for you, I'd recommend trying realvnccode --verbosefrom a terminal. It might be useful to include that output in your question.DISPLAY=:1correct? What's your VNC server app called? There are several versions these days (RealVNC, UltraVNC, TigerVNC, etc.) that should support RANDR.