Thursday, October 28, 2010

easy windows management for XP and Vista (ala Windows 7)

At work, I'm lucky enough to have available Microsoft site licenses for most Microsoft software, including the various operating systems.

I've grown to appreciate the Windows 7 hotkeys for window management, Win + up/down/left/right, that allows hotkey access to moving a window amongst multiple monitors.

However, my home machine is still running Win XP, and I've always felt greatly handicapped (productivity wise) in having to reach for the mouse to move windows around.

No longer. I recently found Easymon (http://www.codessentials.com/products/easymon.html), which is a small, free application that allows almost identical functionality.

No more reaching for the mouse! :)

Friday, October 1, 2010

sending email from OpenWRT 10.03 Backfire (on boot)

My OpenWRT 10.03 Backfire isn't entirely stable when running transmission, and I would like to send simple notification emails to myself from my OpenWRT router whenever OpenWRT rebooted.

I'm accustomed to the "mail" command line program, but it is neither installed nor available in OpenWRT. Doing some digging with opkg and grep, I found a program called ssmtp that seems to do the job.

Installed ssmtp with the usual "opkg install ssmtp", and a little further digging led to finding the configuration file in /etc/ssmtp/ssmtp.conf. In my case, my ISP didn't require any security, so I simply set the "mailhub" option to my ISP's SMTP's server.

However, sending a test email to myself threw up the following error:
root@openwrt:/etc/ssmtp# echo test | ssmtp -s "test" your.email@address.com
 ssmtp: 553 #5.5.4 Domain required for sender address

I guess my ISP's mail server insists on the sender domain being filled in, so I also set the "rewritedomain" option. (I also set the "hostname" option.)

Lastly, to accomplish my aim of sending an email to update me when  OpenWRT reboots, I added the following line to "/etc/rc.local".

echo "Subject:`hostname` booted at `date -Iminutes | sed -e 's/T/ /' | sed -e 's/+.*//'`" | ssmtp your@email.address.com

The results are good enough for me. I now receive an empty email with a subject line in the form of "hostname booted at 2010-10-01 10:59" whenever OpenWRT reboots.

Now to the much more complicated task of figuring out if transmission/screen/top or some other background process is causing the spontaneous reboots. :(