Thursday, March 31, 2011

Dosbox for the win!


My Mom is almost 100% Ubuntu.  I've given her a couple of computers running Ubuntu over the years, and she's gotten really adept at using it, but she still has one Windows XP desktop hanging around.  And it seems like it's always ailing...

She's been a professional photographer for years, and she has one, ancient MS-DOS program that she uses for tracking all of her small business finances, transactions, and pictures.  It's a classic database called Q&A 4.  Of course, I've showed her newer databases (of which there are many).  But she's been using this program for 20+ years, and has schemas and views that are just that old.  So let's just take it as a given that she's not moving off of that, okay?

That one program is pretty much the only thing holding her to her Windows desktop, which is several years old now, and of course, cluttered and slow and on its death spiral.  So she asked me if there was any way I could get her Q&A running on Ubuntu.  Ooooh, a challenge :-)

I started with Wine, of course, but that promptly blew up with multiple errors.  Googling for those errors, though, turned up a few hits referencing "dosbox", a program already in the Ubuntu archive for running old-school MS-DOS programs.  It seems it's been around and in the archive forever, I've just never stumbled across it, so yeah, I'm out of the loop...
sudo apt-get install dosbox
dosbox QA4.EXE
And wow, she's working like a charm!!!  She's ever so much closer to dumping her last Windows PC :-)

Anyway, toying with dosbox got me thinking about some of those old-school MS-DOS games I played as a kid...Oregon Trail, Scorched Earth, Ultima, Warcraft I, Wolfenstein.  All games that I owned and loved, at some point.

I stumbled on oldschooldos.com where I found a couple of old school games that ran perfectly under dosbox, like this one...


Anyone up for a modem game of WarCraft?  atd...ata :-)

:-Dustin

Wednesday, March 30, 2011

Ubuntu Server Quick Install, No Questions Asked!



priority=critical locale=en_US url=http://bit.ly/uinstall

As you might imagine, I install the Ubuntu Server a lot, so I'm frequently asked about preseeding Ubuntu Server installations.

There are some excellent resources out there.  I have learned much from several Debian sites, as well as from fellow members of the Ubuntu and Debian developer communities.

Most of my daily installations are throwaway KVM virtual machines on my development laptop.  I have answered the same questions in Ubuntu's installer thousands of times...  "Yes, I still speak English, my keyboard is US, please do remove all partitions and yes that partition layout is just fine!"

Of course these questions are preseedable in Ubuntu.  You just need to craft that magic preseed file, but that's necessarily trivial.  In this post, I am sharing just such a layout with you at http://bit.ly/uinstall.

Start with a released or daily development Ubuntu Server ISO, or just use TestDrive, as I always do.  Append the following options to your kernel command line (ESC, then F6 at the boot screen):

priority=critical locale=en_US url=http://bit.ly/uinstall
 And your installation should proceed from start to finish, with no questions asked!

The preseed I've provided at http://bit.ly/uinstall is generally useful, but you may well want to customize it yourself.  A few important notes about the choices I have made in that preseed configuration:
  1. Keyboards and language are US/English
  2. Networking is default DHCP
  3. Target disk is completely repartitioned/reformatted
    • fine for my VMs, might not be so fine for real hardware!
  4. Default username/password is ubuntu/ubuntu
    • again, fine for my VMs with no outside connectivity
  5. Additionally install a couple of essential tools, in case they aren't already there
    • linux-server kernel, openssh-server
  6. Launch Byobu by default at login
You are welcome to point your installations at http://bit.ly/uinstall, if you like.  I'll keep the above documentation up-to-date, and that URL active and functional, as I'm using it all the time!

 Enjoy
:-Dustin

Monday, March 28, 2011

Bikeshed: apply-patch (auto detect strip level and apply the specified patch)

It's been a while since I blogged a Bikeshed post, and I still have plenty of utilities to cover :-)

But this one just made it into Ubuntu Natty (11.04), and my bash history says that I've used it 30+ times already this week...

I think Larry Wall's diff and patch utilities are among the most important programs in all of free software.  These are the most fundamental tools that allow us to modify code, share those modifications with one another in both a human and machine readable format, and apply those changes elsewhere.  It's not uncommon for me to use the two of them more than a hundred times in a work day.

