Skip to content

kitor/wsl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wsl

Windows Subsystem for Linux scripts and tools

This repository contains my scripts and tools for Bash on Ubuntu on Windows, also known as WSL.

Currently listed here:

  • AutoHotkey.akh

    • Autohotkey script that does some magic:
    • Starts init.sh in hidden CMD window
    • Starts PulseAudio server on Windows
    • Provides some hotkeys passthrough between Windows and X Server that allows to use X11 global hotkeys from Windows
    • Note to above: I had troubles with X11 Media Keys and xdotool (they worked just once for each X session) - that's why it uses ctrl-shift-super-fXX combos.
  • init.sh

    • Magic script that starts all services and Tilda terminal emulator
    • Should be placed in /opt/wsl/
    • Keeps Tilda alive as long as X server is running, in case of accidental exit
    • has PID lock so it won't run if one process is already running
    • script should be altered to use your username (linux side)
  • pulse6.zip

    • Ready to use binary distribution of PulseAudio 6.0 for Windows
    • Should be placed in c:\soft
    • Created from rpm packages provided by user mikedep333 at builds.opensuse.org
    • Preconfigured - sound hardcoded to two speakers and disabled input devices (workaround for error when no sound input device is connected to host)

Prerequisites

  • WSL installed and configured without auto-login to "normal" user (running bash.exe will open root prompt)
  • Disabled Windows built-in SSH server (if Developer Mode and Device Portal are enabled - Win10 has builtIn one!)
    • SSH server broker
    • SSH server proxy
  • Installed following packages in WSL
    • tilda
      • Configure tilda to use ctrl+grave as "Pull down terminal"
      • Set "when last terminal is closed" to "Open a new terminal and hide"
    • openssh-server
    • x11-xserver-utils, xdotool
    • rsyslog, cron, sendmail, dbus (optional)
    • for PulseAudio:
      • apt-get install --no-install-recommends libpulse0 pavucontrol
      • edit /etc/pulse/client.conf, uncomment default server and set it to 127.0.0.1
  • Enabled incoming TCP port 22 in Windows Firewall
  • Configured DBUS for TCP connections
  • Installed X-Server for Windows
    • Xming or Vcxsrv
    • Vcxsrv preferred as it's much newer (last free Xming is from 2007!)
    • Add X server to Windows Autorun
  • Installed AutoHotkey

Notes on PulseAudio

PA is preconfigured to run from c:\soft. I disabled recording in configuration, due to how Windows handles input devices (when there's nothing connected to any input jack, PA freaks out as it cannot find any device).

If you want to use PulseAudio standalone (without AHK script) you need to take care of one thing yourself. AHK script is removing %userprofile%.config\pulse on Windows side, before staring PA server. This is due to werid issues, somehow PA with it's own-saved config won't launch properly.

Changelog

10.04.17: Verified to work on Creators Update.
30.12.17: Verified to work with Windows Store version of Ubuntu on Fall Creators Update. 22.03.18: Added info about running PulseAudio standalone.

About

Windows Subsystem for Linux scripts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published