Coder Social home page Coder Social logo

wsl's Introduction

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.

wsl's People

Contributors

kitor avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.