Free Republic
Browse · Search
General/Chat
Topics · Post Article

Skip to comments.

Penguin takeover: We tried running some GUI Linux apps on Windows the official way – and nothing exploded
The Register ^ | 23 April 2021 | Tim Anderson

Posted on 04/23/2021 12:18:11 PM PDT by ShadowAce

Microsoft has released the first public preview of Linux GUI applications on Windows 10 – so we wasted no time in taking it for a spin around the block.

The ability to run GUI applications on Windows Subsystem for Linux 2 is not new – enthusiasts have been able to run them via separately installed X server utilities for years – but the arrival of official support is still something of a game changer. The official support is more ambitious and better integrated than the various unofficial approaches.

The preview comes via the Windows Insider Program, by which developers and enthusiasts can get an early look at forthcoming releases. The latest downloadable build is 21354, but the version that supports WSLg is build 21364, so in our case it was a matter of installing 21354 from an ISO image, logging in with a Microsoft account signed up as an Insider, and then waiting while the later build came down from Windows Update. We also chose to run it in a Hyper-V VM. To do this, it is necessary to enable nested virtualization since WSL also uses Hyper-V. That requires a PowerShell command from the host machine.

Once build 21364 is up and running, it is a matter of running wsl --install from an administrator command prompt. This does more work than before as WSLg is included automatically. There is quite a lot to it: with WSLg we were installing not one but two WSL2 VMs, one of them the user distro Ubuntu, the other a hidden system distro using Microsoft's own CBL-Mariner Linux. This distro describes itself as "an internal Linux distribution for Microsoft's cloud infrastructure and edge products" so its forthcoming arrival on millions of Windows 10 PCs is a considerable expansion of its role.

That system distro runs Weston, which is a reference implementation of a Wayland compositor. "Weston is the heart of WSLg," said Microsoft's Steve Pronovost, partner development lead. The distro runs a Remote Desktop Protocol server called FreeRDP which lets users connect using a Windows Remote Desktop client. Microsoft extended FreeRDP to support individual windows instead of the whole desktop, added support for per-monitor DPI scaling, and clipboard support so users can cut and paste between Windows and Linux applications.

WSLg diagram showing the role for RDP and that of a second, hidden Linux distro running Microsoft's own Linux

WSLg diagram showing the role for RDP and that of a second, hidden Linux distro running Microsoft's own Linux

Weston in WSLg plays another small but significant role. It includes an RDP plugin which scans the user distro for desktop applications then adds them to the Windows Start menu complete with the command-line for launching them. In practice this makes a big difference to the user experience since Linux GUI applications are found and launched in the same way as native Windows applications.

With WSLg installed, we logged into Ubuntu, updated the packages then typed sudo apt install gedit. Gedit is the standard GNOME text editor. Since Ubuntu in WSL is by default non-GUI, installing the first GUI application pulls down a lot of stuff, but it worked and Gedit duly turned up on the Start menu, where it was called Text Editor (Ubuntu). Once launched it appears in the taskbar with a penguin overlay icon and (in our case) an ugly "[WARN: COPY MODE]" prefix. What is copy mode? Possibly this indicates use of RAIL (Remote Application Integrated Locally) which is a means of displaying remote applications described here, rather than VAIL (Virtualized Application Integrated Locally). RAIL copies pixels over RDP whereas VAIL uses memory shared between the host PC and the WSL2 VM. WSLg is meant to use VAIL but perhaps falls back to RAIL in some circumstances. According to the docs, both RAIL and VAIL are now implemented in FreeRDP.

Linux GUI applications appear automatically on the Windows Start menu

Linux GUI applications appear automatically on the Windows Start menu

Despite the warning, Gedit worked well, with copy and paste working fine to and from Notepad. Getting more ambitious, we tried sudo apt install libreoffice. This large application pulled down many more dependencies, but it worked and we found seven additional applications on the Start menu, these being the components in the LibreOffice suite. LibreOffice Writer opened on the Windows desktop and despite once again warning of "COPY MODE" performed well. We did encounter some slight glitches with clipboard support. Copying text from Word on the host PC (that is the host of the VM running Windows 10) raised a "not supported" error, though on a subsequent try it worked correctly.

