Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cdhtlr/alpinewsl
Tutorial for installing WSL images + installing GUI applications without any hassle
https://github.com/cdhtlr/alpinewsl
alpine-linux linux wsl
Last synced: 3 days ago
JSON representation
Tutorial for installing WSL images + installing GUI applications without any hassle
- Host: GitHub
- URL: https://github.com/cdhtlr/alpinewsl
- Owner: cdhtlr
- Created: 2024-06-20T19:53:20.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-06-24T12:08:53.000Z (5 months ago)
- Last Synced: 2024-06-24T13:38:55.083Z (5 months ago)
- Topics: alpine-linux, linux, wsl
- Homepage:
- Size: 29.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AlpineWSL
Tutorial for installing WSL images + installing GUI applications without any hassle.
===
Open the WSL Manager application (download it first from [bostrot/wsl2-distro-manager](https://github.com/bostrot/wsl2-distro-manager) if you don't have it yet), click "Add new instance", then enter the required data.![](https://raw.githubusercontent.com/cdhtlr/AlpineWSL/main/WSL_Manager.png "WSL Manager")
Open Alpine Linux from Windows Terminal then enter the following command
apk update
apk upgrade
apk add bash curl openrc openssh sudo ttf-freefont wslu --no-cache
export DISPLAY=localhost:0.0
adduser -h /home/user -s /bin/ash user
passwd root
su -l root
echo '%wheel ALL=(ALL) ALL' > /etc/sudoers.d/wheel
adduser user wheel
echo "" > /etc/motd
echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
echo "rc-status" > .profile
echo "touch /run/openrc/softlevel" >> .profile
echo "rc-service sshd start" >> .profile
echo "alias a=wslact" >> .profile
echo "alias c=wslusc" >> .profile
echo "alias v=wslview" >> .profile
echo "clear" >> .profile
rm -rf .ash_historyIf you haven't set WSL auto shutdown when idle, shutdown WSL with the following command
wsl --shutdown
Close Windows Terminal then reopen it.
Install the GUI application you need, for example gedit.
apk add gedit
Then open the gedit application.
WSLg should create a shortcut for the application automatically, if not, create the shortcut yourself with the target
C:\Windows\System32\wslg.exe ~ -d Alpine -u user "/usr/bin/gedit"
or"C:\Program Files\WSL\wslg.exe" -d Alpine --cd "~" -- gedit
Adjust the shortcut according to your needs