AKA CDE on Windows 10!
This is about as weird as it sounds. While many disregard WSLv1 as being borderline useless, it can still quickly bridge the gap when you need something in user-space, and quickly. And for those of us on Windows 10 (I could upgrade this machine, but I haven’t bothered as I don’t have a real GPU for it), there is no real UI. But how to solve this?
Well, the first thing is xrdp. Xrdp is an RDP server that will allow any halfway good Unix machine become a terminal server, very ‘Citrix like’. Combine that with the Xorg virtual frame buffer, and now you have a display surface that is basically exported over RDP. I did modify it to listen on a different port so I could retain RDP to Windows 10 by modifying xrdp.ini:
port=4389
port=ask4389
Now the real fun comes from CDE.
I built 2.5.1 from source, following the guide, with 2 important notes: Make sure you install and activate the UTF!!!. The other thing that was trashing my build was that WSLv1 picks up the Windows path, and it has spaces in it, which confuse the build process. Be sure to export something like:
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
before beginning the process.
With all the bits in place, the next issue is the RPC. I couldn’t figure out how to start the ‘safe mode’ version, so it will absolutely need RPC. But it turns out that you just have to start the rpcbind manually, since WSLv1 doesn’t have a real ‘startup’. I also saw a lot of errors trying to talk to dbus, so may as well start that up as well.
mkdir -p /run/sendsigs.omit.d/
/usr/sbin/xrdp
/usr/sbin/xrdp-sesman
/usr/sbin/rpcbind
/usr/bin/dbus-daemon --system
And finally link the Xsession to the default user .xsession so CDE will be the default environment.
ln -s /usr/dt/bin/Xsession $HOME/.xsession
Now you should have everything in place, to login and get the Xrdp login
And with any luck, you’ll be greeted with CDE!
And there we go! Neat!
Glad to see you posting new stuff done with WSL1.
And it isn’t useless. It is just harder to configure, and 32bit stuff needs setting up binfmt and userspace qemu. For stuff doesn’t need to access devices or hardware, it is slim than the WSL2 thing, and can run on LTSC 1803, which will have support until 2029, longer than even the last Win10 based LTSC.
I need to find my draft, and finish it, but what if I told you that this site is running on WSLv1!
Actually I kind of like the idea behind WSLv1 and that it’s in some ways more elegant. Why? WSLv2 is close to just running Linux in a VM as has been possible for decades. It’s just wrapped up more nicely and received a lot of love so you get better integration between the file systems, easy and more integrated way to install/start/stop the “VM” etc. and now perhaps better paravirtualized drivers.
WSLv1 is quite clever – there’s not even a Linux kernel running, there’s only the Windows kernel in charge of all the kernel stuff. It just offers the same interface to user space. Yet achieves the same thing – you can have a full Ubuntu user space running. In theory it should be more efficient since you have zero virtualization overhead. In practice, v1 had some limitations, but I don’t think it was more due to the execution than the concept. Yes you couldn’t run graphical application etc. because only the standard POSIX interface was exposed and – due to the inherent nature – you couldn’t load Linux drivers etc. But that could have been overcome by just simulating the graphical interfaces normally offered by the Linux subsystem towards userspace – basically same strategy as v1 took in the other areas. Only difference with v2 is that some of the implementation work might have already been done in the existing virtualizer.
There were also some shortcomings in performance. But all cases I saw were related to file system performance because you had a direct 1-1 mapping between Linux file and Windows file, and NTFS just happened to be slower. That’s again not a shortcoming of v1 in itself, Microsoft could have made NTFS faster 😉 Or just added some way to more easily mount ext4 which wouldn’t have required taken the v2 route and simulated a whole machine for a kernel to run in.
It’s fun to see the desktop environment from all the big Unices of the nineties. And every time I see it’s I’m glad I can use KDE now ;). CDE was probably the clunkiest desktop I’ve used.
BTW, if WSL v1 is a thing for you, maybe you should try CoLinux? I remember using it for a while in the noughties.