32-bit Google Chrome on 64-bit Ubuntu (Precise Pangolin)
It appears that Adobe has left 64-bit Linux users out in the cold for Flash support. You see, Adobe dropped support for Flash on Linux unless you're running Google Chrome, but the 64-bit version of Chrome does not include Flash support. The current (and final) version of the non-free Adobe Flash plugin is not without its fair share of bugs.
However, with the fairly recent introduction of Multi-Arch support in Ubuntu, installing and using the 32-bit version of Chrome should be no problem, right? Wrong, apparently there is a bug in the xdg-utils package that prevents a simple "aptitude install google-chrome-stable:i386".
The problem is that, while the xdg-utils package is cross-platform (it specifies "Architecture: all"), it specifies no "Multi-Arch" entry, which then defaults to "Multi-Arch: no". So when attempting to install the 32-bit Chrome package you end up with unmet dependencies.
I've modified that package and added the necessary Multi-Arch line, you can get it here. Simply download and install the new package and you should be able to install the 32-bit version of Chrome like you normally would.
Dual Tap Minifridge-Kegerator Conversion

Well it's definitely about time I finally did this. My homebrewing has been at a standstill without anywhere to properly force-carb/cool/dispense my brew! But I finally bit the bullet and did it. The project wasn't too terribly complicated and cost just over $400 after all was said and done. With all the parts in hand, I finished the conversion in one evening after work. I think the results were great!
A big thanks to shanman14 from The Northern Brewer Forums for his post about converting the same exact fridge I had found! The fridge is a Danby DAR440BL which I got from Walmart. I got all of my major conversion hardware from KegKits.com.
Tip: Multiply Copy/Cut Buffers in Vim
Here's a quick vim tip for today. In vim it is possible to hold multiple items in a clipboard-like fashion. It's really easy, simply:
"ayyto copy to a line to the 'a' buffer, then you could:
"byyto copy a line to the 'b' buffer. Later to paste 'a' simply:
"apAnd likewise with 'b':
"bpNote that this also works with delete and other edit modes like visual and visual line modes, as well as with any motion command.
HowTo: Init Script For Multiple Deluge Daemons
Like many, I've managed to become a member of a private torrent tracker. The particular tracker I use (like many others) relies heavily on user statistics like ratio. The only problem is that I've been using BTGuard (which I highly recommend) to keep all of my torrent traffic private, which wreaks havoc on the statistics the private tracker keeps (almost nothing gets logged). To solve this problem, I now run two instances of the Deluge daemon with two separate configurations: one, for private trackers, is configured with no proxy; the other, for public trackers, connects through BTGuard.
To do this I modified my init script and default config file (originally taken taken from here, please refer there for more info) borrowing something I'd seen in the Buildbot init scripts.
Put this in /etc/default/deluge-daemon and set DELUGED_USER to the user you which to run deluge as. You can copy-paste a set of DAEMON_* lines to add as many daemons as you'd like. Notice the third daemon is just the web-ui. Pay close attention to arguments of each daemon:
# Configuration for /etc/init.d/deluge-daemon # Goes in /etc/default/ # The init.d script will only run if this variable non-empty. DELUGED_USER="deluge" # Should we run at startup? RUN_AT_STARTUP="YES" DAEMON_ENABLED[1]=0 DAEMON_NAME[1]="deluged" DAEMON_PATH[1]="/usr/bin/deluged" DAEMON_ARGS[1]="-d -L warning -l /var/log/deluge/daemon/warning.log -p 58846 -c /home/deluge/.config/deluge/" DAEMON_ENABLED[2]=0 DAEMON_NAME[2]="deluged" DAEMON_PATH[2]="/usr/bin/deluged" DAEMON_ARGS[2]="-d -L warning -l /var/log/deluge/daemon/warning-private.log -p 58847 -c /home/deluge/.config/deluge-private/" DAEMON_ENABLED[3]=0 DAEMON_NAME[3]="deluge-web" DAEMON_PATH[3]="/usr/bin/deluge-web" DAEMON_ARGS[3]="-L warning -l /var/log/deluge/web/warning.log"
This should be placed in /etc/init.d/deluge-daemon:
#!/bin/bash ### BEGIN INIT INFO # Provides: deluge-daemon # Required-Start: $local_fs $remote_fs # Required-Stop: $local_fs $remote_fs # Should-Start: $network # Should-Stop: $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Daemonized version of deluge and webui. # Description: Starts the deluge daemon with the user specified in # /etc/default/deluge-daemon. ### END INIT INFO # Author: Adolfo R. Brandes PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DESC="Deluge Daemon" UMASK=002 # Change this to 0 if running deluged as its own user PKGNAME=deluge-daemon SCRIPTNAME=/etc/init.d/$PKGNAME # Read configuration variable file if it is present [[ -r /etc/default/${PKGNAME} ]] && . /etc/default/${PKGNAME} # Load the VERBOSE setting and other rcS variables [[ -f /etc/default/rcS ]] && . /etc/default/rcS # Define LSB log_* functions. # Depend on lsb-base (>= 3.0-6) to ensure that this file is present. . /lib/lsb/init-functions for i in $( seq ${#DAEMON_ENABLED[@]} ); do [[ ${DAEMON_ENABLED[$i]} -ne 0 ]] && continue # Exit if the package is not installed if [[ ! -x ${DAEMON_PATH[$i]} ]]; then log_failure_msg "Configuration error daemon $i does not exist or not an executable" exit 1 fi done if [ -z "${RUN_AT_STARTUP}" -o "${RUN_AT_STARTUP}" != "YES" ] then log_failure_msg "Not starting $PKGNAME, edit /etc/default/$PKGNAME to start it." exit 1 fi if [[ -z "$DELUGED_USER" ]] then log_failure_msg "Not starting $PKGNAME, DELUGED_USER not set in /etc/default/$PKGNAME." exit 1 fi # # Function that starts the daemon/service # do_start() { errors=0 for i in $( seq ${#DAEMON_ENABLED[@]} ); do [[ ${DAEMON_ENABLED[$i]} -ne 0 ]] && continue start-stop-daemon --start --background --quiet --pidfile /var/run/${DAEMON_NAME[$i]}$i --exec ${DAEMON_PATH[$i]} \ --chuid ${DELUGED_USER} --user ${DELUGED_USER} --umask ${UMASK} --test > /dev/null if [ $? -eq 0 ]; then start-stop-daemon --start --background --quiet --pidfile /var/run/${DAEMON_NAME[$i]}$i --make-pidfile \ --exec ${DAEMON_PATH[$i]} --chuid ${DELUGED_USER} --user ${DELUGED_USER} --umask ${UMASK} -- ${DAEMON_ARGS[$i]} [[ $? -ne 0 ]] && errors=$(($errors+1)) sleep 2 fi done return $errors } # # Function that stops the daemon/service # do_stop() { # Return # 0 if daemon has been stopped # 1 if daemon was already stopped # 2 if daemon could not be stopped # other if a failure occurred errors=0 for i in $( seq ${#DAEMON_ENABLED[@]} ); do [[ ${DAEMON_ENABLED[$i]} -ne 0 ]] && continue start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --user ${DELUGED_USER} \ --pidfile /var/run/${DAEMON_NAME[$i]}$i if [ $? -eq 2 ]; then errors=$(($errors+1)) else rm -f /var/run/${DAEMON_NAME[$i]}$i fi done return $errors } case "$1" in start) [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME1" do_start ret_val=$? case "$?" in 0) [ "$VERBOSE" != no ] && log_end_msg 0 ;; *) [ "$VERBOSE" != no ] && log_end_msg 1 ;; esac exit $ret_val ;; stop) [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME1" do_stop ret_val=$? case "$?" in 0) [ "$VERBOSE" != no ] && log_end_msg 0 ;; *) [ "$VERBOSE" != no ] && log_end_msg 1 ;; esac exit $ret_val ;; restart|force-reload) log_daemon_msg "Restarting $DESC" "$NAME1" do_stop ret_val=$? case "$?" in 0|1) do_start ret_val=$? case "$?" in 0) log_end_msg 0 ;; 1) log_end_msg 1 ;; # Old process is still running *) log_end_msg 1 ;; # Failed to start esac exit $ret_val ;; *) # Failed to stop log_end_msg 1 exit $ret_val ;; esac ;; *) echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 exit 3 ;; esac :
HowTo: CyanogenMod7 Nightlies for the Motorola Droid X

