Johnny Matthews | Unix Pass on Windows Subsystem for Linux

All good programmers use the terminal for literally everything, so you should use the Unix Pass manager to manage your passwords. And since Windows 10 has the ability to use Linux apps through the Windows Subsystem for Linux (WSL), you should install it and be the envy of all your nerd friends. This was written on 23rd of June 2020.

Run Ubuntu

  1. Install Ubuntu for Windows from the Microsoft Store.
  2. Install Ubuntu 20.02 from the Microsoft Store.
  3. Open Ubuntu from the start menu.
  4. Open Ubuntu 20.02 from the start menu. It will begin installing, and will take a few minutes.

Get VcXsrv

  1. Download and install VcXsrv.

  2. Create a file called config.xlaunch:

    <?xml version="1.0" encoding="UTF-8"?>
    <XLaunch WindowMode="MultiWindow" ClientMode="NoClient" LocalClient="False" Display="-1" LocalProgram="xcalc" RemoteProgram="xterm" RemotePassword="" PrivateKey="" RemoteHost="" RemoteUser="" XDMCPHost="" XDMCPBroadcast="False" XDMCPIndirect="False" Clipboard="True" ClipboardPrimary="True" ExtraParams="" Wgl="True" DisableAC="False" XDMCPTerminate="False"/>
    

    ``

  3. After saving the file, double click it to run the application.

  4. Add export DISPLAY=localhost:0.0 to the end of WSL’s ~/.bashrc:

    echo "export DISPLAY=localhost:0.0" >> ~/.bashrc
    

    ``

  5. Enable the Vim clipboard:

    sudo apt install vim-gtk
    

    ``

  6. Check that it got installed properly:

    vim --version | grep clipboard
    
    > +clipboard
    

    ``

  7. POTENTIALLY IMPORTANT STEP. Run as Admim in Powershell:

    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
    

CHMOD the GPG keys

  1. The ~/.gnupg folder should be 700:

    chmod 700 ~/.gnupg
    
  2. All the files inside should be 600;

    cd ~/.gnupg
    chmod 600 *
    
  3. Check that you didn’t just change any folders within ~/.gnupu to 600. If you did, change them back to 700.

    ls -la
    
    > ...
    >
    > drwx------ 2 johnny 4096 Jun  6 22:49 private-keys-v1.d
    >
    > ...
    
    chmod 700 private-keys-v1.d
    

Install Pass

  1. sudo apt update
  2. sudo apt install pass -y

Install pass-update

  1. git clone https://github.com/roddhjav/pass-update/
  2. cd pass-update
  3. sudo apt-get install build-essential
  4. sudo make install # For OSX: make install PREFIX=/usr/local

Install pass-otp

  1. git clone https://github.com/tadfisher/pass-otp
  2. cd pass-otp
  3. sudo make install

Powershell 7

  1. Go to the Releases page and download the latest Powershell 7 release. You’re looking for an -x64.msi file.
  2. Install the .msi.