Friday, February 26, 2010

Automating and housekeeping my computer...

   Just still on a good vibe here from getting all my important information off the desktop and onto the server where backing it up is no longer something either I, or my desktop, have to worry about.  Now I thought I'd share how I automated some of the housekeeping that happens on my computer on a daily basis.
   Some background first.
   My wife and I listen to podcasts quite a bit.  Her on her walk to work, and myself, when I'm out driving around alone (I have a stereo that can play mp3's on SD cards, I don't wear headphones while driving, that would be weird.
   I also have an adorable son, and while we take loads of photos of him for ourselves, friends and family also love to take their own pictures and send them to me, which I like to add to our personal collection for backup and Picasa.
   Finally, I find myself often downloading programmes or files, using them, deleting them, then realizing I want to try them again after reading more, so I like to file them properly and keep them around.
   I tried Lifehacker's Belvedere programme, but it wasn't able to perform multiple functions on the same file, and I also have a personal bias against installing anything that requires, well, installing!
   By first downloading the Microsoft forfiles.exe (available here) to my C:\WINDOWS directory, and working some huge command line voodoo, I was able to achieve all my ambitions directly from the command line.
   First I created the following batch file :

rem Copy podcasts to the podcasts directory.

copy /y "\\NAS\Volume_1\My Documents\*.mp3" "\\NAS\Volume_1\My Documents\My Miscellaneous\My Podcasts\"

rem Move podcasts to the wife as well.

move /y "\\NAS\Volume_1\My Documents\*.mp3" "\\NAS\Volume_1\My Documents\My Miscellaneous\Wife's Podcasts\"

rem Move pictures to My Pictures directory.

move /y "\\NAS\Volume_1\My Documents\*.jpg" "\\NAS\Volume_1\My Documents\My Pictures\"
move /y "\\NAS\Volume_1\My Documents\*.gif" "\\NAS\Volume_1\My Documents\My Pictures\"
move /y "\\NAS\Volume_1\My Documents\*.bmp" "\\NAS\Volume_1\My Documents\My Pictures\"
move /y "\\NAS\Volume_1\My Documents\*.pdf" "\\NAS\Volume_1\My Documents\My Pictures\"

rem Move everything else to My Flotsam directory and delete stuff older than a month.

move /y "\\NAS\Volume_1\My Documents\*.*" "\\NAS\Volume_1\My Documents\My Miscellaneous\My Flotsam\"
PushD "\\NAS\Volume_1\My Documents\My Miscellaneous\My Flotsam" &&("forfiles.exe" /s /m *.* /d -31 /c "cmd /c del @file") & PopD

rem Run CCleaner.

"\\NAS\Volume_1\My Documents\My Miscellaneous\My Essentials\CCleaner\CCleaner.exe" /AUTO

rem Standby Computer.

rundll32 powrprof.dll,SetSuspendState 

  You can sorta see how it all works.  I download EVERYTHING to the root "My Documents" folder (which has such a long UNC because it's actually been moved off the desktop and onto the NAS), and from there, either specifically define where I want it to go, or just sit back and let my computer do the common ones for me.
   MP3's get copied and them moved to both of our directories, because we have such similar tastes in what we want to listen to.  Pictures (and .PDF's) get copied to the My Pictures folder where I can organize them further before letting Picasa work its magic.  Everything else goes to the "My Flotsam" subdirectory, where it can sit for a month before being automatically deleted thanks to the forfiles executable which really should be included with every flavour of Windows!
   Now, all you need to do is head to Start > All Programs > Accessories > System Tools > Scheduled Tasks and create a new task that points to your batch file.  I have decided to let my computer go to standby, as it only takes four seconds to come back, and hopefully saves a bit of hydro and money...  So I have the task scheduled to run whenever the computer has been idle for ten minutes.  The final line of the batch file is the command prompt method for putting your computer into standby (or do they call it sleep nowadays?)
   Anyway, it took me a bunch of ciphering and pilfering from other websites to get this all together and working for me, and I thought others might appreciate it...  Let me know!

Tuesday, February 16, 2010

