Saturday, February 15, 2014

Getting Jekyll up and running on Windows

I've started tinkering with GitHub Pages and Jekyll, partially motivated by a recent post by Phil Haack.

Unfortunately, Jekyll (as with many Ruby projects) is not officially supported on Windows, though it's possible with a little fiddling around. There are a number of "here's what worked for me" posts out there, all of which are a little different. Here's my contribution...

The Jekyll QuickStart instructions say getting a Jekyll site up and running is a simple as:
~ $ gem install jekyll
~ $ jekyll new myblog
~ $ cd myblog
~/myblog $ jekyll serve
Well since I'm on a pretty new machine, 'gem install jekyll' won't work because I don't have Ruby installed yet. So I downloaded and ran the Ruby v1.9.3 installer from rubyinstaller.org, which installed everything to 'C:\Ruby193\'. The only option I changed from default during the install was to check the box adding the ruby binaries to my path.

Now I can run 'gem install jekyll', but it complains because I don't have the Ruby DevKit installed, and directs me to installation instructions on the GitHub project wiki.

I downloaded the DevKit for Ruby v1.9.3 (again from rubyinstaller.org). The installer relies on you to choose a good permanent home for the extracted DevKit files. I chose to put it underneath my Ruby install location in 'C:\Ruby193\devkit\' (creating the 'devkit' directory myself). I saved the .exe file to that location and ran the .exe to extract it's files to the same directory. I then opened up a console and ran 'ruby dk.rb init' and 'ruby dk.rb install', per the instructions linked above.

Now that Ruby and the Ruby DevKit were installed, I was able to run 'gem install jekyll' without error. Following Jekyll's QuickStart instructions, I ran 'jekyll new myblog' to create a new default blog site. It ran without error.

I then ran 'jekyll serve', but it blew up with the following error output:
C:\temp\JekyllDemo\myblog>jekyll serve    Configuration file: C:/temp/JekyllDemo/myblog/_config.yml
            Source: C:/temp/JekyllDemo/myblog
       Destination: C:/temp/JekyllDemo/myblog/_site
      Generating... C:/Ruby193/lib/ruby/gems/1.9.1/gems/posix-spawn-0.3.8/lib/posix/spawn.rb:162: warning: cannot close fd before spawn
'which' is not recognized as an internal or external command,
operable program or batch file.
error: Invalid argument - C:/temp/JekyllDemo/myblog/_site/C:. Use --trace to view backtrace
While the error isn't exactly the same, I tried the guidance at the bottom of this post, uninstalling the pygments.rb code formatting gem and reinstalling to an older version which (apparently) plays nicer with Windows.
gem uninstall pygments.rb
gem install pygments.rb --version "=0.5.0"
And that resolved some of the errors, but not all:
C:\temp\JekyllDemo\myblog>jekyll serve
Configuration file: C:/temp/JekyllDemo/myblog/_config.yml
            Source: C:/temp/JekyllDemo/myblog
       Destination: C:/temp/JekyllDemo/myblog/_site
      Generating... error: Invalid argument - C:/temp/JekyllDemo/myblog/_site/C:. Use --trace to view backtrace
I then found an answer on StackOverflow which resolved the remaining problem:
gem uninstall jekyll
gem install jekyll --version "=1.4.2"
Now I can 'jekyll serve' and browse the resulting page . Nice!

Not too painful, all in all. Basically it came down to getting the right (well, older compatible) versions installed:

  • Ruby v1.9.3
  • Ruby DevKit for Ruby v1.9.3
  • jekyll v1.4.2
  • pygments.rb v0.5.0
Hopefully some awesome contributors to the Jekyll and Pygments.rb projects will get the newer versions stablized on Windows. In the meantime, big ups to everyone on those projects for their work to date!

