Wednesday, February 28, 2007

SystemImager Success!!!

With the help of Andrea on the SystemImager mailing list and my friend David, I've finally emerged on the other side of the tunnel. I've gotten SystemImager installed and working!

About fifteen minutes after I was supposed to have gone home I was waiting for my test imaging process to finish, expecting only to copy down the new error message to look into it tomorrow, when--Lo and Behold!--I was greeted by the smiling, shiny face of an Ubuntu log-in screen.

I heard an angelic choir and everything.

The last piece of the puzzle was going back and adding PREFIX=/usr during the SystemConfigurator installation.

Documentation will be forthcoming, I can assure you!

We don't depend on Norton Ghost for imaging any longer. One of the most crucial pieces of the puzzle is now in place.

Now begins the real work of figuring out how to leverage SystemImager most effectively into our system.

Wish me luck!

I just submitted my last-minute entry to the Win Loyd Case's Old PC! contest. It involves sending him a 500-word essay on "Why I deserve to win your old PC".

It can happen.

Wish me luck!

Tuesday, February 27, 2007

iTALC and SystemImager progress - Ubuntu Indiana LoCo Team???


I've made contact with Tobias, iTALC's developer and maintainer and, with his help, I've been able to address some of my earlier concerns. He's fixed a bug or two as well that I brought his attention to, and I'm hopeful that we'll have everything working soon.

This is what I love about Open Source:

  • "I'm having X problem with this program."
  • "Oh, that was a bug, it's fixed now."


I gave SystemImager another try now that I've got the latest version compiled (Actually, they just went and released a new stable version, 3.8.0) and I've gotten much further along the process. I'm communing with the mailing list to see what I'm screwing up, and I see light at the end of the tunnel!

Ubuntu Indiana LoCo Team?

The Ubuntu USTeams Project has made it its goal to have an approved LoCo team for every U.S. state by 2008. I've been sitting back and watching, and hoping, and waiting for someone else to step up and start an IndianaTeam, since I think there should be one, but nothing yet has happened.

I'm now looking through the documentation and considering doing it myself. If you're in Indiana and would be interested in an Ubuntu Indiana LoCo Team, let me know in the comments, or in email.

powered by performancing firefox

Tuesday, February 20, 2007

HOWTO Install iTALC from source on Ubuntu Edgy - WITH CAVEATS


First of all, I haven't gotten all of the functionality to work yet.

Hopefully, when a final stable 1.0 comes out, italc-master and italc-client 1.0 will just be two more packages in the Ubuntu repositories...

X.Org Module: record

We need to add a module to /etc/X11/xorg.conf, so we'll need to superuser edit it ($ sudo gedit /etc/X11/xorg.conf), find the Section "Module" section and add the following line before the line that says EndSection:

Load "record"


Let's first make sure we have all the dependencies installed. This may take a while...

$ sudo apt-get install build-essential libqt4-dev qt4-dev-tools libjpeg62-dev zlib1g-dev libssl-dev libxtst-dev

Source Tarball

