Offensive Fortunes
June 1st, 2010
Ubuntu doesn’t install the offensive data files for the fortune program by default. To install them just run:
sudo apt-get install fortune fortunes-off
Arch Linux
February 9th, 2010
Every now and then I like to set up a Linux instance in VMware to try out new software or to have a sandbox for development. Lately, I’ve found that Arch Linux has some nice features that make it perfect for that kind of setup.
First, it’s unobtrusive. you get a bare basics environment and nothing else. The base install includes little other than the essential packages and lets you build from there. It’s minimal and lightweight with install ISO’s weighing in at around 360MB and the netinstall ISO’s just under 180MB.
When you need more than the base install, Arch Linux has a package system called pacman, which is a breeze to use. Installing a package often involves little more than executing “sudo pacman -S <package name>”. And since it’s is on a rolling release cycle, there’s no need to wait for the next release of Ubuntu to get the latest packages. Configuration is done via text files; adding services to run at start up requires just an edit to /etc/rc.conf. If you need to build packages, Arch Linux provides the Arch Build System, which is a ports-like build system. If you can script in bash, you can build a package.
Good documentation is also available straight from their site. You don’t need to troll through dozens of forums to figure out how to get something installed, you go straight to their wiki, where there are guides on everything from the basic installation procedure to setting up Linux containers. The wiki also hosts translations of these guides in a variety of languages, which I imagine would be helpful for non-native English hackers.
Arch Linux reminds me a lot of my first Linux distro, Slackware. Both are minimalist, functional, and allow the user to maintain a lot of control over the system. There isn’t much hidden behind the curtain. Arch Linux, however, throws in a packaging system and more current packages. Getting it set up and running couldn’t be easier. For that, it earns a place in my toolbox.
Stitching Mandolux Wallpapers
November 4th, 2009
I’ve got two 24″ monitors that I use side-by-side in TwinView mode in my home office, so when I look for desktop background images I hit up Mandolux. Mandolux offers free and original wallpaper in a variety of sizes for even the largest displays.
The only wrinkle in all of this is that Mandolux splits the larger widescreen backgrounds into separate left- and right-hand images. However, since I run my display in TwinView mode, my desktop is essentially a single 3840 x 1200 display ( two 1920’s side by side). For the Mandolux wallpapers to display correctly on my background I need to merge the two images into one. I could manually stitch the two images together with an image editing program like GIMP, but since I downloaded a dozen of the background images to try out, doing it manually sounded dauntingly tedious.
That’s when I remembered that the ImageMagick suite of tools includes the ‘montage’ tool. The ImageMagick tools can be installed with the following command under Ubuntu:
sudo apt-get install imagemagick
Then, to stitch the images together I ran the following command:
montage mandolux-ga2k6-*-1920.jpg -tile x1 -geometry +0+0 mandolux-ga2k6-3840.jpg
in a directory containing mandolux-ga2k6-l-1920.jpg and mandolux-ga2k6-r-1920.jpg (left and right side images, respectively). It is also worth noting here that the first filename precedes the second filename alphabetically, so the files are laid out from left to right in that order.
The result is mandolux-ga2k6-3840.jpg, which is a file with both images merged into into one 3840 x 1200 image.
Arcade Gaming with MAME, Part 1
December 15th, 2008
For recreating the video arcade game experience on the PC, MAME (Multiple Arcade Machine Emulator) is the standard. It works by recreating the hardware circuitry of older arcade machines and loading the game software within this emulated environment. Everything from the CPU, video, sound, and RAM chips is emulated. Under MAME, a wide variety of arcade machines are emulated, from the old Williams machines that ran Joust to the newer CPS3 systems that run the Street Fighter III series. Emulation support for new systems is also added from time to time.
While the official release of MAME is built for Windows, various other flavors of MAME are released for a variety of platforms. One such flavor is SDLMAME, which is easy to build in just about any *NIX environment that supports the SDL library. Another feature of SDLMAME is that it follows the official MAME releases closely: updates to MAME are quickly added to SDLMAME.
Read the rest of this entry »
Hands on the G1: First Impressions
December 1st, 2008
I picked up the Android-powered G1 late last week. I like the phone quite a bit. Here’s a list of things about Android that stood out to me this past weekend, both good and bad.
- When you boot up the phone for the first time, it asks you for your Google account login. If you don’t have one, it will make you create a Google account. There is no doubt that this is a Google phone through and through. Oddly, when I entered my password incorrectly, it claimed to have network access problems rather than reporting bad login credentials. I tried to log in about a half dozen times before I realized I was entering the wrong password.
- There are two email clients on the phone: the Gmail client and a secondary email client for POP and IMAP access. The Gmail client is on par with the Gmail client that I had on my Blackberry 8100. However, the POP/IMAP client leaves quite a bit to be desired. Setting up an IMAP account is easy, but there are a couple things missing from the client. For example, while the total number of unread messages for an IMAP account is displayed, the number of unread messages per folder is not.
- I love the notification bar. Incoming emails, SMS text messages, IM messages are all slipped into a notification area at the top part of the screen. When they first appear, a quick preview of the message is also displayed on the bar. With a quick flick of the finger to pull down this bar, I am given one click access to these messages.
- Instead of using a numeric passcode to lock the phone, the G1 features a neat alternative. The “passcode” is a pattern drawn on a 3-by-3 grid. The phone is unlocked by drawing the matching pattern with my finger on the touchscreen.
- By sliding my finger along the desktop, I can switch between three desktop spaces. Shortcuts to commonly used applications can be placed on these desktop spaces. Applications are stored in a drawer that is opened by flicking on a tab upwards from the bottom of the screen.
- For better and worse, contacts are automatically synced from your Gmail contacts list. Gmail had harvested a good number of contacts from my email, so I had to do a good deal of clean up to keep my G1 contact list less cluttered.
- Up to six applications can be run at the same time. However, as far as I can tell, there is no way to explicitly close an application. As you open more, they are closed in a first-open-first-closed fashion. As my girlfriend noted, you can open the browser, switch to another application, then switch back to the browser without having to wait for the URL to load again (as is the case with the iPhone).
- The trackball is pretty useful when in the horizontal, keyboard-flipped out orientation. It helps me navigate through text input fields without moving my fingers up to the touchscreen. Also, keyboard shortcuts. Nuff’ said.
- Frequently accessed settings like enabling/disabiling wifi are buried a few levels deep in a Settings application. Fortunately, the AnyCuts application available in the Android Market makes it possible to place a shortcut to just about anything on the desktop.
All in all, I think the G1 is a good debut for the Android platform. There are a few interface quirks, but as in the case with AnyCuts, the open nature of the platform and the Android Market are already encouraging the development of solutions. I think this is promising and there is a lot of potential for the Android platform.
P.S. Someone please make a BART schedule application before I am forced to foist a half-assed one upon the Android world.
Torrenting Remotely with Transmission
October 4th, 2008
Transmission is now officially my favorite Bittorrent client. It’s small and light on system resources, yet retains many of the features that initially drew me to Azureus. But the feature that I find most useful is that Transmission allows you to control a running instance from the command-line on the terminal. This makes managing my torrents remotely via SSH very easy without the need to either setup a VNC session or installing a web-interface plugin (e.g. Azureus’ HTML WebUI).
Transmission is a suite of four tools:
- transmission: The GTK+/Mac OS X graphical frontend.
- transmissioncli: The command-line interface.
- transmission-daemon: Runs in the background and takes commands from transmission-remote.
- transmission-remote: Command-line tool to send commands to either transmission-daemon or the graphical frontend.
To start torrenting remotely we first need to startup an instance of Transmission. We can do this by entering the following in terminal instance:
transmission-daemon
Typically there will be no response printed to the terminal. We can verify that tranmission-daemon has by entering the following command to get a list of all programs running under your current user account:
ps ux
If you see a line like the following in the results:
ivan 25599 0.1 0.3 60348 7896 ? Ssl Sep30 6:07 transmission-daemon
… you should be ready to use Transmission!
- To start a torrent, enter
transmission-remote --add <path to .torrent file>. - Wait a few seconds and enter
transmission-remote --listto list the status of current torrents handled by transmission-daemon. - To stop a torrent, enter
transmission-remote -t x --stop, where x is the numerical ID of the torrent shown in the left most column of the--listresponse. To restart the torrent, entertransmission-remote -t x --start. - Removing a torrent is similar. Enter
transmission-remote -t x --remove.
As long as transmission-daemon is running, you can log out from your terminal session without affecting the running torrents. They will continue to download and seed even when you are not logged on. When you are finally finish torrenting, issue the following command to terminate transmission-daemon:
killall transmission-daemon
This will terminate all instances of transmission-daemon currenting running under your current user login.

