Wednesday, July 11, 2012

Friday, July 6, 2012

RC file for your Windows Command Prompt

I had trouble today with my Windows %HOME% changing and throwing off Vagrant's awareness of what boxes are installed (%HOME%/.vagrant.d/boxes). If Vagrant on Windows was working happily for you and then barfs about no boxes installed, see if this may be your problem.

%HOME% was different depending on whether I logged into Windows while on my Active Directory managed network or while I was offline. When on the AD network, %HOME% is set by policy to a mapped drive. When offline, %HOME% is my Windows %USERPROFILE%. I installed Vagrant and some base boxes while off my AD network and everything worked as expected. Base boxes were added to %USERPROFILE%/.vagrant.d/. Back in the office and logged in on the AD network, Vagrant was no longer aware of the base boxes because %HOME% now pointed at my personal mapped drive.

Creating a batch file to set %HOME% to %USERPROFILE% solved the problem.

REM %USERPROFILE%/cmdrc.bat
@echo off

set HOME=%USERPROFILE%

For UNIXy goodness, name it cmdrc.bat, place it in %USERPROFILE% and then add the following to the registry so that this cmdrc.bat file is run whenever a command prompt opens.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
"AutoRun"="%USERPROFILE%\\cmdrc.bat"

--
Figured this out with help from the MinGW wiki's HOWTO Set the HOME variable for cmd exe.

Thursday, April 5, 2012

One Unity Launcher, or One on Each Desktop?

T'was decided that the default behavior for Unity's launcher will be to appear only on the primary monitor in Ubuntu 12.04. For some reason, when I upgraded to 12.04 (beta) today, my setting was for the launcher to appear on ALL desktops. Not a fan of it on all desktops.

For those who want to change this setting, you'll need to install the Compiz configuration manager.

sudo aptitude install compizconfig-settings-manager

Once installed, run it. Hover the Dash Home (Ubuntu icon on launcher), type in "compiz" and click on the "CompizConfig Settings Manager" icon that appears.

Select "Desktop" on the left. Click on "Ubuntu Unity Plugin" on the right.

Select the "Experimental" tab and scroll all the way down.

The setting for where launchers appear is "Launcher Monitors". As of today (2012/04/05), you can select either "Primary Desktop" or "All Desktops."