We now need to get the source tarball at the iTALC website. (Go to "Download", select the link under "Source code", and select the file ending in .tar.bz2, in my case, italc-

When you've got the tarball downloaded, you'll need to extract it to its own folder. (Right-click and "Extract Here" works well.)

Install iTALC

Now we'll compile the source code.

Drop to a terminal, navigate to iTALC's new directory (for me, $ cd ~/italc- and run the following commands:

$ ./configure --prefix=/usr
$ make
$ sudo make install

Voila! iTALC is installed!

You're not done, yet...

Set the iTALC Client Application to run on login

This is necessary for both the teacher and student workstations.

You'll need to superuser edit /etc/gdm/Init/Default and /etc/gdm/PreSession/Default ($ sudo gedit /etc/gdm/Init/Default /etc/gdm/PreSession/Default) and add the following at the very top of both of them (just below the introductory block of comments):

killall ica
/usr/bin/ica &

The first command kill any previous ica session that's running before the second command starts a new one up. This allows iTALC to interact with the clients during the login screen as well as after the user logs in, without calling up multiple instances of the client application.

Set up authentication keys

This will allow iTALC to talk to its clients in a secure manner.

The command to create the keys is: $ sudo ica -role teacher -createkeypair

After running this command, you will have a pair of keys in your newly created /etc/italc/keys directory.

  • /etc/italc/keys/private should be readable only to the accounts that should have access to run italc, and should only exist on the computers that will be used to run iTALC. Here that would be the "teacher" and "administrator" accounts on the teachers' workstations. See below for details on accomplishing this.
  • /etc/italc/keys/public should be readable to all, which it is by default, and should exist on every workstation.

One way to make the /etc/italc/keys/private directory readable to only the necessary accounts is as follows:

$ sudo addgroup italc
$ sudo adduser teacher italc
$ sudo adduser administrator italc
$ sudo chgrp -R italc /etc/italc/keys/private
$ sudo chmod -R o-rwx /etc/italc/keys/private

Test it locally

Let's run a quick test just to make sure everything's working ok. We're going to set up iTALC with our own local computer as a client.

iTALC needs to have the Client Application running, and a pair of keys set up in order to launch. If you've been following closely, this should already be done.

Run $ italc to bring up the teacher's iTALC interface.

Now, in the Client-Manager tab on the left, right-click in the list and "Add classroom", then "Add client":

  • Name is only relevant to this iTALC interface and is how iTALC will refer to this particular client. It doesn't have to be, however I've just been using the client's hostname since the hostname we use is indicative of the classroom and workstation.
  • IP/hostname is just that, either the client's IP address (only really useful if you're not using DHCP) or hostname (it's important that you have name resolution set up correctly to be able to find the if you're using hostname; we use WINS).
  • MAC address is important for being able to remotely turn the workstations on (You can find this information by running $ ifconfig and looking for the string labeled "HWaddr", it should look something like 12:34:56:78:90:AB).

Now you should see a thumbnail of your own screen inside of the iTALC interface. Yay, recursion!

BE CAREFUL! If you spend too much time staring at the recursive effects of iTALC on itself, you might end up going a little loopy:

Screenshot of iTALC - for HOWTO

Play around with the interface a bit to get a feel for it, it's pretty intuitive.

Broken Functionality

I've yet to get the following functionality working quite right:

  • The Login button does nothing. (Apparently it works for Windows clients, though)
  • If the student account is forced to logout through iTALC, logging back in freezes the X server.

It's a pretty good product otherwise, and now that most of the functionality is working, I am looking forward to deploying it.

SystemImager HOWTO - Oh, Yeah!

After my first attempt at compiling SystemImager on my golden clients, it didn't work!

I remembered the one step that I didn't include in the HOWTO I just posted a couple days ago. It's not quite intuitive, see, so I don't feel bad about about having forgotten it.

