FG
💻 Software🛠️ Developer ToolsMicrosoft

VS Code not working on Ubuntu when connected using XRDP.

Fresh5 days ago
Mar 14, 20260 views
Confidence Score90%
90%

Problem

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, G

Error Output

error: No matching fbConfigs or visuals found

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix VS Code Launch Issues on Ubuntu with XRDP

Medium Risk

The issue arises due to the missing XInputExtension and OpenGL driver errors when running VS Code over an XRDP session. This is often caused by the XRDP server not properly handling the graphical environment or the lack of proper OpenGL drivers for rendering in the remote session.

Awaiting Verification

Be the first to verify this fix

  1. 1

    Install Missing OpenGL Drivers

    Ensure that the necessary OpenGL drivers are installed on your Ubuntu system. This can be done by installing the mesa-utils package, which provides the required libraries for OpenGL rendering.

    bash
    sudo apt update && sudo apt install mesa-utils
  2. 2

    Configure XRDP to Use Xorg

    Edit the XRDP configuration to use the Xorg session instead of the default Xvnc. This can help resolve issues with graphical applications not launching correctly.

    bash
    echo 'exec startxfce4' > ~/.xsession
  3. 3

    Set Up .drirc Configuration File

    Create a .drirc configuration file in your home directory to avoid errors related to missing configuration files. This file can help configure the rendering options for OpenGL.

    bash
    echo '<application><option name="use-dri" value="true"/></application>' > ~/.drirc
  4. 4

    Restart XRDP Service

    After making the changes, restart the XRDP service to apply the new configurations. This ensures that the new session settings take effect.

    bash
    sudo systemctl restart xrdp
  5. 5

    Launch VS Code

    Try launching VS Code again from the XRDP session to verify if the issue has been resolved.

    bash
    code

Validation

To confirm the fix worked, launch VS Code from the XRDP session. If it opens without errors related to XInputExtension or OpenGL, the issue is resolved. Additionally, running 'glxinfo | grep 'direct rendering'' should return 'Yes'.

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

vscodeideeditorhelp-wantedupstreamlinuxelectron