You are not logged in.

#1 2018-03-10 06:03:52

cloverskull
Member
Registered: 2015-10-01
Posts: 282

BunsenLabs on Windows 10 through the Windows Subsystem for Linux

Hey guys,

I just installed the Windows Subsystem for Linux by following this guide. I'll summarize the steps here:

  1. Open Powershell as admin

  2. Run

    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
  3. Reboot

Next, go into the Windows Store and search for Debian. There's a package you can install. Note that this requires you be on Windows build 16215 or later. If you're on earlier Windows, you should upgrade, because managing these distros through lxrun could become a bit murky moving forward.

Install Debian from the Windows Store and launch it. It'll create a basic installation, ask you for a username and password.

I found that I had a perfectly boring and basic Debian Stretch running sort of "native" on Windows at this point. Cool! I usually use my Windows laptop for work and gaming, but like using linux for programming and putzing around, so for me, this was an ideal scenario. That said, the basic Debian (9.3, stretch) that ships has no real utility. We have to get it up to snuff, first.

sudo apt update -y
sudo apt upgrade -y
sudo apt dist-upgrade -y
sudo apt install aptitude
sudo aptitude install ~pstandard ~prequired ~pimportant -F%

Now exit with 'exit' and relaunch by using the Debian icon in your Start menu. Let's bunsen-ify it with the helium-netinstall dev script.

Log back in, and as your regular user

wget https://github.com/bunsenlabs/bunsen-netinstall/archive/helium-dev.tar.gz
tar xzvf helium-dev.tar.gz
cd bunsen-netinstall-helium-dev
./install

Now, obviously this isn't going to work for us out of the box. We need to install a package 'xrdp' and pipe everything through a virtual remote desktop. Instead of rebooting when the script asks for a reboot, let's install xrdp, and enable it for future logins.

sudo apt install xrdp
sudo service dbus start
sudo service xrdp start

I noticed a strange thing - my user didn't have what I'd expect in ~/.config - running the following one time manually should fix that:

/usr/lib/bunsen/configs/bl-user-setup

Now, exit out completely and reboot. Launch Remote Desktop in Windows and connect to 127.0.0.1 and authenticate with the user you made in Debian.

If you can't connect directly to 127.0.0.1 with Remote Desktop, it's likely that xrdp didn't survive the reboot. Just run the following and then retry your Remote Desktop connection:

sudo service dbus start
sudo service xrdp start

I notice that WSL doesn't play nicely with systemd, hence why we're doing everything through legacy debian init scripts. *shrug*. Enjoy!

Offline

#2 2018-03-10 06:16:19

cloverskull
Member
Registered: 2015-10-01
Posts: 282

Re: BunsenLabs on Windows 10 through the Windows Subsystem for Linux

Obligatory screenshot:

2018-03-09-22-12-05_scrot.th.png

Last edited by cloverskull (2018-03-10 06:18:29)

Offline

#3 2018-03-10 08:02:43

tknomanzr
BL Die Hard
From: Around the Bend
Registered: 2015-09-29
Posts: 1,029

Re: BunsenLabs on Windows 10 through the Windows Subsystem for Linux

Awesome! I've been wanting to do this since I heard about it. I'm glad you were able to get it running. So it's basically running as a docker container, correct?

Offline

#4 2018-03-10 12:03:39

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: BunsenLabs on Windows 10 through the Windows Subsystem for Linux

This is awesome, thanks cloverskull!

cloverskull wrote:

I noticed a strange thing - my user didn't have what I'd expect in ~/.config - running the following one time manually should fix that:

/usr/lib/bunsen/configs/bl-user-setup

We need LightDM to set the desktop up, you can get the same effect without a display manager by adding a file at /etc/profile.d/bunsen.sh with this content:

#!/bin/sh
if [ ! -f "${HOME}/.config/bunsen/bl-setup" ]; then
   /usr/lib/bunsen/configs/bl-user-setup
fi

And then make it executable:

sudo chmod +x /etc/profile.d/bunsen.sh

That will auto-configure the desktop for any new users wink

Bug report for this issue here:

https://forums.bunsenlabs.org/viewtopic.php?id=4647


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#5 2018-03-11 05:02:31

cloverskull
Member
Registered: 2015-10-01
Posts: 282

Re: BunsenLabs on Windows 10 through the Windows Subsystem for Linux

Ah, nice one @HOAS. You can see I haven't been paying attention to the command line boot thread smile

@tknomanzr I'm not really sure if it's similar to a docker container. I actually have no idea how this WSL thing works.

Offline

#6 2018-03-11 14:14:36

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: BunsenLabs on Windows 10 through the Windows Subsystem for Linux

cloverskull wrote:

similar to a docker container

Very much so, yes — the Windows kernel provides interfaces for the Linux programs to use (but not all Linux syscalls are available).


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#7 2018-03-12 15:59:09

mynis
Member
Registered: 2018-01-29
Posts: 10

Re: BunsenLabs on Windows 10 through the Windows Subsystem for Linux

This is super cool. I had played around with using Debian/WSL with xMing and then installing the BunsenLabs repos on top if it but this XRDP solution looks a lot cleaner. Do you think it would be possible to get BunsenLabs included in the Windows App Store at some point?

Offline

#8 2018-03-12 20:05:48

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: BunsenLabs on Windows 10 through the Windows Subsystem for Linux

mynis wrote:

Do you think it would be possible to get BunsenLabs included in the Windows App Store at some point?

That sounds sufficiently perverse that I may take an interest (once the Helium release is out, ofc).


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#9 2018-03-12 21:08:24

cloverskull
Member
Registered: 2015-10-01
Posts: 282

Re: BunsenLabs on Windows 10 through the Windows Subsystem for Linux

I'd be reluctant to offer a ton of support, though...WSL seems relatively hacked together.

Offline

#10 2018-03-12 21:30:36

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: BunsenLabs on Windows 10 through the Windows Subsystem for Linux

^ They'll love me then big_smile


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#11 2018-03-13 17:32:02

ohnonot
...again
Registered: 2015-09-29
Posts: 2,951
Website

Re: BunsenLabs on Windows 10 through the Windows Subsystem for Linux

Head_on_a_Stick wrote:

That sounds sufficiently perverse that I may take an interest

good news everyone...glasses

Offline

#12 2018-03-13 22:19:34

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: BunsenLabs on Windows 10 through the Windows Subsystem for Linux

^ It's funny 'cos it's true... lol


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#13 2018-03-15 01:01:44

DeepDayze
Member
From: In Linux Land
Registered: 2017-05-28
Posts: 488

Re: BunsenLabs on Windows 10 through the Windows Subsystem for Linux

Damn...that sure looks cool, and I just might futz with WSL/BunsenLabs on my Win10 partition. Thanks Cloverskull for the how-to. I believe future WSL updates will allow us to pretty much allow a full blown Linux experience under WSL.


Real Men Use Linux

Offline

Board footer

Powered by FluxBB