For some reason, the linux-headers package in Ubuntu (at least version I got when I was writing the HOWTO, linux-headers-2.6.17-11-generic is missing a couple of key files. Did I forget that linux-headers-generic is necessary for the build process??? Drats!

Don't worry, though, it's easily solved:

$ sudo apt-get install linux-headers-generic

$ sudo cp /usr/src/linux-headers-2.6.17-11-generic/include/linux/compiler.h /usr/include/linux

$ sudo cp /usr/src/linux-headers-2.6.17-11-generic/include/asm/unaligned.h /usr/include/asm

It should work after that...


I've already updated the original post, so it should be fine now.

powered by performancing firefox

Friday, February 16, 2007

HOWTO Install SystemImager from source on Ubuntu Edgy

Further Reading:

Since I wrote this post, I've written a few more than are related:

We now return you to your regularly scheduled post!

First, we'll need to set Ubuntu's /bin/sh to bash instead of dash.

I don't know why...well, besides the fact that not doing it will bugger up the compilation process.

$ sudo ln -sf bash /bin/sh


Next, we need to install the dependencies:

$ sudo apt-get install build-essential linux-headers-generic libappconfig-perl cramfsprogs e2fslibs-dev ncurses-dev libreadline5-dev rsync python-dev libtool gettext zlib1g-dev libssl-dev libxml-simple-perl perl-tk uuid-dev flex bzip2 syslinux libdevmapper-dev mtools

We also need to copy a couple of files, because as of the time of this writing, linux-headers-generic is missing a couple of files (linux-headers-2.6.17-11-generic If this post is relatively old, you might just check first to make sure that /usr/include/linux/compiler.h and /usr/include/asm/unaligned.h exist on your system. If they don't, you can just (mind the emphasized directory, make sure that's the correct one for you):

$ sudo apt-get install linux-headers-generic
$ sudo cp /usr/src/linux-headers-2.6.17-11-generic/include/linux/compiler.h /usr/include/linux
$ sudo cp /usr/src/linux-headers-2.6.17-11-generic/include/asm/unaligned.h /usr/include/asm

Source tarballs - System Configurator SystemImager

Then we get the source code tarballs for systemimager and system configurator (a systemimager dependency that we'll also need to build from source in order to have a compatible version):

After they're downloaded, extract them (right-click and "Extract Here" works fine) into their own folders

Install SystemConfigurator

We need to install SystemConfigurator first, this is pretty quick since it's just perl. Navigate to the directory that you extracted it (on my system, I just $ cd ~/systemconfigurator-2.2.2), and run the following:

$ perl Makefile.PL PREFIX=/usr
$ make
$ make test #This should say "All tests succesful" right before finishing#
$ sudo make install

Install SystemImager

This is what takes a little while. Again, navigate to the directory that you extracted the source tarball (again, on my system $ cd ~/systemimager-3.7.6) and run the following:

$ ./configure

$ sudo make

$ sudo make install_server_all #If you're on the Server#

$ sudo make install_client_all #If you're on the Client#

Assuming you don't get dropped out of one of the above commands by an Error, you should now have SystemImager installed!

EDIT:By the way

You can now delete the source tarballs, and the directories they created.


I got the base beginning point for this HOWTO from a page on the SystemImager wiki, and I got lots of help beyond that from the SystemImager mailing list, and my friend David Ernst.

Thanks a lot, guys!

Compilation Successes!

So, yesterday I was finally able to succesfully compile both SystemImager and iTALC.

Here's a snapshot of iTALC, from iTALC:



SystemImager is all command-line stuff, so it's not all too exciting visually...

Now I need to write these into my Image Definition, and see what I can do about replacing our use of Norton Ghost with SystemImager.

Apparently it took me this long to compile SystemImager because the last time I gave it a go, I made a typo! Oh well. You live, you learn.

HOWTOs forthcoming.

powered by performancing firefox

Thursday, February 15, 2007

lpadmin headaches

I was trying to figure out how to install a printer via command-line in Ubuntu, so as to install them during the auto-configuration process after re-imaging a workstation.

After beating my head against lpadmin's man page, and trying everything I can to get the -m switch to pick up the right model printer, I've decided to give up on going that route.

Instead I'll just have the printer installed to begin with (We only have one model printer in four of the classrooms), and have the autoconfiguration script either set the IP address on it correctly, or remove it entirely (in classrooms without printers).


Since I couldn't get the italc .deb package that Niko pointed me to to install correctly over unsatisfiable dependencies (I guess there's enough of a difference between Debian and Ubuntu to make this a problem), I'm going to go ahead and give compiling it a shot, as Kevin Mark suggested in a comment on this blog that it should be easy.

We'll see. Wish me luck!

powered by performancing firefox

Friday, February 09, 2007

Refresh default settings on reboot!

All of our students are using a generic "student" account to access their Ubuntu workstations. This isn't a long-term solution; I am planning to get them to authenticate against our corporate directory (an Active Directory server) when I figure it out. In the meantime, however, there are a few issues involved with everyone sharing a generic user account that are kind of annoying.

The vast majority of the time when I get called into a classroom for help it's because some student has modified their desktop to the point that another user can't use it. They've unmounted the locker drive, or they've removed the taskbar, or something like that. Now, this doesn't really happen all that often, the kids are surprisingly responsible about not modifying the desktop to the point where their peers won't be able to use it.

But it does happen, and I've been asked to keep it from happening.

I've decided the best way to do it is to simply have all the default user settings refresh on reboot so if someone DOES make too much of a change, the next student can simply reset the computer and have a fresh Desktop to work with.

At first I thought that removing the /home/student directory and replacing it with an archived copy would be the way to go. However, I'd like to keep from deleting the students' work on reboot (in case, for example, the reason they need to reboot is because they can't get to their locker to save their work).

After some experimenting, and a bit of communion with my local Linux Users' Group via our mailing list, I've settled on a simple way of accomplishing the goal.

First, I've made an exact copy of the default /home/student at /home/student.fresh (sudo cp -a /home/student /home/student.fresh).

Then I've set it up to remove just the settings files from the student account, and replace them with the originals by editing /etc/rc.local and adding these lines in before the exit 0 line:

# These lines replace all the settings for the student account with a fresh copy of the defaults
find /home/student -maxdepth 1 -iname '.?*' -exec rm -rf '{}' \;
find /home/student.fresh -maxdepth 1 -iname '.?*' -exec cp -prf '{}' /home/student \;

It's that simple!


Anytime after this that the student's default settings need to be changed, it be a matter of logging in as student, making the changes, logging back in as administrator so you can sudo rm -rf /home/student.fresh and sudo cp -a /home/student /home/student.fresh again before you restart the computer.

powered by performancing firefox

Thursday, February 08, 2007

MAC address gathering fun!

#! /bin/bash
# MAC address collection script

MAC=`ifconfig | grep HWaddr | awk -F 'HWaddr ' '{ print $2 }'`

echo "$HOSTNAME,$MAC,$*" | ssh administrator@ 'cat >> macaddresses.csv'

EDIT:Oops, I didn't add line breaks at first!

Problem: You need to get a list of MAC addresses for a bunch of computers. You can't remotely connect to them because their WINS service is not properly set up to allow you to connect to them by hostname and their IP addresses are assigned randomly by DHCP. A lot of them actually share a hostname because spending the time to name them properly didn't seem to be a useful way to spend an hour when the WINS service isn't working anyhow.

This will unfortunately involve some leg-work. You know how to look up the MAC address at each station, but you don't want to have to write out every MAC address by hand and then type it back in later. (You're lazy, what can you say?)

Solution:The above script! Keep it in /var/www (apache2's web root directory on Ubuntu) of your server, make sure to use YOUR server's ip address. Then you can just:

  1. Log in to a station.
  2. Bring up a terminal.
  3. $ wget
  4. $ bash macgather identifying comment here (wget'ting a file removes execution privileges, pointing bash at the script is faster than chmod'ing and running it. If the station's hostname is unique and helpful in identifying it, you don't really need to add the identifying comment.)
  5. Answer a couple of prompts ("yes" you really do want to connect to the server, and enter the server's "administrator" account password).
  6. Log out.
  7. Lather, rinse, and repeat on every workstation you need.

After you've had a nice tour of where all the stations are (several classrooms in my case) and ran the script on each computer, you'll have a nice comma-delimited file that you can manipulate in just about any spreadsheet program you got. It'll have three columns: the first will be the stations' hostname, the second will be the stations' MAC address, and the third will be the identifying comment you supplied (if any) at that station.

Yeah, I know...

This will likely not be useful to anyone but me, but I spent a while figuring out just the right commands to do this--with the help of my local linux user group's mailing list--so I'm recording it for posterity.

powered by performancing firefox

Monday, February 05, 2007

Angels DO exist!

Niko, from Finland, has offered to create those .deb packages I needed. Hooray! This could free me up from spending so much time figuring out how to compile stuff so I can concentrate on USING the software. Nice!

He pointed out that .deb packages italc for are already available in Debian experimental at : and

When trying to install italc-client, though, I get an error: "Error: Dependency is not satisfiable: libqt4-core". I tried installing libqt4-core to satisfy the error, but to no avail; the version in the Ubuntu repositories is too old, I supposed. I looked at the information page for the italc-client package, however, and it lists "libqt4-core ( 4.2.1) \ Package not available" as a dependency.

I'm confused, and the feeling of hope I had when I read that the packages were available has flagged.

Can I use these Debian experimental packages under Ubuntu? How?

Is there some way I could temporarily activate some Debian repository, so that I might be able to satisfy these dependencies?

I'm sorry if the answer is obvious.

Image Definition

In other news, I've prettied up my image definition page and moved it to Maybe this would be useful to someone else trying to use Ubuntu in their school. I'm hoping to add to it as I figure things out.

Free Software Diffusion

I've always told people that if they wanted a copy of any of the Free Software available on our Indiana ACCESS workstations that they should bring me a CD-R and I'd burn them off a copy. Noone has really taken me up on it, so I've decided it's time to do some active advertising to educate our school's community on the Free Software alternatives that exist.

To that end, I'm trying to put together a well-publicized avenue for people to have free software available to them. Specifically I've decided to make Software for Starving Students CDs and Ubuntu CDs available to the school population (well, to make the service of burning these CDs available, we can't really give away CDs).

I've put together a statement at that I plan to advertise through our school's front page, on our staff and parent mailing lists, and on posters in various key places around the school (e.g. every computer lab).

Any comments on this idea, or the statement I linked above, would be appreciated, especially from people who have experience trying to do this sort of Free Software advocacy in a school environment.

Well, I should have left twenty minutes ago...Goodbye!

powered by performancing firefox