X11 on Windows

I have several Linux devices at home for testing and I like to have the ability to log in via ssh with forwarding to allow me the ability to start X11 programs and have them appear on my local workstation.

In the past I’ve used an install of Cygwin X11 to handle this need but that is problematic — every time I reinstall Windows (and I do often as an Insider) I have to go through the install and change permissions to get things to work.

During this most recent install of Windows I decided to try something different.  I downloaded Xming (and the fonts packages) as a small and easy X11 server.  I then just used Putty to connect to my Linux boxes.

Then it hit me: Win10 now has the Bash on Ubuntu on Windows subsystem.  This is a fully-functional version of Ubuntu’s userspace system which includes a full Bash shell and SSH client!

I made a few changes to the .bashrc for personal preference:

# color definitions

if [ "$color_prompt" = yes ]; then
    PS1="\n${red}${debian_chroot:+($debian_chroot) }${green}\u@desktop${nocolor} \W\n\D{%I:%M%P} [\#] >> "q
    PS1="\n${debian_chroot:+($debian_chroot) }\u@desktop \W\n\D{%I:%M%P} [\#] >> "

# aliases
alias ll='ls -Flash'
alias la='ls -A'
alias l='ls -CF'
alias xt='xterm -bg black -fg PeachPuff -fn 8x13 &'

# change the directory sort (hidden before visible)
export LC_COLLATE="C"

# set the display for X11 forwarding
export DISPLAY=""

I change the color of the desktop\user area depending on the server to make it obvious which machine I’m accessing.

Getting Windows build number

Normally you can just use “winver” (or “ver” in command prompt) to get the version number but it doesn’t always return the build number.

You can find the build number in the registry; use the following command in cmd:

reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" | findstr BuildLabEx

Windows ISO version checking

If you want to see which version of Windows is contained in an ISO image, mount the image and run the following command in an elevated cmd/powershell window:

dism /Get-WimInfo /WimFile:A:sourcesboot.wim

Be sure to change A: to the correct drive letter where the image is mounted.  Also, combined x86/x64 ISO images will need to include the architecture before “sources”.

dism /Get-WimInfo /WimFile:A:x86sourcesboot.wim
dism /Get-WimInfo /WimFile:A:x64sourcesboot.wim

Installing .Net 3.5 on Win8 using DISM

To install the .NET Framework 3.5 from installation media located in the D:sourcessxs directory, use the following command:

DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:d:\Sources\SxS


  • /Online targets the operating system you’re running (instead of an offline Windows image).
  • /Enable-Feature /FeatureName:NetFx3 specifies that you want to enable the .NET Framework 3.5.
  • /All enables all parent features of the .NET Framework 3.5.
  • /LimitAccess prevents DISM from contacting Windows Update.
  • /Source specifies the location of the files needed to restore the feature (in this example, the D:\Sources\SxS directory).

For more information about DISM parameters and options, see How to Enable or Disable Windows Features

from: http://msdn.microsoft.com/en-us/library/hh506443(v=vs.110).aspx

Windows Explorer: open at Computer instead of Libraries

One of the changes in Windows 7 that really annoyed me (and continues to annoy me in Win8 RTM and Server 2012) is that the Windows Explorer insists on opening up in the libraries area instead of the computer (drives, etc) that was the previous default.

You can change that behavior by right-clicking on the Windows Explorer icon in the task bar and then right-click again on Windows Explorer (or File Explorer in Win8) and selecting Properties.

Replace the value listed in the Target field with the following string:

%windir%explorer.exe ::{20D04FE0-3AEA-1069-A2D8-08002B30309D}

This will force Explorer to open in the Computer area which is far more useful given the way I work.

New Lync 2013 notification icon

File this one under “what were they thinking?”

After applying a July 2013 security update for Lync 2013 (MS13-054), the notification area icon was changed.  It used to show your current status (available, busy, etc) but now it only shows the Lync icon itself.  You now have to hover over the icon to see your current status.

Microsoft has made some good decisions lately but this isn’t one of them.  🙂

Skydrive integration in Windows 8.1

On all of my Windows machines, I install the Skydrive desktop application and configure it to store the files on my data drive.  I have a Backgrounds folder in the Skydrive area where I save any nice wallpapers I find on the net.  I then have all of my Windows machines use that folder as the source for my desktop wallpaper slideshow.  It’s a system that works quite well; images found and saved while on my laptop automatically appear on my desktop as well.

In Windows 8.1, Skydrive is deeply integrated in the operating system so the desktop app is not needed.  However, the way it works in 8.1 appears to be a little different:

  1. By default, 8.1 installs the Skydrive folder in C:UsersUserNameSkyDrive and there does not appear to be any way to change the Skydrive storage location.
  2. I’m also not sure that all files are downloaded initially in bulk during your account setup or if they are downloaded as they are accessed.  I have a program installer stored on my Skydrive folder and it took a bit for it to start running.

In short, having Skydrive baked into Windows is a great feature but they really need to give us back the option to relocate the folder location.  People who are running Windows on an SSD may not want those files to take up the space on the SSD.

Virtualbox network problems in Windows 8.1 Preview

I have noticed a problem on my Windows 8.1 Preview desktop; my Realtek network card will not connect to the network after returning from sleep mode.  The only way to fix it is to reboot the machine.

Other people are reporting that the problem is caused by Virtualbox.  I will uninstall it when I get home and try it.  If that is the problem, I’ll switch to VMWare Player until Virtualbox gets updated.

Update: I converted my Virtualbox VM to VMWare Player (vmdk format) and uninstalled Virtualbox.  After rebooting, I put the machine to sleep and after a time woke it up.  I had no problems with the network after resuming.  So I think it’s safe to say the problem was with Virtualbox.