Last active
March 21, 2021 23:52
-
-
Save remlapmot/0e720b8bff25f1dbfd881b1c67f29e7f to your computer and use it in GitHub Desktop.
XLaunch file for running a windowed desktop environment for Ubuntu (or another Linux Distro) on WSL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<XLaunch WindowMode="Windowed" ClientMode="NoClient" LocalClient="False" Display="-1" LocalProgram="xcalc" RemoteProgram="xterm" RemotePassword="" PrivateKey="" RemoteHost="" RemoteUser="" XDMCPHost="" XDMCPBroadcast="False" XDMCPIndirect="False" Clipboard="True" ClipboardPrimary="True" ExtraParams="-swcursor -ac" Wgl="True" DisableAC="False" XDMCPTerminate="False"/> |
- Extra info from the Ubuntu wiki here
- Download and install VcxSrv from here
- Note this XLaunch config is simply the default settings with additional parameters
-ac
- Note this XLaunch config is simply the default settings with additional parameters
- Note: I have only tested this under Ubuntu 18.04.4 LTS (bionic).
- Under WSL 1
- As per instructions here in your
~/.bashrc
set (edit this withvi
withsudo vi ~/.bashrc
)
Then re-read inexport DISPLAY=localhost:0.0
.bashrc
withsource ~/.bashrc
- As per instructions here in your
- Under WSL 2
- As per instructions here in your
~/.bashrc
setexport DISPLAY=$(grep -m 1 nameserver /etc/resolv.conf | awk '{print $2}'):0.0
- And if you have replaced the SSH server as per the instructions here
# Remove the default install apt-get remove --purge openssh-server # Update apt-get update apt-get upgrade -y # Install OpenSSH Server apt-get install -y openssh-server
- create
/etc/ssh/sshd_config
with the following settings.Port 222 X11Forwarding yes X11DisplayOffset 10
- As per instructions here in your
- Save in
%appdata%\Microsoft\Windows\Start Menu\Programs\Startup
to have this launched at login. - libGL error: If when you launch a graphical app from the Ubuntu Terminal you see an error as follows:
this is fixed by installing Ubuntu MATE Desktop as per the advice here and here as follows.libGL error: No matching fbConfigs or visuals found libGL error: failed to load driver: swrast
sudo su apt update && apt upgrade apt install ubuntu-mate-desktop --no-install-recommends dpkg-reconfigure dbus && service dbus restart sudo apt-get install mate-desktop-environment-extras # remove error report and some components: apt remove apport *screensaver* update-notifier blueman
- Launch a session with
mate-session
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tested with:
mate-session
xfce4-session