Why I don't need to backup my computer.

   Here's something that's mildly erratic - I've decided that I no longer need to backup my desktop computer.
   This is actually less crazy than it sounds, and can be chalked up to a case of semantics as much as anything.
   Ever since a month or so ago, when my main desktop computer died, and, instead of restoring it from one of my images, I just reinstalled Windows and the few applications I need, as well as my business records, I have been growing in the realization that I really don't need to be backing up gigs of info each and every night.
   There are a few reasons why I'm able to do this, that anyone with a reasonable amount of computer saavy can achieve, but I wouldn't recommend it to everyone unless they follow the same regime which I do.
   Basically, I'm fine with my email residing in the cloud.  Gmail works great for me, and if I lost all those emails, I'm quite sure my life would go on.  So that's one pile of data I have little concern over.
   My home photos and videos, those are COPIED to the cloud via Picasa, but not as an archival practise, that's just to share with friends and family.  As per my rules of computing happiness, they are copied to two flash drives every month and placed in a safety deposit box.
   Otherwise, all my other data resides on a DNS-323 networked attached storage drive.  Two 1.5TB drives connected together, NO LONGER IN RAID, and set to mirror overnight.
   The information on them, while handy to have, isn't unrecoverable in theory - it consists mostly of my CD's and DVD's ripped for easy access throughout the house, as well as applications that I find myself installing or reinstalling on my own, and client systems regularly, so I like to keep copies of them on my local network.
   The only thing I had to change was the location of my business account file, from the local hard disc to the server.  Now the desktop I use has a handful of readily re-installable applications, and no user-specific data on it.  I keep those applications, and any relevant drivers, on the network drive, so it only takes me an hour or so to rebuild a completely useable computer with all of my data still readily available, if need be.  Probably less time than it would take to rebuild an image file!
   Anyway, just thought I'd throw that out there for you to cogitate on.  I'd love to hear comments about anyone's opinions on this.  I suppose if you are hard core about customizing your operating system experience, you'd had to have to redo that, but I'm fine with most default options, if it means one less programme to install, and less things running in the background or through the night for me.
   Best regards everyone.

Monday, February 15, 2010

Google Chrome OS on Asus eeePC 2GB Surf

   Hello everyone,

   Sorry for such a long delay between posts, just had a busy holiday season with regular holiday stuff, and not much else to report.
   One project I have tinkered with repeatedly and then given up on, only to come back to it when my wife complains about her netbook, has been getting the Chromium OS up and running.  Last night, I believe I finally cracked the code, and was rewarded to a booting, useable, wirelessly internet connected eeePC surf working at reasonable speed.
   I thought I'd list exactly what I did for others that seem to have experienced the same headaches I did at numerous points throughout the process...
   For starters, we're going to essentially follow the awesome steps laid out by Hexxen at his website.  All this assumes that you have access to a Windows based computer other than your netbook.

  1. Begin downloading Chrome Image here.
  2. Ensure that you have installed 7-Zip or an equivalent programme.
  3. Download and extract the Windows Image Writer.
  4. Copy the Windows Image Writer directory to the ROOT of your C: drive.  (failure to copy this directory, and the .img file for Chrome to the ROOT of the C: drive can cause the dreaded and annoying "Error 8:")
  5. Right-Click on the tar.gz image file, and use 7-zip to "extract here".
  6. After that completes, again, right-click on the .tar image file and use 7-zip to "extract here".
  7. This should leave you with a .img file.  Copy this file to the ROOT of your C: drive.  (failure to copy this file, and the directory for the Windows Image Writer, to the ROOT of the C: drive can cause the dreaded and annoying "Error 8:")
  8. Insert your USB flash drive or SD Card.
  9. Enter the Windows Image Writer directory and execute the Win32DiskImageer.exe programme.
  10. Select the .img file in the "Image File" window, and ensure that the proper drive letter is selected in the "Device" window.
  11. Click on "Write".
  12. Once complete, remove your flash drive or SD Card, and insert them into your powered-off eeePC.
  13. Power on your eeePC and TAP THE ESC KEY to select the boot order.  Don't try to change the boot order in the CMOS/BIOS settings - it doesn't seem to be able to detect a proper USB boot from there.
  14. Boot from the USB device, rather than the internal SSD.
  15. Enter "facepunch" as your username and "facepunch" as your password.
  16. Once Chrome OS is booted and appears, press Ctrl-Alt-T to go the terminal.
  17. Enter "sudo dd if=/dev/sdb of=/dev/sda bs=4m".  Don't bother with the "/usr/sbin/chromeos-install" advice that you see in places - it won't work on a 2GB SSD.
  18. Remove your USB device, and reboot.
   Full disclosure now - this worked for me, and allowed me to get past many of the hurdles and obscure errors that arise from being an early adopter.  If it doesn't work for you, you're welcome to email me, but I can't promise I can help much.  Also, please be sure to note that this is a destructive process on your SSD, it is NOT a dual-boot.  You will lose everything existing on your SSD by following these instructions.
   I also want to point out that I quickly returned to a stripped-down copy of Windows XP on my Surf, because the Chrome OS still lacked the ability to connect to my network printer, as well as to my network server, both of which are still critical to my family's enjoyment of their netbooks.