From eBower Wiki
Jump to: navigation, search

I recently bought two computers both of whom were speced and purposed for gaming. This means a reasonable graphics card (it's not hardcore gaming), plenty of RAM, a decent i7 CPU, and Windows 8. Windows 8? For a Linux person? Blasphemy!

Seriously, what's an OS these days? Most of the time I'm either at a command prompt, or I'm in a browser. The only thing that needs to run natively are games and, despite Valve's excellent progress in this matter, Windows is still king.

VirtualBox

First and foremost, set up Linux in a VM. There's no replacement for a full-blown OS sometimes. Running in full screen mode on a Windows PC isn't much different than running natively, and VirtualBox has excellent video performance. Sure, I won't be gaming on the VM nor would I want to watch HD video, but it works and it provides isolation. Note that I use kvm for my server-side hypervisor, it has slightly better performance and much better remote management but I still think VirtualBox is the best Desktop-on-Desktop hypervisor out there. For Desktop-on-Server I'd probably look at VMWare or Citrix, but that's a very different animal.

Chrome

I love Chrome. Yes, there's a lot of trust I need to place in Google, but it has yet to fail me. The more I can move to Chrome extensions and apps the more I can use things natively cross-platform - and that includes my daughter's ChromeBook.

SSH

The most important part about using Chrome? It has a freaking SSH Client built into it! Seriously, this is the primary reason I'd accept a Chromebook as a primary computer, between native browser stuff and an SSH client to a VM for stuff I can't do in a browser there's nothing left to complain about.

VLC

I don't use MS products as a general rule. Typically I'll use Plex, but when I have to play local content I don't want to deal with the MS apps on one machine and something different elsewhere. So I use VLC everywhere.

CygWin

CygWin is what makes Windows usable. Essentially it is a series of Linux utilities compiled for Windows. This is not a Linux emulator, it's just the open source Linux stuff recompiled as Windows EXE files. But this includes a bash implementation so a lot of stuff you're used to doesn't need to change.

One thing to remember is that you're still in Windows, permissions are Windows permissions. You've also got your own little pseudo-filesystem that looks a lot like a Linux system, but your Windows drives are mapped at /cygdrive/.

apt-cyg

When you install CygWin, make sure you select the following packages:

  • vim because, well, vim
  • wget because it's useful and common - odd it's excluded
  • subversion because this is where apt-cyg is hosted
  • libxml2 - OK that one's just for me because apt-cyg won't install it due to an ambiguous name and I need it.

Then you just need to run the following:

svn --force export http://apt-cyg.googlecode.com/svn/trunk/ /bin/
chmod +x /bin/apt-cyg

Now you can use apt-cyg just like apt-get - but it's a lot less hardened. Still, it helps prevent you from needing to run through the setup every time you want to install a package.

Copy/Paste Like a Boss

The whole ctrl/shift-ins thing to copy/paste has me a bit blue. So I added the following to my ~/.inputrc[1]:

"\302\203": copy-to-clipboard
"\302\226": paste-from-clipboard

I also added this to my .bashrc:

stty lnext ^q stop undef start undef

I'm having a bit of an issue pasting into vim which I need to troubleshoot (probably trying to map <C-S-v> to <C-r><C-p>*; there is some additional information here to explore), but other than that I can now use ctrl-shift-[c|v] like a normal person.

You can use sed -n l to find your own key combinations. Just run this command, type the character combo you care about, and then hit enter.

vim

I've got a common Vim configuration, so all I needed to do was link a shared folder I've got to my ~/.vimrc and ~/.vim/ under the CygWin terminal. I did need a few minor changes:

  1. CygWin has a weird vi vs. vim behavior, using an alias for vi didn't seem to work so I just copied /usr/bin/vim.exe to /usr/bin/vi.exe.
  2. I also stole the Ubuntu color scheme from /usr/share/vim/vim*/colors/default.vim and put it in ~/.vim/colors/default-ubuntu.vim
  3. I also use an XML and SQL formatter, so I needed to install xmllib2 via setup (for some reason apt-cyg doesn't like it) and I needed to manually install the sqlparse libraries by downloading them here and running python setup.py install
  4. Finally, I needed to add the following lines to my .vimrc:
set nocp
syntax on
colorscheme default-ubuntu

nmap

Remember, nmap is just a regular Windows program so download it and install it normally, then add this to the end of your .bashrc:

export PATH=$PATH:~/bin:"/cygdrive/c/Program Files (x86)/Nmap"

I always keep a ~/bin around for my local scripts, but the sadly x86 nmap needs a home in our path as well.

ExtFS

What about those SD cards for your Raspberry Pi? If you want to be able to read them in Windows you can get the registration-ware ExtFS. For the low, low price of a throwaway email address you can get some EXT drivers for Windows that can let you mount a Linux drive under Windows.

Of course, use with caution. Permissions are very different so don't go messing around too much.

Why I Like Windows 8 Better Than Linux

OK, overall this isn't really true. But there are some things about Windows 8 that are actually good:

  1. When I swapped out my WiFi access point I thought nothing of it. All of my computers and devices just worked fine. Except for Windows. Windows told me, "Someone just swapped out your router with one that looks identical, but I know it's different - if you didn't do this someone is probably being very naughty right now and you'll want to stop using the Internet." This is actually the right thing to do, if I replaced someone's network infrastructure I have access to their DNS servers, I can set up transparent proxies, I can snoop anything in plaintext. And if I'm that close to you, there's a decent chance I may have found a way to install a bogus CA into your system so I could even see your HTTPS traffic.
  2. Ping works as expected. I ping www.google.com and it doesn't give me a ping for 74.125.236.81, it pings the proper address of 2607:f8b0:4006:808:1013. I need to tell it explicitly if I want IPv4, otherwise it pings the way Vint Cerf intended without needing some silly ping6 command.
  3. I'm not positive I like this, but the two Win8 boxes I've got set up both authenticate to an outlook.com email address. This means that I change the password in one location and my PC passwords change. There's some more cloud sync stuff going on as well around the start page. From a management perspective this is nice if you've got multiple computers (not nearly as nice as ChromeOS, of course, but nicer than XP-era stuff). What I don't like is there doesn't seem to be much explicit warning as to what is and isn't synced.

Note I didn't mention application (more specifically, game) support. This isn't a feature of Windows, it's a missing feature from non-Windows apps.

Of course, if I could I'd probably just stick with Linux (or even ChromeOS) on my two new gaming computers, but until Wine becomes something a bit more than it is I guess I'm stuck with Windows for now.

References

  1. How to paste in Cygwin bash using CTRL-V