Category Archives: Windows 10

How To: Run Arch Linux on Windows 10

Windows 10 has the ability to run a Linux subsystem.  However, you can now run Arch Linux instead of the default Debian thanks to some great work by “turbo” at github.com.  Here’s the skinny on getting this setup.

First, download the alwsl.bat file from: https://github.com/alwsl/alwsl

Next, open a command Windows command prompt and execute the following:

alwsl install

Follow the steps provided by the batch file and voila! Arch Linux on Windows.

Lastly, just open ArchLinux from the Windows menu and enjoy.

I’ve noticed using Arch Linux instead of Debian on Windows appears to have some performance gains, especially around the usage of Vim and other console editors.

Windows 10 BASH: Tips and Tricks

I’ve been using the Windows 10 BASH shell for quite a while now forcing myself to get used to it. Along the way I’ve figured out a few working arounds for features such as sshfs and simple copy paste commands. First, the copy paste. When I first started using the Windows BASH shell I found it very frustrating when trying the copy and paste using the CTRL-C and CTRL-V commands. As any Linux user will tell you, these are kill commands and it doesn’t really make sense to use them. However, I did find another set of commands which work much better, here they are.

COPY: Select text, hit ENTER.
PASTE: Right click

So much easier than trying to fiddle with CTRL commands which are sometimes working and sometimes not.

Now let’s talk about sshfs, at the time of this writing FUSE support was not part of the Windows 10 BASH shell. There is/was however a petition to get it introduced, if it’s still not included and you would like to help, vote it up using the link below.

Windows 10 BASH FUSE Support

So, how did I get something similar to sshfs working, simple I put together a couple of shell scripts that utilize rsync and here’s the gist.  Basically what we want is a way to pull all the files we want to modify locally, use an editor to modify files and when the files are modified, push them back up to the server.  To do this, I created 3 BASH shell scripts named “pull”, “push” and “watcher”.  First the pull script, this script performs an incremental rsync pulling the remote files locally into a directory of your choosing.  The “pull” file looks like this:

#!/bin/sh
 
rsync -au --progress user@someserver:/path/to/remote/directory /path/to/local/directory

 

The above requires that you pass change the “user@someserver” to your actual username and server name.  Also, the “/path/to/remote/directory” and “/path/to/local/directory” need to be changed to your specific files.  For my specific needs, I used something similar to the following:

root@myserver:/var/www/html/zf /mnt/c/Users/Jason/Documents/zf

You’ll noticed I have the end point of the rsync specified under the standard Windows file system, this is so I can use a native Windows editor (LightTable in my case) to edit the files.

Next, let’s look at the “push” file.  The “push” file looks like this:

#!/bin/sh
 
rsync -au --progress /path/to/local/directory user@someserver:/path/to/remote/directory

 

The above is very similar to the “pull” file, just in reverse. This will do an incremental push only for files that have changed.

Lastely let’s look at the “watcher” file:

#!/bin/sh
 
while ./pull && ./push;do : ;done

 

The above file continually attempts to do an incremental rsync push until you kill it (Ctrl-C). After you’ve customized the above files to your liking, all you need to do is execute a pull then execute the watcher, and you’ll have yourself a poor man’s sshfs.

user@computer:$ ./watcher

 

As an optimization approach, you can also add –exclude directives to the “pull” file which will ignore files and directories, for example:

#!/bin/sh
 
rsync -au --progress --exclude .svn --exclude .git user@someserver:/path/to/remote/directory /path/to/local/directory

Getting The XBox 360 Controller To Work Correctly With Steam And Windows 10

If you like to play your Steam games in Big Picture mode and have upgraded to Windows 10 recently, you may have noticed that the main XBox controller button no longer functions as it’s supposed to.  But don’t worry, there is a very simple fix for this and it doesn’t require the XBox app.  First bring up the Game DVR systems by pressing:

Win + G

This should bring up the Game DVR bar.

Game DVR

Next click on the Gear (Settings) icon on the far right.

Located the second to last checkbox which reads: “Open Game bar using (XBox button) on a controller” and uncheck it.

Game DVR SettingsNow you’re good to go.  Close out the Game DVR settings dialog and give it a try.  If all is well you should be able to launch Steam in Big Picture mode and your screenshot shortcuts, etc should all be working now.

Getting Windows 10 Home Remote Desktop Working

Windows 10 Home edition by default will not allow you to have inbound remote desktop connections.  Regardless of any settings you may find to the contrary, turning off your firewall, etc. there will just not be anything you can do directly at the user level to enable it.  All is not lost however, there is a very simple fix that you can apply to enable this functionality.

First download RDPWrap at: https://github.com/stascorp/rdpwrap/releases

You want to download the release which takes a form like “RDPWrap-v1.6.zip” for example.

Next, unpack the zip file to a directory and find the file entitled “install.bat”, right click and choose “Run as Administrator”, grant the permission when prompted and let the batch file run its course.

After the installation completes, execute the file “RDPCheck” and ensure that the “Wrapper state”, “Service state” and “Listener state” status are all green.  If they are, then you’re good to go, change whatever configuration settings you would like and remote in.

RDPCheck

If you find that any of the status states are red, such as the “Listener state” for example, ensure that your firewall is not blocking by turning your firewall off just for a quick test and try the “RDPCheck” again.  If you still find that there is a status issue, file the file “update.bat”, right click and choose “Run as Administrator”, grant the permission when prompted and let the batch file run its course.  Once the update has completed, try running the “RDPCheck” check again, you should be good to go.