David Sterry's Blog


Sunday, April 26, 2009

HOWTO: Run a gNewSense Virtual Machine in seamless mode using VirtualBox OSE

In this HOWTO I'm going to take you through running gNewSense, a 100% free operating system, on top of your currently installed operating system. This HOWTO mentions how to run gNewSense on top of Ubuntu and Windows though it's possible to run it on any OS that runs VirtualBox OSE. This HOWTO will only add 100% free-as-in-speech software to your computer because I believe free software provides the best way to run your computer.

A rough overview of the process is:

1. Download and install VirtualBox OSE.

2. Download gNewSense.

3. Install gNewSense inside a VirtualBox Virtual Machine

4. Set it to run in seamless mode.

And now for the full HOWTO:

1. Ubuntu users: To download and install VirtualBox OSE, Ubuntu users can start Synaptic with System -> Administration -> Synaptic Package Manager.

2. Then search for the virtualbox-ose package, mark it for installation, and click Apply at the top.

- or -

1. Windows users: Download the VBox Open Source Edition that has been compiled for Windows at:

http://sourceforge.net/projects/vboxwin32/

2. Run the VBoxSetup-____.exe to install.

--------------------

3. Download the latest gNewSense ISO file from:

http://www.gnewsense.org/Download

You can also use FUSBi( http://aligunduz.org/FUSBi/ ) to download and make a bootable USB drive so you're ready to boot or install gNewSense whenever necessary. For the rest of this HOWTO, I'm assuming you have the ISO downloaded to your desktop.

4. Create a new Virtual Machine in VirtualBox in which to install gNewSense:

a. Start VirtualBox and click New.
b. Click Next and type gNewSense in for the name.
c. For the Operating System choose Linux and for Version choose Ubuntu then click Next.
d. You can accept the recommended base memory or increase it depending how much RAM you have in your machine. Click Next.(I have 2gb of RAM in this laptop and like to give at least 512mb of RAM to the Virtual Machine. I wouldn't put much less than 256mb.)
e. Now to create a virtual hard disk, click New, then Next.
f. Leave Dynamically expanding storage selected and click Next. This makes a file that will grow in size only as needed up to the maximum you select on the next screen.
g. You can leave the default location and default size and click Next and Finish, then Next and Finish again. Now you'll have a new Virtual Machine that's almost ready to boot.

5. Set the new virtual machine to boot from the iso you downloaded:

a. With your new virtual machine selected in VirtualBox, click CD/DVD-ROM.
b. Check Mount CD/DVD drive and the ISO Image File option.
c. Click the folder in the ISO Image File option to add an iso to Virtual Box's library.
d. Click Add and navigate to your desktop to select the gNewSense .iso file you downloaded and click Open.
e. Click Select and Ok to finish getting the ISO ready. Now we're ready to boot and install gNewSense.

6. Install gNewSense by clicking Start on your virtual machine and then follow the directions here: http://wiki.gnewsense.org/Documentation/InstallingGNewSense#Installation_Walkthrough At this point you should have gNewSense running and be able to login to it.

7. Now in the Virtual Machine's window click Devices -> Install Guest Additions. This will mount a virtual cd in gNewSense which will popup.

8. Inside gNewSense, click Accessories -> Terminal and run:

sudo /media/cdrom/VBoxLinuxAdditions-x86.run

9. Restart gNewSense and login. When your desktop comes up you can press your right Ctrl key with the L key to enable seamless mode or select Seamless mode from the Machine menu.

So there we have it. In seamless mode, you will be able to use all the applications inside gNewSense on the same screen as your host operating system's programs. If you value software freedom you'll try to run as many things provided by gNewSense as possible and to replace your host operating system with gNewSense as soon as possible. Do not lose sight of the goal of running gNewSense and free software exclusively on your computer.

Tuesday, February 17, 2009

Podcast Subscriber Tracking with Perl

If you have a podcast, you probably provide an RSS or XML file for people to subscribe to. If you're interested in tracking how many people are subscribing to your feed and you're running Apache, I've just developed a simple script that counts repeat downloaders of the feed. I look for .rss in the URL but you can easily change that to .xml or whatever matches your feed.

You can download the script at http://trygnulinux.com/rsspodtrack

Thanks and leave any questions or suggestions in the comments.

Tuesday, January 27, 2009

Verizon EVDO Aircard Speed Testing

In the quest for mobility and to be a more useful computer guy, I signed up for Verizon's BroadbandAccess program. I got a USB EVDO modem that I've got running in either of two laptops. One of which runs Windows XP and the other that runs Ubuntu 8.10 Intrepid Ibex.

Before I went ahead and signed up, I went looking for data on the speeds I could expect from either Verizon or AT&T. I didn't find much for the local area but one forum post did mention >1 megabit download speeds very near me using Verizon.

Now that I have the service, I decided to start testing and map my results. The product is here in the form of a Google Map. At each test point, I ran Speakeasy's Speedtest (http://speakeasy.net/speedtest) and recorded the download and upload speed. The markers are color coded for download speed only with Green > 1 Mbit, Yellow > 0.3 Mbit and Red < .3Mbit. If you click on a marker you'll see the download speed in kbps in the title and the upload speed in kbps below that. All testing was done in Windows XP.


View Larger Map

Overall, I'm very pleased with the service but I would like to see something similar done with AT&T's 3G in the same area.

Sunday, January 11, 2009

Fixed: Remote SSH Command Failing

One great way to use SSH is to run a single command on a remote server like this:
ssh user@host command

'command' here can be anything and the text output will be piped back to your local terminal.

I was having a problem with a few servers where this wasn't working. Turns out the problem was this line in my user's .bashrc
[ -z "$PS1" ] && exit 0

In this case, the -z tests "$PS1" (the prompt string) for null. Since the prompt was null, .bashrc exited on me. After removing that line, all was fine. If you know a better way to work around this or some very important reason the -z line should stay, feel free to leave a comment.

Saturday, November 29, 2008

HOWTO: GIF Animations with The GIMP

Today, we went out to Union Square in San Francisco and armed with my camera and a distant memory of rotating Egyptian pyramids, I decided I would try to put together a GIF animation of the Christmas Tree. What I did then was to take about 15 pictures each from 2 feet apart moving around the big Christmas Tree. This is the result:



HOWTO: Creating GIF Animations with The GIMP

1. First take your set of pictures or get them all in one folder.

2. Open up The GIMP, go to File, Open as Layers...

3. Select your set of photos by clicking the first one then holding down the shift key and clicking the last one and click Open. The GIMP will start importing your files in order as seperate layers of the image.

4. Resize your image by choosing Image, Scale Image from the menu and choose a reasonable size. For the web, I max the width out at 800 and the height at 600. The GIMP will be default link the height and width of the image so it'll still look right. Click Ok to do apply the resize.

5. The last step is to export the image as a GIF. Choose Save as... from the File menu. In the Save Image dialog box, near the Save button a dropdown field says All Image. Change that to "GIF image (*.gif)" and click Save.

6. Next choose "Save as animation" and click Export.

7. You can leave the options in the next window as their defaults or you can change the speed of animation.

Voila! You now have a GIF animation combining all your images together. If some of the images are out of order, you can go back and reorder the layers of the image and redo the export.

If you create a GIF animation by following this HOWTO, please add a comment below linking to your GIF animation. If you need ideas, try a stop motion animation of a Christmas Garden Gnome or take pictures of yourself from different angles or on different days.

Finally if you have any questions, feel free to ask.

Thursday, September 04, 2008

An Improvement to OpenSSH

If you need to work on a remote *nix server, you have undoubtedly used OpenSSH. The way it helps securely control remote machines makes it one of a handful of essential sysadmin tools. But this great tool does have a flaw and no I'm not talking about a buffer overflow or memory leak. The problem arises when connecting to a server for the first time. For example, we've all seen this:

The authenticity of host 'server.example.com (192.168.429.21)' can't be established.
RSA key fingerprint is 98:2e:d7:e0:de:9f:ac:67:28:c2:a2:2d:37:16:58:4d.
Are you sure you want to continue connecting (yes/no)?



With this string of hexadecimal characters, one is expected to verify the remote host's identity. It is suggested to use some out-of-band method like carrying around the fingerprint on a card or checking the key after login, but I think there's a better way.

Simply, add a dictionary of 65,536 (2^16) English words to OpenSSH. Then when it comes time to print out that nasty hex key, OpenSSH can map each string of 4 hex characters (16-bits total) to a single English word. In this way, we'll see the hex string and a second, more-readable English string:

98:2e:d7:e0:de:9f:ac:67:28:c2:a2:2d:37:16:58:4d

election accelerate import snag wrecking unsuitable defeating conceal developing educates substitute bridge enables originator cat forecast


If the dictionary and mapping are standard, then no matter what machine you connect from you'll see the same set of English words when connecting to the remote host. I think it's a nice little trick that makes RSA key fingerprints easier to read and remember. Such a simple tweak could make us all a little more secure. What do you think?

Monday, August 25, 2008

Ubuntu Hardy Terminal Services Client Problem

Generally, I like to write about things that work on my blog but I've seen how just asking a question can sometimes bring a solution together. So here's my current problem:

I am attempting to connect to a Windows 2003 Server via the Ubuntu Hardy Heron default Terminal Services Client and when I click connect the window just goes away. I've tried again and then that window goes away again. About 2-5 minutes later an error window will popup giving some sort of error. The last error message I got complained about talking to the sound card in some way.

I tried again by disabling the sounds in the client before trying to connect but it didn't help. If you've experienced this problem please post a comment whether you've found a solution or not. I'd like to help raise the profile of bugs like this that get in the way of living in Ubuntu full time. Thanks.

Saturday, August 16, 2008

Home Audio Streaming with Rhythmbox

Ever since I ripped my music collection to MP3 format and began collecting MP3s online, I've been struggling with managing and listening to all this music. In the past I've used WinAmp and iTunes on Windows XP to manage music locally. I've used Edna(a python script) to serve the music using its built in web server. Finally, I've copied this 30GB library a few times only to delete parts of it as I need the space on various machines.

Each of those setups feels like a kludge compared to my current Rhythmbox setup. I'm running Ubuntu and Windows XP on my computers at home and have found using Rhythmbox to store and serve my music has been the best experience so far.

To share music, start Rhythmbox on the computer that's storing it all. Go to Edit -> Plugins and check the box next to DAAP Music Sharing. Then click Configure on the right and check the box next to "Share my music".

Then if you want to listen to the music on any other computer, start Rhythmbox and go to File -> Connect to DAAP share and enter the name of your music server. Right away it'll pull down a list of files and you can begin searching, playing, and queuing up songs right away.

One tweak I'd recommend is on your server to have Rhythmbox watch your music folders. This helps when you have a program like bashpodder downloading your podcasts for you on a daily basis. Go to Edit -> Preferences and the Music tab and check the box to "Watch my library for new files".

If you use iTunes, stop. If you can't stop using iTunes, you'll be pleased that it'll auto-detect these DAAP shares so you can play it all from machines upon which you don't have Rhythmbox.

In theory you could even share this music to your computer wherever you are by opening a port on your router and using dyndns but I've not tried this. I would suggest setting a password on the DAAP share if you do.

One thing I might like to do is to connect remotely via ssh for increased security. If you have any ideas on that, please leave a comment. Also if you know of other free software audio clients that connect to DAAP shares I'd like to hear about those as well so people on Windows or OS X can enjoy more freedom in their software. Above all, enjoy your audio where you want, when you want!

Sunday, June 01, 2008

Jailbreak good. iPhone freshly rocked.

This had to be by design. Jobs must love hackers. I am positive Steve Jobs wanted the iPhone to be the kind of awesome only an underground elite squad of coders could program it to be. How else could the iPhone be so much better jailbroken?

I guess what I'm trying to say is: I jailbroke my iPhone. I've been using it stock for a good three months waiting for legal apps to come out but enough is enough. The last straw was when I saw a video on YouTube of someone playing guitar on their iPhone.

Jailbreaking was free and easy to do. I just downloaded Ziphone, synced my iPhone to make a solid backup of my contacts, then clicked Jailbreak. After a few minutes, it was done and my iPhone was free.

Before this, I had always wondered how people downloaded applications to a jailbroken iPhone. Well, after jailbreaking(at least the way I did it) a new icon shows up on your home screen called Installer. Tap that and you're greeted with a plethora of programs. Things like Tap Tap Revolution, Drummer, vt100-term(a sold ssh client), and VNotes.

I've found myself playing Drummer far more than I ever would have imagined(plugged into car stereo? fuggedaboutit). Also VNotes has been quite handy for recording voice memos. Finally Sketches allows me to draw notes with my finger and annotate pictures.

It's impressive just how much this device can do sans the shackles of Apple's digital software jail. The wifi, the accelerometers, the camera, the multi-touch high-resolution screen, and the 16GB of flash memory can be just frickin' rocked past all those places where rocking can rock a conventional phone. Nice job jailbreakers and iPhone app developers. I really do need to donate some dough.

In closing: Jailbreaking good. If you don't have an iPhone, get one somehow and jailbreak it. That is all.

Saturday, May 10, 2008

Super WHY! Theme Song Lyrics

I looked all around the internet(Google) for lyrics to this song that I'm hearing about 100 times a day and couldn't find it. So I typed 'em out. Enjoy.

Super WHY! Theme Song Lyrics - PBS

Who's got the power
The power to read
Who answers the call for friends in need?

Super WHY!
Super WHY!
He's the guy, he's Super WHY!

Who's got the power
The power to read
Who looks into books for the answers we need?

Super WHY!
Super WHY!
and the Super Readers, we're gonna fly

Come along!
With the Super Readers
Adventure waits when you're with Super WHY!

Super WHY and the Super Readers yeah
Super WHY and the Super Readers

Adventure waits when you're with Super WHY!
Yeah Super WHY!