Update: After starting to work with Jekyll, I quickly wanted to be able to run 'jekyll serve --watch' so the site would automatically detect updates as I created posts and otherwise played around. But running that command resulted in the following error (I've omitted a stack trace for brevity):
C:\temp\JekyllDemo\myblog>jekyll serve --watch
Configuration file: C:/temp/JekyllDemo/myblog/_config.yml
            Source: C:/temp/JekyllDemo/myblog
       Destination: C:/temp/JekyllDemo/myblog/_site
      Generating... done.
 Auto-regeneration: enabled
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- wdm (LoadError)
Thanks to some folks on StackOverflow, I was able to resolve this error by installing the 'wdm' gem via:
gem install wdm
Editing the site is much easier now that watch is working.

Sunday, April 8, 2012

Multiple Eclipse Projects in One Mercurial Repository

Eclipse is a tremendous IDE... except when it's not. One area I've found less than intuitive has been creating a single Mercurial repository to house multiple interdependent projects.

While exploring Android development, I've wanted to keep my application and test projects together in a single repository. It's (hopefully) obvious that you'd want to track changes to your application code and test code alongside each other so they're always in sync. But for some reason, adding these two separate projects to a single repository is not intuitive to do from inside Eclipse, at least while using the MercurialEclipse plugin.

There is probably a better way to do this, but here's how I've gotten things working. It relies on a combination of MercurialEclipse and an external-from-Eclipse tool. I recommend the excellent TortoiseHg.

Finally, these steps were outlined pretty quickly and I haven't tested all scenarios. Your mileage may vary.

Creating a new repository and adding projects:

  1. If needed, create a new workspace in Eclipse.
  2. Create a new directory underneath your workspace to contain your repository, and init a new repository there.
  3. Open the workspace in Eclipse.
  4. Add one or more new projects. You can try unchecking "Use default location" and adding them under the repository root, but it still always adds them to my workspace root for me.
  5. Close Eclipse.
  6. Manually move the project folder inside the repository folder.
  7. Commit the project's contents to your repository.
  8. Open the workspace in Eclipse.
  9. There will still be an entry in your Package Explorer for the project that you moved, which references the old project location. Delete it (right-click -> Delete). We'll re-add it momentarily.
  10. File -> Import -> Mercurial -> Projects from Local Mercurial Repository
  11. Browse to the root of your repository directory. Eclipse should detect the projects inside your repository directory, including any that might already be listed in your Package Explorer.
  12. Check only the project(s) you just created, and click Finish.

Importing projects from an existing repository:

  1. If you haven't done so yet, clone the repository to a directory inside your workspace using an external tool.
  2. Open the workspace in Eclipse.
  3. File -> Import -> Mercurial -> Projects from Local Mercurial Repository
  4. Browse to the root of your repository directory. Eclipse should detect the projects inside your repository directory.
  5. Select the project(s) you want, and click Finish.

Reference links:

Friday, April 6, 2012

Blocking Facebook Apps

This has been annoying me for ages.  Here's the rather hidden means Facebook provides to block apps from sending notifications, etc.
  1. In Facebook, click the world icon at the top of the page.
  2. Click “see all notifications” at the bottom of the popup.
    • If you can’t find the world icon use this link to go to the notifications directly.
  3. Click on the X on the right side of the offending notification.
  4. Click change app settings.
  5. Select to notify NEVER.
These instructions blatently stolen from the helpful Daniel Travolto.

Saturday, February 25, 2012

IDE Color Themes for Eclipse and Visual Studio

I hate hate hate (did I say hate?) staring at black-on-white text on a monitor. When your whole day is spent in front of a computer, the glare from a bright LCD screen can lead to some pretty serious eye strain. So for any tool in which I spend a significant amount of time, I tend to adjust the colors to give my eyes a rest.

As a developer working in an IDE with syntax highlighting, this can become a time-consuming process as you hunt down every last textual variant in the options. Fortunately, the kindly residents of the interwebs have contributed their time to the following websites.

If you're a Microsoft corporate sellout, check out Studio Styles (for Visual Studio).

If you're an Open Source hippie code-hugger, give Eclipse Color Themes a click-through. There's also an Eclipse plug-in for easy in-editor switching. Nice!

And for the love of Cheese and Rice, turn down the brightness on those monitors! Your eyes will thank you!

Sunday, January 29, 2012

Android Development - Starters Guide (Updated for Android 4.0)

First things first, major appreciation goes out to Lars Vogel for his incredibly helpful tutorial on Android development.  The last time I tinkered with all this, the best (only) online resources available were on the official Android Developers site, which is a great reference site, but didn't provide the clearest guidance to get you up and running quickly.  If you're here to get started with Android Development for the first time, save yourself some headaches and head straight over to Lars' tutorial.  Thanks Lars!

Second, the folks at Google have simplified the initial setup and installation process.  No more mucking around to download and install the SDK, then install Eclipse and install the APK plug-in, then tell the APK where your SDK is... all these dependencies can be installed for you from inside Eclipse now, and that awkward SDK configuration is handled for you.  So thanks Google!

So, here are the steps I took to set up my Android development environment.  FYI, I'm working in a VirtualBox VM with a sparkly fresh copy of Ubuntu 11.10.
  • First, open the Ubuntu Software Center, search for "eclipse", and install the Eclipse Integrated Development Environment.  (No need to install eclipse-jdt separately anymore, Ubuntu apparently gives it to you automatically now.  Yay!)  Note that it might take a while to download and install.
  • When it's done installing, launch Eclipse.
  • Use Eclipse's Update Manager (Help -> Install New Software...) to install the Android Development Toolkit plug-in.
    • First, be sure to add the software site for the version of Eclipse that you're using (in my case, it was http://download.eclipse.org/releases/indigo/).  Otherwise Eclipse won't be able to resolve dependencies when installing the ADT plug-in.  I don't know why this isn't added by default, but it always trips me up.
    • Next add Google's ADT software site (https://dl-ssl.google.com/android/eclipse/).
    • Working with the Google software site, select the "Developer Tools" item and it's four sub-items.
    • Click Next, and after Eclipse did some calculating, click Next again to confirm that you want to install the items you selected.
    • Then accept a couple of license agreements, and click Finish.
    • Eclipse will popp up a progress dialog, and do its download and install magic.
      • Note that in the middle of this step, I got a warning prompt asking me to confirm that I want to install unsigned content.  Clicking "Details" revealed that it's Google's ADT components making Eclipse a little nervous.  I clicked OK and didn't look back.
    • When the installation completes, Eclipse should prompt me to restart (Eclipse, not the whole computer), which you should do.
  • After Eclipse restarts, it should prompt you to configure a copy of the Android SDK that it can use.
    • I opted to let it install a new copy of the Android SDK, and chose to install the "latest available version" (4.0.3 at the time I'm doing this).  I left the default install location.
    • Clicking Next will lead to being prompted to let Google gather anonymous usage statistics on the SDK (your choice).
    • After a little bit of Eclipse progress-bar action, you should be prompted to Accept all of the SDK packages you wanted installed.
    • Then the Android SDK Manager will take over, showing a progress bar while it downloads and installs the SDK.
    • Note that only some of the SDK components are installed during this step.  It's enough so you can write and release an app, but there are other components for each API version that you'll also want.
  • In order to install ALL the components for a particular API version, you'll want to select them yourself in the Android SDK Manager.
    • In Eclipse, Window -> Android SDK Manager
    • Under the Packages section, check the box next to any entry or sub-entry that you want to install.  I recommend just checking the box for each version of Android that you want to target, and let it auto-check all of it's sub-entries.
    • Then click Install, and wait...
    • ...and wait...
    • ...and maybe put on a TV show until it finishes downloading and installing.
From here, I should be good to create a new android project.  But that's for another day...


Friday, January 20, 2012

Software Craftsmanship: Coding Katas

This is a collection of links to various coding katas I've run across.  I haven't tried all of them, but probably will over time.

For anyone wondering what the heck a kata is, this article from Dave Thomas is a good place to start.

First is Dave Thomas' post, which lists his original set of 21 kata.

"Vital Testing"
A set of six Kata used during Jim Weirich's half-day session at CodeMash 2012.

NimblePros Kata
Ten kata, including bowling, fizzbuzz, greed, potter, and tennis scoring.

Gilded Rose Kata
An interesting refactoring exercise where some files/classes in the project are absolutely off limits to editing.  The link above references a C# starter solution, but you can find Java and Ruby starters here.

At CodeMash 2012, there was a full-day session on "Putting the D&D in TDD".  I didn't attend, but got a link to a GitHub repo with the exercises from someone who did.  Although not exactly a set of katas, it could still be an interesting set of exercises to go through.

Sunday, October 16, 2011

Ubuntu 11.10 Upgrade

Just upgraded to Ubuntu 11.10 Oneiric Ocelot, and found that Flash was no longer installed or working. Fixed it by (re?)installing restricted extras, though I was surprised I had to do this since restricted extras was installed prior to the upgrade. Oh well.

Also ran across this interesting post on "10 things to do after installing Ubuntu 11.10". It's focused on a fresh install, and was written based on the 11.10 beta, but everything still applies and may be a helpful reference in the future.

Monday, February 21, 2011

VirtualBox Panel Indicator for Ubuntu

Big thanks to Michael Otto for creating an Ubuntu Indicator Panel applet! It has a drop-down menu that lets you directly launch any VirtualBox VM you have configured on your machine. Also props to the several kindly bloggers who gave instructions for installing this slick utility.

It's not part of the official Ubuntu repository (yet, I'm sure) so you need to add the correct repository and install it using apt. The command-line commands are:
sudo add-apt-repository ppa:michael-astrapi/ppa
sudo apt-get update
sudo apt-get install indicator-virtualbox
You can have it start automatically on log-in by adding it to the list of Startup Applications (System -> Preferences -> Startup Applications). The command to start it is:
indicator-virtualbox
This is so helpful it's bound to end up in the primary Ubuntu repository in the next release or two. Thanks again, Michael!

Saturday, February 19, 2011

Ubuntu Ambiance Icons for Dropbox 1.0

I found these icons for Dropbox that match the Ubuntu mono dark (ambiance) theme. The link includes instructions for installing the icons for Dropbox 0.8, but Dropbox is up to 1.0 now and the path and filenames have changed. The new path is:
~/.dropbox-dist/icons/hicolor/16x16/status
and the filenames have all been prefixed with "dropboxstatus-". With these minor tweaks, my Dropbox indicator now matches nicely with the rest of the Ambiance theme.

Saturday, February 12, 2011

Enabling DVD Playback in Ubuntu

Surprisingly, I've never done this before, but I needed to enable DVD playback on my wife's new netbook which she uses for her work. While I was at it, I also enabled it on my new laptop. We're both running Ubuntu 10.10 and loving it.

Because of Ubuntu's commitment to free / open-source software (and because of some licensing concerns), Ubuntu doesn't ship with the libraries to play mp3s, DVDs, or some other media formats. They are, however, freely (as in beer) available through the package manager / Software Center. Here's what I did to enable DVD playback:
  1. Installed Ubuntu Restricted Extras from the Software Center (ubuntu-restricted-extras if installing using apt or Synaptic).
  2. Verified in the Software Center that 'libdvdread4' was installed (it was for me, but you should install it if it's not).
  3. Ran the following command from a terminal to install the restricted DVD decryption codec (thanks to the Ubuntu Help site for this):
    sudo /usr/share/doc/libdvdread4/install-css.sh
  4. Installed 'VLC Media Player' via the Software Center. This may not be required, but Totem (Movie Player) crashed a few seconds into playing a dvd before doing this. After installing VLC, both VLC and Totem played the DVD fine. There are probably some codecs installed along with VLC that fixed the problem.
There it is. Both laptops are playing DVDs without any errors.

Wednesday, February 9, 2011

Disabling Ubuntu Swap Partitions

When installing Ubuntu on my wife's new netbook, the installation crashed mid-way through... after it reworked the partition table and added the ext3 and swap partitions. Some trial and error showed that Ubuntu had trouble recognizing the intended partitions when choosing to install alongside Windows again (it tried to cram everything into the space held by the shrunken Windows partition). So in order to get the partitions back to where they were, I tried to delete the new ext3 and swap partitions. Unfortunately, when booting to the Ubuntu Live USB stick, it mounted the swap partition on the main hard drive and prevented me from deleting it! Some googling showed me that I could force-disable all swap partitions via the command-line:
sudo swapoff -a
When running as the Live disk's default 'ubuntu' user, there is no password so there's no password prompt.

Turning off Bluetooth by Default in Ubuntu

The Ubuntu 10.10 install on my new laptop turns on the Bluetooth adapter by default, which is a minor battery drain. Since I rarely (if ever) use any Bluetooth devices, I'd rather turn off the adapter by default. Unfortunately, this is not as simple as changing an option in the Bluetooth panel application and requires some minor command-line tweakage.

Per this helpful post on the Ubuntu forums, I just had to edit the file '/etc/init.d/rc.local':
sudo vim /etc/init.d/rc.local
And add the following line:
rfkill block bluetooth
Although the post suggests putting the line at the end of rc.local, that didn't seem to work for me. So I added it near the beginning and all is well. Now, after booting up and logging in, the Bluetooth panel icon is happily grayed-out to show that the adapter is deactivated.

Friday, February 4, 2011

Remote Desktop (VNC) Refresh Problem in Ubuntu

I set up my main desktop computer to enable remote access to my desktop (System -> Preferences -> Remote Desktop). Then, when I access it from my laptop (Applications -> Internet -> Remote Desktop Viewer), I run into problems. I am able to make a connection, and see the initial screen state when I first connect. Any actions I take through remote desktop are visible on the desktop monitor, but my laptop's Remote Desktop Viewer doesn't get screen updates... it always looks as it did when I first connected.

This is apparently a known issue with a workaround. You just have to disable visual effects on the computer you're accessing (via System -> Preferences -> Appearance -> Visual Effects -> None). This is definitely not ideal as it does clunkify and de-prettify Ubuntu a bit on the target system, but I can live with it for now as I'll be using the laptop far more often.

Wednesday, February 2, 2011

Setting up a Mapped Network Drive in VirtualBox

I've set up a Windows XP virtual machine in VirtualBox to do .NET development. I want my work to be backed up by my host machine's backup software, but the 10GB virtual hard drives wreck havoc as the whole thing needs to be uploaded every time a single file on the virtual machine changes. To avoid this, I've set up a shared folder in the VirtualBox VM configuration, and in the VM I've mapped the share to a network drive. this way all the files on that mapped drive are stored on the file system of the host machine and can be backed up separately from the large virtual hard drive.

The steps were as follows:
  1. Create a folder on the host machine to serve as the VM's network share (all mine are under ~/VirtualBox/Shares)
  2. With the WinXP VM powered off, open up it's settings form the VirtualBox main console (right-click -> Settings)
  3. Under 'Shared Folders', click the 'Add Shared Folder' button
  4. Set the Folder Path to the folder you created above, note the Folder Name if you don't change it, and make sure the share is not marked as read-only. Click OK.
  5. Power on the VM.
  6. In Windows Explorer, open the 'Folders' side panel.
  7. Navigate to 'My Network Places -> Entire Network -> VirtualBox Shared Folders' and open the shared folder you configured above.
  8. Note (or copy to clipboard) the UNC path to the network share (probably something like "\\VBOXSVR\[folderName]")
  9. In Windows Explorer, choose "Tools -> Map Network Drive"
  10. Pick a Drive letter, and paste the UNC path from above into the 'Folder' text box. Ensure 'Reconnect at logon' is checked, and click 'Finish'.
Now you can open 'My Computer' and navigate to the drive letter you selected. The mapped drive will be there every time you start the VM.

Update 2/3/2011: Originally I removed the optical drive from the VirtualBox VM configuration so I could add the shared network drive as D: and move the optical to E:. But when I re-added the optical drive, the VM did not add the optical drive and had trouble mounting the network share to D:. After some tinkering, I ended up with the optical drive back on D: and mapped the network drive to E:. No trouble so far.

Monday, January 24, 2011

Configuring Ubuntu to Auto-Mount an NTFS Partition on Boot

I have a partition on a second internal hard drive that I use for media storage. Ubuntu is smart enough to detect it's existence and add a link in the Places menu to mount and open this partition, however I'd like to have it mounted automatically on boot so it can be accessible to my online backup software. I also want to make sure it maintains it's entry in the Places menu, so I can access it as easily as I currently do.

There are two administration utilities I used to accomplish this:
  • NTFS Configuration Tool (ntfs-config)
  • Storage Device Manager (pysdm)
Both utilities are GUI tools for modifying the '/etc/fstab' file, which defines the file-system table configuration. Both can be found in the Ubuntu Software Center, or can be installed from the command-line with apt-get (package names are in parenthesis). Once installed, both can be launched from the System -> Administration menu, as of Ubuntu 10.10.

The NTFS Configuration Tool is obviously focused on NTFS partitions, so it's not a general-purpose 'fstab' configuration tool. Before launching, make sure you don't have any partitions mounted or it may be unable to detect them properly. When launched, it will detect any new NTFS partitions (meaning ones that don't have entries in 'fstab') and ask if you want to configure them. When this happens, make sure that only the partitions you want to be auto-mounted are checked! Then click OK to add an entry for the checked drive to 'fstab', or you can click Cancel if you don't want any to add any new entries to 'fstab'. This leaves you at the main NTFS Configuration Tool window. If you open up Advanced Configuration, you'll see an entry for any of the partitions you just selected. You may need to check the 'Writable' box next to your new entries. From here you can Close the utility. Your selected partitions will be mounted automatically on boot, and they will still be listed in the Places menu! If you accidentally configured a partition, or want to remove a previous entry, you'll have to fix that with the Storage Device Manager.

The Storage Device Manager is a GUI front-end to modifying any 'fstab' entry, not just for NTFS partitions. When launched, you can select a partition to configure from the Partition List on the left side. If a partition does not have an entry in the 'fstab' file, you'll get a message box saying it hasn't been configured and asking if you want to configure it now. If you load this before running the NTFS Configuration Tool, then it should prompt you when you choose any of the unconfigured drives. If you need to remove an entry that you added with the NTFS Configuration Tool, you can do that here (be sure to Unmount first if applicable).

The only other thing I'd like to tweak would be to not have the mounted partitions display a desktop icon (I like my desktop as clean as possible), but I can live with it for now. And it's probably possible to use the Storage Device Manager to do all this (and of course I could just learn to edit the 'fstab' manually), but I haven't figured that out yet.

Friday, January 21, 2011

Hiding the VirtualBox 'Mini Menu' bar in Fullscreen

When you send a VirtualBox client into fullscreen mode [Host + F], there's a small 'Mini Menu' bar pinned to the bottom of the screen that has Devices and Machine menus on it. This gets in the way, and although you can 'un-pin' it so it auto-hides, I keep bumping it in WinXP VMs when I'm mousing around the XP taskbar. Fortunately, the interwebs is our friend, and a kind blogger pointed out that you can move the Mini Menu bar to the top of the screen:
  1. Make sure your VM is not running
  2. Open the Settings for that VM by right-clicking on it in the main VirtualBox GUI
  3. Go to General -> Advanced tab
  4. Check the Mini Menu entry for 'Show at top of screen'
You can also turn the thing off entirely, if so desired.

Thursday, January 20, 2011

How I Configure A New WinXP System

I've just finished created a new WinXP VM in which I plan to do some .NET development. Since I was getting the system to a customized/workable state from essentially a clean installation, I thought I'd capture the typical tweaks I make when I start work on a new machine.

Typically, I prefer the cleaner (and more compact) "Windows Classic Style" over the "Windows XP Style", though on occasion I've used a tool to enable skinning of the WinXP UI. The windowing style can be set in the Display Properties dialog (right-click on the desktop -> Preferences), on the Appearance tab, via the 'Windows and buttons' pick-list.

I prefer to darken the standard light-grey window coloring. On the Appearance tab, click the Advanced button in the bottom-right. Then click on the OK button in the example window to set the Item picklist to "3D Objects". Pull down the "Color 1" color selector and choose 'Other' so you can set the RGB values to Red: 155, Green: 147, Blue: 128.

For the desktop background, I can usually find something on DeviantArt, or I might just go for a clean, solid color. Either way, it's set on the 'Desktop' tab of the Display Properties dialog. Some decent solid colors are:
  • Green (R:25 G:70 B:25)
  • Blue (R:0 G:67 B:128)
  • Grey (R:73 G:73 B:73)
  • VS2010 Blue-Grey (R:41 G:57 B:85)
Also, ClearType font smoothing is a must! Microsoft has an online setup wizard to turn this on (you'll have to install the ActiveX component).

While we're on fonts, I'm a huge fan of the Consolas font for any monospaced text editing (programming, notepad, the command prompt). You can download the Consolas Font Pack here. Though it says it's only for uses of Visual Studio 2005 or 2008, I was able to install it without a hitch.

In the QuickLaunch bar, I typically keep three icons visible, with the '>>' popup list for any others I may want. The three are:
  1. A shortcut to 'My Documents' (more on this later)
  2. Chrome (or Firefox, or IE if I'm in a locked-down ecosystem)
  3. The "Show Desktop" link
For the 'My Documents' shortcut, I actually use a modified shortcut to Windows Explorer, as I prefer to have the Explorer 'Fodlers' sidebar open by default. The modifications are probably overkill, but I like it "just right". ;-) To create the shortcut, I copy the Windows Explorer shortcut from the Start menu (Start -> All Programs -> Accessories) and edit it (right-click -> Properties) to the desktop. On the 'General' tab, I change the name to 'My Documents'. On the 'Shortcut' tab, I change the "Run" picklist to 'Maximized' and change the Icon to match the normal My Documents icon (in 'C:\WINDOWS\system32\mydocs.dll'). Then just drag this shortcut from the desktop to the Quick Launch bar.

I also tweak the layout and options in Windows Explorer a bit. The navigation buttons toolbar gets changed to use small icons (right-click on it -> Customize -> change 'Icon options' to 'Small icons'). The menu, address, and navigation button toolbars are all dragged to all be on the same line across (navigation on far left, menu on far right, address filling the space in the middle). The Views drop-down is changed to Details. I also turn on the Status Bar (View -> Status Bar). Next, I go to Tools -> Folder Options, to the 'View' tab and click "Apply to All Folders" so these settings stick as I navigate around. In the View tab Advanced Settings list, I do the following:
  • Select "Show hidden files and folders"
  • Uncheck "Hide extensions for known file types"
As far as programs to install, here's a breakdown:
Launchy get's a little extra setup. In Launchy's Options (right-click on the system tray icon), on the General tab, check "Hide Launchy when it loses focus" and "Always on top", and change the hotkey combination to Control + Space. On the Skins tab, change the skin to "Spotlight Wide". On the Catalog tab, I'll add a custom folder (like "MyDocs\util\Shortcuts\") set to index "*.lnk" files, where I can throw any shortcut I want to be launchable.

Alright, that's all I can think of for now. I'll try to keep this updated as I think of further customizations.

Wednesday, January 19, 2011

Installing CrashPlan 3.0 in Ubuntu 10.10

I've put off installing online backup software for ages. It's the kind of thing that sits on your TODO list, nagging at you, but for some reason it just always seemed very daunting. At some point a friend of mine recommended a service called CrashPlan. It's cheap ($6 a month gets you unlimited space for all your home's computers), and best of all, it supports Windows, Mac, and (gasp!) Linux. The program also allows free offline backup, for example to a dedicated hard drive or another computer on your network. They offer a 30-day trial of their online backup service, which I'm trying right now. So far, I'm thoroughly impressed and will likely buy a year's subscription when my 30 days are up!

My only gripes have to do with ease-of-use on Linux:
  • The first is with the Linux installation, which basically consisted of a shell script which obviously ran in a geeky terminal window. To be fair, CrashPlan gets major points for even supporting Linux, so this does feel a bit like nitpicking. And, granted, Linux users tend to be significantly less command-line averse, but I'd still prefer to see them offer a more novice-friendly installation option. I have no trouble recommending Ubuntu to the average "grandma" user (web/email/word processing), but this is not something Grandma could install herself. It's just not up to par with the ease-of-use expected on the more ubiquitous Windows or Mac platforms.

  • The second gripe is with the shortcut (launcher in Ubuntu parlance) for the CrashPlanDesktop GUI configuration tool. The installation added a shortcut to the tool on my desktop, but not one to the Ubuntu Applications menu. Other third-party installations (like Dropbox) have integrated into the standard Ubuntu applications listing, so why doesn't CrashPlan? Also, after rebooting, the shortcut disappeared and I had to manually re-create it. This was probably a glitch, but the annoyance would have been averted if there had been a shortcut in the Applications menu.
Gripes aside, the installation worked without a hitch. I just chose all the default options and it installed and ran fine. The GUI tool is clean, simple to use and understand, but offers plenty of options to fine-tune the backup to my needs.

For future reference, to recreate the CrashPlanDesktop launcher, just create a new launcher or copy an existing one, open it in a text editor, and replace the contents with the following:
#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[en_US]=/usr/local/crashplan/skin/icon_app_128x128.png
Exec=/usr/local/bin/CrashPlanDesktop
Name[en_US]=CrashPlanDesktop
Comment[en_US]=CrashPlan Desktop Configuration Tool
Name=CrashPlanDesktop
Comment=CrashPlan Desktop Configuration Tool
Icon=/usr/local/crashplan/skin/icon_app_128x128.png

Cloning a Virtual Hard Drive in VirtualBox 3.0

VirtualBox doesn't make it easy to clone/copy the configured virtual machines and their hard drive image files. To create an exact clone of an existing VM, you have to first clone the .vdi disk image file from the command line. Then you create a new VM with the same configuration, but point it to use the cloned .vdi image instead of the original. You'd think this would be provided as a one-click menu option, but it's not.

In Ubuntu, the .vdi files are stored in:
~/.VirtualBox/HardDisks/
and the command to clone a .vdi is:
VBoxManage clonevdi [source .vdi] [new .vdi]
More (and better) info can be found from this article.

Monday, December 27, 2010

Installing Dropbox 1.0 in Ubuntu 10.10

Dropbox recently released a new 1.0 client for all platforms with several new features. Particularly, the selective folder syncing would be very helpful for the Ubuntu netbook my wife uses. However, the Dropbox website only offers Linux downloads for the 0.6.7 version. Strange.

A little googling led to this forum discussion, which linked to this forum post and this French-language blog posting. The steps are quite easy, but it's bothersome that Dropbox hasn't made this obvious. The download and installation process is seamless for both other platforms.
  1. Stop the Dropbox client to your home folder.
  2. Download the appropriate 1.0.10 linux client for x86 or x86_64.
  3. Rename or delete the '.dropbox-dist' folder (in a terminal at ~, mv .dropbox-dist .dropbox-dist.backup).
  4. Unpack the downloaded client archive (tar zxvf dropbox-lnx.x86-1.0.10.tar.gz).
  5. Restart the Dropbox client from the Ubuntu menu (Applications -> Internet -> Dropbox).
The Dropbox icon should appear in the Ubuntu notification area. The new version (1.0.10) should show in the Preferences window, on the Account tab.

Update 1/31/2011: I installed Dropbox on my new laptop Ubuntu install using the 0.6.7 installer downloaded from the website. After installing, it immediately downloaded an update to the 1.0.20 version. Thanks, Dropbox team.