The developer story for WSLg is particularly important, given that much of the initial impetus for WSL came from the need to support developers working on Windows but coding applications for Linux servers. Visual Studio Code running on Windows has good remote support for WSL, but what about running the Linux build of VS Code instead?

A quick sudo apt install code did the trick, and there is a little less friction using VS Code in this way if the source code is on the WSL2 file system. Incidentally, saving documents in Linux GUI apps works as expected, displaying a floating Linux Save dialog which defaults to the home directory of the user on the WSL2 side. The Windows host file system is also available via /mnt/c/Users/tim/Documents, for example.

Linux applications running on Windows: Firefox, LibreOffice, Gedit and VS Code

Linux applications running on Windows: Firefox, LibreOffice, Gedit and VS Code

Getting the best performance from WSLg would mean running it on bare metal rather than in a VM, and installing a GPU driver that supports hardware-accelerated OpenGL on the WSL side. These are available in preview from AMD, Intel, and Nvidia – but will not help when the host machine is itself a VM. This is important since it means graphical applications will run with hardware-accelerated performance. It also enables general-purpose GPU development such as with Nvidia's CUDA language, running in WSL2. This is important for developing AI and ML applications, destined to be deployed to Linux servers, among other uses.

It is early days, but looks like good news for developers working on Windows, and perhaps for general users as well, once the technology makes its way into the majority of Windows 10 installations. It is also good for Linux enthusiasts not running Windows since the potential user base for Linux applications will become much larger. ®


TOPICS: Computers/Internet
KEYWORDS: linux; windows; windows10; windowspinglist
Navigation: use the links below to view more comments.
first 1-2021-33 next last

1 posted on 04/23/2021 12:18:11 PM PDT by ShadowAce
[ Post Reply | Private Reply | View Replies]

To: ShadowAce
"And now the Penguin on top of your computer will explode!"


2 posted on 04/23/2021 12:19:35 PM PDT by dfwgator (Endut! Hoch Hech!)
[ Post Reply | Private Reply | To 1 | View Replies]

To: rdb3; JosephW; martin_fierro; Still Thinking; zeugma; Vinnie; ironman; Egon; raybbr; AFreeBird; ...

3 posted on 04/23/2021 12:19:38 PM PDT by ShadowAce (Linux - The Ultimate Windows Service Pack )
[ Post Reply | Private Reply | To 1 | View Replies]

To: ShadowAce

4 posted on 04/23/2021 12:25:12 PM PDT by Red Badger ("We've always been at war with Climate Change, Winston."..............................)
[ Post Reply | Private Reply | To 1 | View Replies]

To: ShadowAce

This article reminds me of something I’ve been meaning to do since year 2006; Go see the movie “Happy Feet”.
A movie full of singing, dancing Penquins!
The previews told me this might be a fun film to see.
I’ll see it one of these days.