Within a month of purchasing my Motorola Droid X I was already rooting it and loading a custom ROMs onto it. I was big into LibertyROM for quite a while as it wasn't completely Blur-less and offered great performance improvements over Motorola's stock UI. On June 15th, 2011 thanks to the laborious efforts of @cvpcs a RC0 of CyanogenMod7 was released for the Droid X. Less than a week later, the Droid X was added to CM7's official nightlies. With these nightlies came an influx of bug fixes and improvements. The process of getting all set up with CM7 can be a bit complicated and I've had at least one of my friends already ask me for help, so I figured it was best to write everything down so I could direct everyone to one place. So without further ado, I present my guide to getting CM7 on your Droid X complete with fixes and tips on how to get your phone in peak running shape.
Note: While this guide was written with the Motorola Droid X in mind, it could easily apply to any Android phone supported by CyanogenMod. Simply use the proper root exploit, bootloader and version of CM7.
Warning: Rooting your phone my void your warranty. There are several steps in this process where-in you can totally brick your phone. While this is unlikely, it's important to know the risks before going forward. I take no responsibility on anything you do to your phone, your data, or yourself.
Step 1: Backup
Before doing anything like this to your phone, I highly recommend that you back your stuff up. You can back up application data (you don't want to lose your Angry Birds game saves!) with Titanium Backup. I highly recommend this app, it's perfect for ensuring you don't loose your app data when you upgrade ROMs. You'll also want to perform a Nandroid backup, but I'll explain that later. Finally, it wouldn't hurt to copy the entire contents of your SD Card to your PC for safe keeping after performing all other backups.
Step 2: Get Root
The first and most important step is to attain root access to your phone. If you're already rooted, skip ahead to the next section. If you have upgraded beyond 2.3.340 without root then you have some work ahead of you, and unfortunately you won't be able to make a nandroid of your current setup. If this is the case, follow the downgrade instructions here stop when you reach the "Gaining Root Access" instructions. After you have flashed the SBF on your phone, don't bother setting anything up, we're about to flash it all over again. Once you have a rootable Android version running do the following to root it:
- Get z4root and install it on your phone. [Download]
- Load up z4root and choose "Permanent Root".
- The app will run the exploit and reboot your phone. You should then have the "Superuser" application installed.
Step 3: Get the Files
Once you've rooted your phone, it's time to gather all the files and apps necessary to load up your new ROM.
- Download and install the Bootstrapper (if you don't already have it)
- If you are running 2.3.340 use the Droid 2 Bootsrapper. [Download]
- Otherwise grab the Droid X Bootstrapper. [Download]
- Grab the latest nightly of CM7 and put it in on your SD Card (the Droid X is referred to by its board name, the cmda_shadow).
- [Optional] If you want the official Google apps (Gmail, Reader, Talk, etc.) grab the GApps package and put it on your SD Card. [Download]
- [Optional] As of this writing there is a bug that affects the camera, YouTube, Netflix, and video playback in general in the nightly builds. A fix exists so I would recommend you get it as well and put it on your SD Card. [Download]
Step 4: Wipe and Install
Now it's time to get down and dirty.
- Open the bootstrapper app and choose "Reboot Recovery".
- You will be rebooted into the bootstrapper recovery menu. To move in this menu press the up and down volume buttons, the camera button selects options, and the back button goes back.
- [Optional] Perform a Nandroid backup by choosing the "backup and restore -> backup" option if you would like to save the current state of your phone to your SD Card.
- Choose the "wipe data/factory reset" option, if you haven't made backups of your app data then everything will be lost after this.
- Choose "install zip from sdcard -> choose zip from sdcard" and select your "cm_shadow_full-*.zip" file.
- [Optional] Install the GApps package by following #5 and selecting the "gapps-gb-20110613-signed.zip" file.
- [Optional] Install the camera fix by following #5 and selecting the "CameraCamcorderTorchFix.zip" file.
- Choose "reboot system now".
Step 5: Welcome to CM7
After rebooting your should be greeted by the CM7 boot screen. Once booting is completed, if you opted to install the GApps package, you will be greeted by the Google apps install program. Once that is complete you will be brought to your home screen and CM7 will be completely installed, congratulations! If you install the GApps package and are set up to sync your apps, after a while all of your old apps should start downloading and installing automatically. From here you can go on your own way, but there are a few recommendations that I have for a new CM7 user.
[Optional] Step 6: Trim the Fat
Now CM7 isn't by any means bloated, but that doesn't mean that it won't come with apps that you may never need or want. The best way to remove these apps is to simply use Titanium Backup, simply select the app and hit un-install. Before you just go randomly removing stuff, check this list to make sure it's safe. Here are some of the apps I chose to remove:
- ADW Launcher (I use LauncherPro)
- Calculator (I use RealCalc)
- Amazon MP3
- Email (Doesn't effect Gmail)
- Music (I use Google Music beta)
- Torch (I use the button on Power Control Plus)
- Home Screen Tips
- Voice Dialer (Google Voice Search does everything this can)
[Optional] Step 7: Restore Backups
This step may be optional but many will likely want to take it. Once your apps are re-downloaded and installed, I recommend restoring the data-only parts in Titanium Backup.
[Optional] Step 8: Explore CM7
Ok so now you have CM7, so what? Well I'm sure by now you've noticed some serious performance increases. For example I prefer LauncherPro for my home screen/dock. On stock Blur, it runs terribly, on LibertyROM it ran alright, on CM7 it flies! You should be noticing smooth scrolling, quick app loading, and overall polish. But CM7 is more than just a performance boost, it has quite a few neat features up its sleeves. Your best first steps are to fully explore the CyanogenMod settings menu.
[Optional] Step 9: Battery Recalibration
If you are experiencing less battery life than expected then I recommend you try running a battery recalibration. I was able to get over 22 hours of battery life out of my X before it forced shutdown. Very nice.
[Optional] Upgrading Nightlies
Upgrading to a newer nightly is dead simple. Load up ROM Manager (it's included with the CM7 Nightlies), to be safe, select "Flash ClockworkMod Recovery" and choose "Droid X (2nd-init)". Finally, select "Check for ROM Updates" it should pop up asking you if you want to upgrade to a newer version (if there is one). If you select yes it will also ask if it should install Google Apps, this is your preference. After the update is done downloading ROM Manager should prompt to reboot and flash, note that there is no need to wipe data, just Dalvik cache. Your phone will reboot itself into recovery install the update, and boot back up, and that's it!
Conclusion
So that's it! I love CM7 on my Droid X. It may not be extremely stable at this point and still has a few bugs, but it's a small price to pay for such a great ROM and such amazing performance. If you have any problems in the process, feel free to post questions in the comments section. If you find any errors in the guide above, please notify me either by sending me an email or commenting below. Enjoy!
Site Updates
I've begun customizing WordPress. The first order of business was changing the theme from the default. I might be finding something a bit more unique down the road, but this works for now.
Second, I've set up public access to my Git repo using GitPHP and Gitosis. Currently, the only thing available on there is the source for my thermostat project. As previously noted, I'll be posting much more info about that project soon.
Welcome to the Site
Well I finally got around to buying my domain, a VPS and installing WordPress. I’ll be keeping this blog/site to share interesting tidbits and personal projects I work on throughout my life.
My first post of actual substance will likely be my current personal project: an embedded thermostat system to convert a chest freezer into a kegorator for homebrew. I’ll be posting the PIC source code (likely in the form of my Git repo), schematics, board layout, and finally a small guide on how to build your own or improve upon my design.
Sometime soon I’ll also be posting about my home setup, including my fileserver, firewall, home theater and more.
Don’t expect anything too soon, I’ve got to customize WordPress to my liking as well as setup some extra features on my VPS/website. I’m also in the middle of the job search, and am currently working full-time at Wireless@VT.