Maximum PC - USA (2022-01)

(Maropa) #1

worry about. A login screen should open, from which
you should select the Xorg session and use your WSL
credentials to log in. At first, this didn’t work for us, and
we got nervous because time was getting short.
We encountered a mildly encouraging blank screen,
which then vanished, dashing our hopes. Then we
remembered that X sessions are complicated things, so
we had little expectation that the following hack would
actually work. But it did! And hopefully, it does for you,
too. Make a trivial session file in your home directory
(on WSL) as follows:
$ echo xfce4-session > ~/.xsession
And now try and log in again. If it doesn’t work, you
can always log out of WSL, shut it down and restart it
by running:
$ logout



wsl –shutdown
ubuntu
Our session seemed to die whenever
the Windows screensaver activated,
necessitating this step on a number of
occasions. Once you get it working, you’ll
notice that the image quality isn’t quite
pixel-perfect, but this can be tweaked
by giving the server more bandwidth.
Exit Xrdp and edit the config file with:
$ sudo nano /etc/xrdp/xrdp.ini
Next, find the max_bpp value,
change it from 32 to 128. Below this
add the line
xserverbpp=1 28



Now restart Xrdp with:
$ sudo /etc/init.d/xrdp restart
and you should have a slightly sharper, slightly more
responsive desktop.

LEARNING TOOL
If you’re something of a Windows expert, but don’t
have much familiarity with Linux, then having this
remote desktop on hand will be a great learning tool.
It’s a hip alternative to a virtual machine. And just like
a virtual machine, you can export the installation and
run it on another machine, or on the same one if you
want a handy backup before you try some adventurous
command line juju. To export a WSL image as a tarball
run the following from a Windows Command Prompt:
> wsl.exe --export Ubuntu c:\ubuntu.tar
replacing Ubuntu if you used another distro. You
can keep track of which WSL distros you have installed
with
> wsl.exe --list --all
Then, if you have cause to re-import a tarball you
can give the distro a different name:
> wsl.exe --import UbuntuTweak c:\mywsl c:\
ubuntu.tar
replacing c:\mywsl with the folder where you’d
like to store the distro. Then you can boot it with:
> wsl.exe --distribution UbuntuTweak
After a few days of tinkering, WSL distros
might become large (you can see how large
by using the dfcommand within WSL) or
just plain broken. To purge a distro entirely
use the following incantation:
> wsl.exe --unregisterUbuntuTweak

You can’t run
Gnome and
apparently you
can’t run Gnome
Software either.
Gvim is fine,
though

Eventually our
efforts paid off
and we were
greeted with
the minimal, yet
glorious
Xfce desktop

JAN 2022 MAXIMUMPC 39

Free download pdf