5 posted on 04/23/2021 12:31:57 PM PDT by lee martell (')
[ Post Reply | Private Reply | To 1 | View Replies]

To: ShadowAce

Yeah, I’ll stick with running Linux apps on Linux thanks.

Kubuntu 20.04 running great on my 7 year old ThinkPad W530


6 posted on 04/23/2021 12:32:38 PM PDT by Pollard
[ Post Reply | Private Reply | To 1 | View Replies]

To: ShadowAce

It’s a bit curious why Microsoft would want this. It’s also an admission that Linux desktop apps are appealing enough to run on Windows.

Thanks for posting.


7 posted on 04/23/2021 12:36:42 PM PDT by fuzzylogic (welfare state = sharing of poor moral choices among everybody)
[ Post Reply | Private Reply | To 1 | View Replies]

To: ShadowAce; dayglored

Win ping.


8 posted on 04/23/2021 12:40:07 PM PDT by upchuck (Corporations don’t pay taxes. They collect them. From us. ~ h/t Little Ray)
[ Post Reply | Private Reply | To 1 | View Replies]

To: ShadowAce

To me this is upside down. Why take a great OS like Linux and force it to be run underneath Windows. What would be wrong with Windows running underneath Linux?


9 posted on 04/23/2021 12:54:20 PM PDT by upchuck (Corporations don’t pay taxes. They collect them. From us. ~ h/t Little Ray)
[ Post Reply | Private Reply | To 1 | View Replies]

To: upchuck

Or better yet, Windows apps running natively on Linux (Visio, MS Project)


10 posted on 04/23/2021 1:34:36 PM PDT by taxcontrol (You are entitled to your opinion, no matter how wrong it is.)
[ Post Reply | Private Reply | To 9 | View Replies]

To: dfwgator

11 posted on 04/23/2021 1:39:49 PM PDT by Bratch
[ Post Reply | Private Reply | To 2 | View Replies]

To: ShadowAce

12 posted on 04/23/2021 1:47:33 PM PDT by Chode (there is no fall back position, there is no rally point, there is no LZ... we're on our own. P144:1)
[ Post Reply | Private Reply | To 1 | View Replies]

To: ShadowAce

I don’t quite understand this. Usually IF I need windows, which is rare, I just remote into the Windows VM in Proxmox. If Windows crashes then it crashes why take the whole server node with it? I’m not sure why the other way around would be necessary when 99% of linux distros just work as is.


13 posted on 04/23/2021 1:47:58 PM PDT by bak3r
[ Post Reply | Private Reply | To 1 | View Replies]

To: upchuck

Yup. Duel booting is preferable for computers with average or better CPUs as Linux has multiple configurations designed for low demands. Did one myself after reading people’s problems with that - just a matter of resetting the boot sequence. But I’m an idiot.


14 posted on 04/23/2021 1:48:09 PM PDT by MikelTackNailer (First Rule of Fraud Club is punish any talk about Fraud Club.)
[ Post Reply | Private Reply | To 9 | View Replies]

To: ShadowAce

My inner geek died about 10 years ago. So, excuse the stupid question. Is this Windows for Linux, or Linux for Windows?


15 posted on 04/23/2021 2:01:09 PM PDT by Fai Mao (It is time, past time and almost too late.)
[ Post Reply | Private Reply | To 1 | View Replies]

To: ShadowAce

Like others have said I’ll stick to running linux apps on linux but at tge same time there are likely legitimate use cases where this would be a good thing.


16 posted on 04/23/2021 2:06:58 PM PDT by 2 Kool 2 Be 4-Gotten
[ Post Reply | Private Reply | To 1 | View Replies]

To: Pollard

Yep... Why go use another OS to run an OS that works better than the OS that is hosting it... lol

Dumbest thing I have ever heard of. “Let’s add a middle man!” WHY???


17 posted on 04/23/2021 2:17:16 PM PDT by Openurmind (The ultimate test of a moral society is the kind of world it leaves to its children. ~ D. Bonhoeffer)
[ Post Reply | Private Reply | To 6 | View Replies]

To: upchuck

I’ll answer that... NOTHING. They are trying to steal it and claim it their own as proprietary. It has already been predicted that MS would try this if we let them try to integrate or support anything Linux period. Soon it will be “well from what I understand, you cannot use Linux unless you have windows to run it?”.

Watch, here it comes...


18 posted on 04/23/2021 2:23:01 PM PDT by Openurmind (The ultimate test of a moral society is the kind of world it leaves to its children. ~ D. Bonhoeffer)
[ Post Reply | Private Reply | To 9 | View Replies]

To: Fai Mao

Windows trying to steal Linux...


19 posted on 04/23/2021 2:24:00 PM PDT by Openurmind (The ultimate test of a moral society is the kind of world it leaves to its children. ~ D. Bonhoeffer)
[ Post Reply | Private Reply | To 15 | View Replies]

To: Pollard

Slackware user since about 2000 myself. Difficult but I learn a lot.


20 posted on 04/23/2021 2:33:34 PM PDT by ex91B10 (Just because you can doesn't mean you should. )
[ Post Reply | Private Reply | To 6 | View Replies]


Navigation: use the links below to view more comments.
first 1-2021-33 next last

Disclaimer: Opinions posted on Free Republic are those of the individual posters and do not necessarily represent the opinion of Free Republic or its management. All materials posted herein are protected by copyright law and the exemption for fair use of copyrighted works.

Free Republic
Browse · Search
General/Chat
Topics · Post Article

FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson