Archive for February, 2009

100 Pushups

Monday, February 23rd, 2009

I started the 100 Pushups Challenge last year and made it to week 5 (out of 6). Then I came down with a cold, stopped “temporarily”, and just never got back into the groove.

Now, I’m starting up again, from the beginning. I’ll track my progress here.

Starting a New X Server

Sunday, February 22nd, 2009

This is one of those posts that is mostly for me, so the next time I need to do this I don’t have to spend 30 minutes googling obscure config file formats. (Incidentally, I had to google and muck with styles for at least 30 minutes to figure out how to keep wordpress from mangling my code snippets.)

I sometimes find it useful to start an extra X server to run a particular application. Full-screen games are a good example. Ordinarily, a full-screen game grabs the display and there is no way to switch back to the desktop without exiting the game completely. When run in its own X server though, it is easy to switch between servers. The following shell script shows how to do this:



if ! xauth list "$display" | grep "$display " >/dev/null 2>&1; then
    xauth add $display . `mcookie`

xinit /usr/bin/xterm -- $display -auth $authfile -nolisten tcp

if [ -n "$removelist" ] ; then
    xauth remove $removelist

This script will start a new X server on the next available virtual terminal (normally vt8) using display :1 and launch an xterm. Toggle between the servers using ctrl-alt-F7 and ctrl-alt-F8. When the xterm exits, so does the X server.

If you try to run this code on a Debian-based system, though, you will get the following error:

X: user not authorized to run the X server, aborting.
xinit:  Server error.

I found this out the hard way when I started using ubuntu. This is because Debian uses a wrapper to start the X server, which enforces tighter security constraints by default. To get this to work, you will need to edit the /etc/X11/Xwrapper.config file, and change this line:


to this:


Check the man page for Xwrapper.config for more options; there aren’t very many. Personally, I don’t consider this a security risk for a single-user home system.

About Me

Monday, February 16th, 2009

My name is Jason Day. I am a programmer in Atlanta, GA. My first real programming experience was at a computer programming day camp at the local community college, in around 1980. We learned to program in BASIC on an Apple ][, and I was hooked. I couldn’t afford a computer, but I did have an Atari 2600, and there was a BASIC Programming cartridge available. What a cruel joke that was. It did keep me somewhat entertained though until I was able to acquire an Atari 600XL, which is what I really cut my programming teeth on. I didn’t have a disk drive or even a cassette drive; I had to enter everything by hand, every time. With a little help from Compute! magazine, I would spend hours typing in BASIC programs for silly games and playing them.

I continued my programming education in college, this time on a 386SX 25 Mhz IBM compatible, with a whopping 2 megabytes of RAM and a 52 MB hard drive. I taught myself x86 assembly language, to enhance the DOS batch “programming language”. I took courses in FORTRAN and Pascal, then C, C++, LISP and MIPS assembly language.

My first “real job” out of college was at a media company called iXL (now defunct). I started as a junior C/C++ developer, helping to port a game to Windows 95. While there I taught myself Java and Perl, eventually writing primarily back-end code in servlets and JSPs.

These days I do most of my programming in Java. But I’ve never lost the thirst to learn new languages, or about programming in general. I also make some code available on my web site.

Copyright © 2017 All Rights Reserved.
No computers were harmed in the 0.444 seconds it took to produce this page.

Designed/Developed by Lloyd Armbrust & hot, fresh, coffee.