Skip to content

Instantly share code, notes, and snippets.

@addohm
Forked from camullen/installation.md
Created June 6, 2025 04:10
Show Gist options
  • Select an option

  • Save addohm/d2a8f2aaf834ba5d4e0df3ddd08577ca to your computer and use it in GitHub Desktop.

Select an option

Save addohm/d2a8f2aaf834ba5d4e0df3ddd08577ca to your computer and use it in GitHub Desktop.

Revisions

  1. @camullen camullen created this gist Dec 10, 2022.
    79 changes: 79 additions & 0 deletions installation.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,79 @@
    # Installing KDE on WSL2

    Inspiration:
    https://www.most-useful.com/kde-plasma-on-wsl.html

    ## Setup
    1. Update WSL
    - In windows command prompt run: `wsl --update`
    2. Add systemd to ubuntu
    - In ubuntu prompt run: `sudo nano /etc/wsl.conf`
    - Add the following to the file:
    ```
    [boot]
    systemd=true
    ```
    - Save and exit by pressing ctrl + o and then ctrl + x
    - Shutdown WSL by running the following in the windows command prompt: `wsl --shutdown`
    - Restart WSL by opening a new terminal session for Ubuntu
    ## Installing KDE
    `sudo apt update`
    `sudo apt install kubuntu-desktop`
    Select SDDM as display manager during setup
    `sudo apt install lightdm`
    During installation, select lightdm as default display manager using arrow keys
    Edit the lightdm configuration as follows:
    `sudo nano /etc/lightdm/lightdm.conf`
    Add the following text
    ```
    [Seat:*]
    user-session=plasma

    [LightDM]
    start-default-seat=false

    [XDMCPServer]
    enabled=true
    port=177
    ```
    Save and exit by pressing ctrl + o and then ctrl + x
    ## Setting up x server
    Download and install this software for windows:
    https://sourceforge.net/projects/vcxsrv/
    ## Launch Desktop
    - From windows open the **XLaunch** program
    - Select the `One window without titlebar` option and click `Next`
    - Selct `Open session via XDMCP` and click next
    - In your ubuntu terminal you need to get the ip address of the wsl2 instance:
    - Run: `sudo apt install net-tools`
    - Run: `ifconfig eth0 | grep inet`
    - The ip address will be listed after the `inet` item and usually looks like 172.xxx.xxx.xxx
    - Copy the ip address above and paste into the text box next to `Connect to host` in the XLaunch window and click `next`
    - Modify the default settings to uncheck `Native opengl` and check `Disable access control`
    - Click `Next`
    - Click `Save configuration` and save the file to your desktop and name the file whatever you want
    - **VITALLY IMPORTANT: When you first run VcXSrv (or XLaunch) you’ll get a Windows Firewall popup. You will need to allow it to accept connections on both the PRIVATE and PUBLIC networks. If you don’t allow PUBLIC networks you will not get a connection as the WSL Virtual Network is considered to be PUBLIC**
    - Click `Finish`
    ## Speeding up KDE
    ### Fixing rendering
    - From the KDE desktop, click the start menu, go to `Computer` then click `System Settings`
    - Underneath `Hardware` in the left panel, click `Display and Monitor`
    - Select `Compositor` from the left panel
    - Change the `rendering backend` to `XRender`
    - Check `Enable compositor on startup`
    - Click `Apply`