And yet there's two things that bother me about patch...
  1. the -p|--strip parameter should be auto detected, if unspecified
  2. usually, I just want to pass a file in as a parameter using tab-completion, rather than piping it or redirecting it from standard input
So, I'd like to introduce you to the apply-patch utility, which addresses both (1) and (2)!  It takes a patch or a diff file as an argument, and then quietly tries to apply the patch using --dry-run, for -p=0..16, until it finds the correct strip level.  Once it does, it actually applies the patch.

Example:

kirkland@x201:/tmp/foo/patch-2.6$ apply-patch debian/patches/lenny-options 
patching file src/patch.c
patching file patch.man

Useful to anyone besides me?

I'm pretty sure I could hack patch.c and pch.c in the upstream source for patch to do this auto detection of strip level, but I wonder if upstream would take it?


:-Dustin

Monday, March 21, 2011

Texas Linux Fest 2011

 
If you're anywhere around the Austin area on April 2, 2011, I hope you'll join us at the Hilton in downtown Austin for the 2nd annual Texas Linux Fest!  Last year's conference was a resounding success with a tremendous turnout.

I'll be there again this year, where I'm giving a fun and exciting presentation and real-time demo.  Here's the abstract.  Hope to see you there!

Byobu -- a Damn Fine Command Line!


Beginners, novices, and expert Linux users -- if you spend any
appreciable amount of time working in a command line environment,
consider learning Byobu, the text window manager based on GNU Screen.
Establish a single shell session (in a terminal, through SSH, or in a
tty), launch Byobu, create multiple windows, navigate back and forth
between those windows, detach from the session while your programs are
still running, re-attach to the same session later, split your screen
vertically and/or horizontally, monitor the status of 30+ indicators
in real time at the bottom of your screen, and write your own custom
indicators.  These are the basic features of Byobu!  Attend this
tutorial-style session and you'll get started with these introductory
features and quickly move into more advanced configuration and usage
of your damn fine command line.

:-Dustin

SCALE 9x 2011



Okay, I have to get this out there...  What a conference!

This is the most impressive end-user Linux conference I have ever attended.  My highest compliments to the organizers, attendees, and sponsors.  1800 people, just wild about Linux and free software.  I loved it!

I arrived on Thursday night, driving down from Santa Barbara with my colleague Clint, and we both attended the Friday sessions.  Friday was dedicated to a series of themed tracks, with tutorials and other somewhat hands-on sessions.  I spent most of the day in the Cloud track, listening to talks about OpenStack, Chef, and a number of other players in the Cloud space.  I learned a fair amount, and as always, I was quite pleased to see how pervasive the Ubuntu Server continues to be in the Cloud.  Few sessions, if any, failed to mention their use of Ubuntu in one form or another.  Our pulse continues to be quite strong in the cloud!

The meat of the conference took place over the weekend.  Unfortunately, I was only able to attend Saturday, as I flew out of LAX for London and then Cape Town, South Africa late Saturday evening (more on those trips in my personal blog) soon.

The first keynote was really, really interesting!  Leigh Honeywell talked about "Hackerspaces", a term with which I was only vaguely familiar.  During the Jaunty Distro Sprint in Berlin, we visited one of the more famous Hackerspaces in the world, C-Base.  I just thought it was a cool place to drink beer and hack in a warehouse decorated like a space station :-)  I didn't understand that this space was one of hundreds, covering most major cities on the globe.  Leigh talked about dozens of different hackerspaces, why they exist, what they're used for, how they're governed, and so on.  It has inspired me to check out the local Austin hackerspace sometime soon...

Remarkably, in Leigh's keynote, she mentioned my presentation on Byobu, Screen for Human Beings during her talk.  I certainly appreciated her unsolicited advertisement!  I don't know if it was related or not, but my talk was just after her keynote and was absolutely standing room only.  I counted 120 people before I started (and more trickled in during the talk).

A video of my talk should be available somewhere (?), though I haven't found it yet.  I really enjoyed the presentation.  It was basically 10 minutes of slides, and then 50 minutes of demonstration.  The audience was quite interactive, asking some great questions about GNU Screen and Byobu.  I'm giving a similar talk at the Texas Linux Fest in Austin in April, so if you missed the SCALE version, join us in Austin for an encore.

And if you're on the west coast and haven't been to SCALE, you really must get out there and see this conference.  I'm really impressed and hope to return again in the future.

Cheers,
:-Dustin