Tuesday, April 02, 2013

Windows 8 for a Linux user

Linux has been my desktop of choice for years. I can recall with certainty that it has been my primary desktop since late 1999 when I started My Linux ISP, a local internet provider whose focus was supposed to be Linux friendly internet connections but turned into a DSL provider through dumb luck and a few helpful people at a Telco.

So why switch? After all, Linux has come a long way with desktop distributions like Fedora and Ubuntu just to name a couple. The answer for me was simple, 6 monitors with 1 continuous desktop. That's right I have the privilege to use a computer with 6 monitors. All 24" and all running 1920x1200 resolution. Linux supports this, right? Well if it does I sure couldn't make it work after 2 days of endless tinkering, the best I was ever able to do was 4 monitors with really poor performance. However in 90 minutes time I was able to install Windows 8, update it and have all 6 monitors working as 1 giant desktop.

BTW: If you haven’t heard of ninite.com you are missing out, it makes installing many common applications a snap. Just pick what you want to install and then click “Get Installer” to download your custom installer. Once you start it, all the applications will install without user intervention while you grab lunch or something.

The next step in my conversion to Windows was the matter of maintaining my workflow. While I find myself working more and more with Windows, I’m still the Linux guy, I’m still the switch and router guy. So this meant I needed to have the same command line utilities as I was accustomed to in Linux.

For a normal Windows user, programs like putty, mRemote or mRemoteNG might seem like wonderful ssh clients. But for me as a Linux user they were horrible. For one thing, I had trouble getting my trusty ssh key to work and that was a definite show stopper. Then I remembered Cygwin which provides open source tools natively compiled in Windows. A quick search on Google will show you how to install it. It’s basically just downloading the setup.exe and running it. I took all the defaults until I got to the point of selecting packages. I picked out everything I like to use in Linux such as ssh, scp, nano, grep, sed, perl, awk and many many more. All the guides talk about adding Cygwin to your PATH variable but I didn’t find any that talked about running the shell as administrator. I changed my Cygwin Terminal to run as administrator which solves quite a few problems.

One issue I had with ssh involved my home directory. It was not the same between Windows and Cygwin and this caused a few issues with my ssh key. The solution turned out to be pretty easy. From within a Cygwin terminal window, I moved the contents of my home directory (/home/brian_000) to /cygdrive/c/Users/brian_000 which is my Windows user home directory. Next I edited the /etc/password:

brian_000:unused:1001:513:Brian:/home/brian_000:/bin/bash

change the home directory, also change the group to Users (545 in my case):

brian_000:unused:1001:545:Brian:/cygdrive/c/Users/brian_000:/bin/bash

After the edit was complete, I closed my terminal window and opened a new one. Now when it opened I started in /cygdrive/c/Users/brian_000 as my home directory. And with my .ssh/id_dsa key in place I was able to execute ssh username@hostname commands at will. The same held true for scp commands.

Next was the matter of right clicking to open a terminal window. This is one point where I had to give up a little of the functionality of my Linux desktop as I couldn’t get the right click feature to work from the main desktop. However using the chere utility in Cygwin does install an “Open Bash Here” line into the menu when you right click on drives or folders. The command is simple:

chere –i –a –f

I also added the Cygwin shortcut to my task bar for a quick an easy launch when no drives or folders are available to right click on. Of course a Windows+E key sequence pulls up the file explorer easily enough.

I opted to go with the dig command in Cygwin, you’ll find it as part of the “Bind” package. Just select the package and install. Then open a terminal window and create a file /etc/resolv.conf. Add the following:

nameserver 208.67.222.222
nameserver 208.67.220.220

Those DNS servers are from OpenDNS, you can of course use your own name servers as you like. Interesting enough, the Cygwin environment doesn’t automatically get it’s DNS servers from the Windows environment. That’s OK by me as I like to have a little control on DNS selection anyway.

With the command line stuff out of the way, I had to address a few other things. First off, like so many others I did not care for the Metro interface. It might be fine for a tablet, cell phone or even touch screen computer but it rather sucks for a 6 display set up. Getting to the desktop from Metro isn’t a problem but then trying to find your applications is. That’s where Classic Start Menu comes to the rescue. It’s part of the open source project known as Classic Shell. This handy set of usability enhancements brings back the nicer parts of a classic Windows interface with the traditional Start Menu. Installation is easy, download the install file and run it. Lots of customization options, I opted for the Window 7 menu style. If I had wanted a more retro look I could have gone with Windows Classic or Windows XP.

The next adjustment came in the way of an enhancement for dealing with all my monitors. A great little program called  Display Fusion Pro helps to tame Windows 8 and extend the configurability of the system.  Installation is simple as is the configuration. I especially like the ability to have unique background photos on each display. Along with a disappearing task bar on each display which only shows the applications running on that display while the primary Windows task bar shows me all applications running on the system. Display Fusion also integrates well with the Classic Start Menu. And finally there’s the matter of avoiding the Metro interface altogether upon logon. The option to do so can be found on the Windows 8 tab as “Bypass the Windows 8 Start Screen”. You still get your logon window but then it takes you to the desktop.

With all of the above, there are still times that I need a Linux computer to handle security risky matters. That’s where Virtual Box comes in. I set up Windows 7 and Fedora 18 virtual machines. The Windows 7 VM was actually a conversion of my old Windows 7 PC which I used for my Garmin routing software among other things. The conversion was simple with a utility called Disk2VHD. Once I had the VHD file, I was able to set up a virtual machine in Virtual Box and point it at the vhd file as it’s hard drive. As for the Linux side of things, I found it easier to install a fresh copy of Fedora 18 and then restore files from a hard drive backup of my old Fedora 17 desktop.

Note: When using the USB feature in Virtual Box, be sure to set the VM to only have 1 CPU. A multi-CPU instance seems to freeze the VM when under load on the USB channel. At least this is the case as of 4.2.10.

In order to save space on my VMs, I shared my Windows 8 Dropbox folder through Virtual Box’s Shared Folders feature. In doing so I only have 1 copy of my dropbox data on the system. And changes to those files whether made from the Windows 8 host, or from any VM gets uploaded to the Dropbox cloud instantly.

As for all the desktop applications I was accustomed to using in Linux, I’m still using the same ones in Windows. Firefox is still my default browser and I was able to get my bookmarks through the built-in Sync feature. Email is still managed Thunderbird. I saved considerable time by copying my profile directory from .thunderbird in Linux to C:\Users\brian_000\AppData\Roaming\Thunderbird\Profiles on Windows. Even my Zend IDE workspaces were brought over from Linux once I installed the Windows version of the development environment. GIMP has a Windows installer as well, so it was a snap to install.

And I found a wonderful utility called ext2explore which will read the Linux formatted hard drive that I backed up my old Linux desktop on. 

That about sums it up for my Desktop environment. The fact is, I’m so please with the setup that I will likely be reloading my laptop as a Windows 8 machine and running an instance of Fedora 17 or 18 in a Virtual Box VM when I need a full on Linux Laptop to get down and dirty in a network. I think I’ll couple that upgrade with a spiffy new SSD drive to make the laptop boot faster and the battery last longer. I just don’t see the need for a dual boot system any more, thanks to Virtual Box.