Skip to main content

Kill zem all!

Wow! Every good linux user knows about the kill command. You use it all the time to kill off out of control or dead processes.

kill 1234
will kill off the process with pid 1234. But did you know that
kill -TERM -1234
will kill off all processes in 1234's process group? I didn't until just a few minutes ago! Super-handy!

Disowning your children (in bash/zsh)

You learn something new every day! Today I learned about the disown builtin in bash and zsh. When you disown a job, it will no longer receive a HUP signal when you exit your shell.

catlee@sherwood:~ [1015]% while true; do date >> date.log; sleep 10; done&

[1] 7380

So now you've got the current date being appended to date.log every 10 seconds. Try exiting your shell:

catlee@sherwood:~ [1016%1]% exit

zsh: you have running jobs.

But use the disown command:

catlee@sherwood:~ [1017%1]% disown %1

catlee@sherwood:~ [1018]% exit

and your shell exits without complaining. Meanwhile, your job keeps running in the background!

Ahhhhhh...Breathing room!

At least that's the way it feels! I just realized that my laptop supports 1600x1200 resolution! And I've been running it at 1024x768 all this time! So after fighting with the fglrx drivers for Debian, I can finally surf the web and read e-mails without having to scroll left and right all the time! Setting up fglrx was less than painless to put it mildly. For future reference, I had to do something like this:

aptitude install fglrx-kernel-src

cd /usr/src

tar jxf fglrx.tar.bz2

cd modules/fglrx

export KVERS=2.6.16-1-686

export KSRC=/usr/src/linux-headers-${KVERS}

debian/rules binary_modules

I would have hoped that m-a a-i fglrx would have worked, but alas... Oh, and other thing. ATI: it isn't cool to lock up the machine just because your driver doesn't support 16 bit colour. I had set my default colour depth to 16bpp previously in an effort to get higher resolution with the radeon driver, but when I started using the fglrx driver things would just lock up.

Wanted: better online photo service

I've been using Black's for the past little while to get my digital pictures developped. For the most part I'm pretty happy with the prints. I usually end up paying somewhere around $0.30 for a 4x6" print, and the quality seems good. The only time I had a problem with the prints I returned them and they reprinted at no cost. However, getting my pictures to Black's is a bit of a pain. Their only interface right now is an HTML form that allows you to upload 12 images at a time. So when I have a few dozen pictures I have to upload them in batches...and keep track of which ones have been uploaded, and which ones haven't. That means clicking on the "Browse" button for each image, and selecting the image from the list of all images in a directory. If I happen to miss one, I'm basically screwed, since they don't keep track of the original order of uploaded files, and am left to look through each of the images on my computer one by one to check if it's been uploaded. This probably isn't specific to Black's, so don't think that I'm picking on them. It's probably a consequence of the relative immaturity of the online photo processing industry. What I'd love to see is something that lets you upload a whole set of images in one go. I realize that this isn't possible with a standard JavaScript/HTML type application for security reasons. What about some kind of online photo service API? It could be XMLRPC / SOAP or some custom protocol, it doesn't matter much to me. The simplest case of this would just have to support user authentication and image uploads. Then we could write real client-side programs that would integrate much better with our photo management tools. Imagine being able to click "print" on an image in your photo management software, and having an order queued at your friendly neighbourhood online photo processing centre! You could manage the rest of the transaction via your browser if necesssary, like handling delivery and payment options. Has anybody heard of anything like this?

splittar 0.2

I've finally finished version 0.2 of splittar. In addition to some bug fixes, I've added a few new features:

  • Generate files with more consistent file sizes
  • Keep multiple files open so that smaller files can be added to archives with a bit of room left
  • Ability to tweak how splittar estimates how well a file will compress. This is a weighted average between the actual file size, and the file size multiplied by the current compression ratio

Wordpress RFE - preview changes to an existing page

With the upcoming changes in Wordpress to enable more CMS-like features (including draft pages!), something else I'd like to have is the ability to preview my changes to an existing post / page. Right now it seems like there's no way to do that; since the post / page is live then as soon as I save my changes, the changes are made live as well. I didn't find this in the Wordpress Trac, so I thought I'd mention it here.