High energy reactions at the LHC

•November 27, 2009 • Leave a Comment

There was a high energy reaction at the Large Hadron Collider over the weekend:

LHC high energy reaction

There was also one low energy reaction:

LHC low energy reaction

Thanks to Luboš for the links to original LHC photos ;)

EDIT: I’ve since found some more images of the event, including a hi-res version of the teams reaction. Brilliant :)

There’s also a collection of released images showing the first splash event candidate and good coverage here. Really really cool stuff! I’ve improved my reaction proto-memes by using the new images.

Share this post with AddThis!

Batch convert images using GIMP in Ubuntu

•October 8, 2009 • Leave a Comment

The amount of times I’ve wanted to do the same thing to multiple images… e.g. converting a collection of .tif images into .jpg. I usually cave in and end up doing it manually – yuk!

Today I finally found an excellent tool for batch automating most image transformations/effect you’d want. It’s a GIMP plugin called David’s Batch Processor. You could Google it, download the source, compile it and finally get it to play with GIMP, or (if you’re using Ubuntu) you could just install the gimp-plugin-registry package via synaptic or aptitude. This package (maintained by the Ubuntu-MOTU dev team and kept in the Universe repos) contains heaps of useful GIMP plugins; David’s Batch Processor is just one. Do yourself a fovour and check it out!

Converting a Lyx document to LaTeX: removing line breaks / carriage returns / split lines using Emacs

•August 20, 2009 • Leave a Comment

I recently wanted to convert a Lyx document into plain LaTeX. The process is relatively easy: File -> Export -> Plain LaTeX. The resultant .tex file, however, has multiple line breaks throughout every paragraph. Uuuugh… UGLY! (Not to mention clunky and unusable).

My fix for this surely isn’t the best, but it’s better than removing the trailing carriage returns manually. First, select a paragraph. then search for all (hidden) line breaks, replacing them with a space:

meta-x replace-string

^q ^j

*space*

That’s it. All line breaks will be replaced by spaces in that paragraph. I’m not sure how to do a full document replacement since all carriage return marks will be replaced (concatenating all paragraphs etc.); not what you want.

Fixed: sound not working in Debian Lenny on a Dell Mini 9

•July 15, 2009 • Leave a Comment

The solution to getting sound working under Debian Lenny on a Dell Mini 9 is very similar to the same procedure with Fedora 9 that I discussed a while ago. In order to enable the hda audio interface, add this line to the end of your /etc/modprobe.d/alsa-base file:

options snd-hda-intel index=0 model=dell

Log out and in and all should work. Be sure to adjust the volume of the speakers in the audio manager when testing it out, too, as mine was all the way down by default.

Once this works, you’ll probably want to disable the annoying system beep from the PC speaker module, too. To do this, just add this to the end of your /etc/modprobe.d/blacklist file:

blacklist pcspkr

How to install Skype on Debian Lenny

•July 15, 2009 • 7 Comments

The easiest way to install Skype (as of this moment) in Debian Lenny is to use the Skype repository. Simply add this line to the end of your /etc/apt/sources.list file:

deb http://download.skype.com/linux/repos/debian/ stable non-free

Then update the repository database for apt with apt-get update.

Skype, and all dependencies can then be installed with apt-get install skype.

There are other ways to do this, but the repository seems to work at the moment, so use it.

How to install Debian Lenny on a Dell Mini 9 via a USB flash drive

•July 13, 2009 • 5 Comments

Feeling I’ve grown out of my Ubuntu training wheels (or daiper – as you prefer) I thought I’d give Debian a try. I could have just installed it on my desktop or an external HDD, but I thought I’d be overly masochistic and try it first on my Dell Mini 9. The main issue here, as with installing any Linux distro an the Mini, is actually getting a bootable installation medium to work.

I first tried to load Debian Lenny on my 1GB Kingston USB flash stick using UNetBootin. This worked for me a while ago when trying to install Fedora core 9. Alas, it appears the Debian install CD menu only allows the mounting of CD/DVD drives, not images – I may be wrong, but I was too impatient to find out. A better option turned out to be discussed explicitly on the wonderful DebianOn site – a site that aims to discuss how to get Debian working on various hardware. In my case, how to get Debian Lenny working on a Dell Mini 9! The documentation, however, was very difficult for a semi-novice like me to follow; particularly the part:

To install Debian Lenny use the USB-Stick Image from http://wiki.debian.org/DebianEeePC and replace the initrd.gz and linux file with the normal NetBoot kernel

Sorry… wha? Loosely translated, this means you have to take the initrd.gz archive and the file named linux from the NetBoot Debian installation image and put it in the custom made Asus EeePC install image.

It turns out that this isn’t too hard to do. The only way I managed to actually do it was by attempting to read an Italian forum discussing this very problem. In particular, not the post from Aki, demonstrating the precise commands required to extract and then package these files (I’ve done my best to translate to English):

#Create a working directory
mkdir workdir
cd workdir

# Download the customised EeePC and
# NetBoot installation images/archives
wget http://eeepc.debian.net/debian/images/debian-eeepc.img
wget http://ftp.nl.debian.org/debian/dists/lenny/main/installer-i386/current/images/netboot/netboot.tar.gz

# Unpack the NetBoot archive
tar xf netboot.tar.gz

# Copy the original EeePC image to another
# name – the copy will be altered soon
cp debian-eeepc.img debian-dellmini9.img

# Make a directory to mount the copied image to,
# then mount the image (cool, hey?)
mkdir dellmini9_mount
mount debian-dellmini9.img dellmini9_mount/ -t msdos -o loop

# copy the aforementioned files from the
# unpacked NetBoot archive into the mounted image
cp -v debian-installer/i386/initrd.gz dellmini9_mount/initrd.gz
cp -v debian-installer/i386/linux dellmini9_mount/linux

# Verify that the files copied correctly
# (by checking that the files differ
# – not necessary but nice for completeness)
cmp debian-installer/i386/initrd.gz dellmini9_mount/initrd.gz; [ $? -eq "0" ] || echo “initrd.gz wasn’t copied”
cmp debian-installer/i386/linux dellmini9_mount/linux; [ $? -eq "0" ] || echo ” the linux file wasn’t copied”

# Unmount the altered image
umount dellmini9_mount

# Check to see the copied image has been stuffed with
# the new files by comparing with the original
# (again, not required but will explicitly show that the files differ)
cmp debian-eeepc.img debian-dellmini9.img

Now you can write this image directly to your (bootable) USB stick via

dd if=debian-dellmini9.img of=/dev/sdb

where /dev/sdb is the device path of your USB stick (make sure you use the correct device path – get it wrong and you could destroy another perfectly healthy drive). After ensuring the Dell Mini could boot from USB (checking the boot drive and priority settings in the BIOS), the modified Debian install worked PERFECTLY!

Now, there is one major pain in this. The latest stable Lenny kernel doesn’t like to have a card in the card reader during boot – it’ll hang. I’m willing to forego my SDHC card for now just to try out Debian. I hope this will be fixed in the future… then again, this is Debian we’re talking about. Maybe some hacking will be required.

As for setting up the system post-install, particularly for wireless, the original DebianOn page for the Dell Mini 9 was extremely useful! Provided you use the standard Broadcom card, this method worked perfectly for me (just be sure to reboot after installing network manager – see the Configure link in step 10).

It seems the webcam works out of the box, at least in Cheese, and most other things seem to work straight away, too. I’ll install Skype soon to see exactly how well…

And that’s it for now… Hope this helps someone wanting to try out this great distro on their Dell Mini 9!

Edit PDF files in Linux with pdftk

•July 13, 2009 • Leave a Comment

I recently wanted to alter a .pdf file but had no copy of Adobe Acrobat and preferred to use Linux. After a quick bit of searching, I came across an awesome little (but very powerful) program called PDFToolkit. It can be installed on any Linux distro, and should be available in most popular distro’s repositories. Once installed, the program is called by executing pdftk in the terminal (yes, it’s a command-line tool). pdftk can’t be called on its own, it must be followed by input files and parameters. For a list of functions and syntax, check out the man-page: man pdftk.

The things pdftk is capable of are impressive, to say the least. So far, I’ve used it to do simple tasks like remove pages or concatenate two documents, to more advanced things like overlaying a stamp image on a document.

The only issue I’ve come across thus far is that, when removing pages (at least) the document’s contents list breaks. This probably shouldn’t be surprising, though. Nonetheless, it’s a very powerful and useful program that I’ll be using for a long time.

Share this post with AddThis!

Fixed: Gnome clock shows wrong time (GMT / UTC instead of local) in persistent live USB Ubuntu 8.10

•April 9, 2009 • Leave a Comment

Hopefully this is the last major bug I find with my persistent Ubuntu 8.10 install for a while: it seems that the Gnome clock displays UTC (or GMT) time no matter what settings I change. I think the main reason was that my timezone settings weren’t being saved upon reboot. First, I set the clock to sync with internet servers:

Administration -> Time and Date -> Configuration -> Keep syncronised with internet servers

Install the NTP packages when prompted then select your location and servers to sync from. This is where my settings would be forgotten. After a reboot, the Time Zone field would be blank. Grrr. What I found, however, is that I could reset the tzdata (where the timezone settings are kept) manually by running:

sudo dpkg-reconfigure tzdata

After executing this to ensure the correct timezone was selected, I then set this command to be run automatically and non-interactively at startup by adding it to System -> Preferences -> Sessions -> Add -> Command: “sudo dpkg-reconfigure -f noninteractive tzdata”. (Thanks to Alexis’s post on Debianhelp for highlighting the command). This seems to have done the trick.

Uuuuugh. Painful.

This will probably be fixed in a kernel update sometime.

Share this post with AddThis!

Screen-lock with xlock on persistent live USB Ubuntu 8.10 Intrepid

•April 6, 2009 • 2 Comments

Continuing to refine my persistent Ubuntu 8.10 install, I came across a peculiar feature: the inability to lock the x-session screen – even if all settings are set to lock the screen after certain events (!). Wanting to use this install in a Uni/work atmosphere, privacy is a good idea.  Not being able to simply lock your screen is really just a pain in the X, and it seems I’m not the only one in this situation.

After some forum trawling, I found that screen-locking was essentially removed from the Live distro of Ubuntu since Dapper because of issues with users being able to lock themselves out of their own sessions (weird, but it happened). I suppose removing the functionality was better than risking a self-lockout, but still…

To enable screen-locking, then, I found a nice third-party screen-locker: xlock. You can install it via Synaptic by searching for xlock:

Installing XLock via SynapticSelect and install the xlockmore package. The xautolock package could be useful, too, although I haven’t used it yet, enabling screen locking after a set idle time.

Once installed, I bound xlock to a hotkey via gconf-editor. Open a terminal. Run gconf-editor. Browse to apps -> metacity -> keybinding_commands. In the field for command_1, enter xlock -mode matrix -background black -foreground grey (for a list of other modes and other tags, read the manpage: man xlock; I made the background black with grey text since the black text on a grey background I had as default was very ugly). Go to apps -> metacity -> global_keybindings and change the field of the run_command_1 entry to whatever hotkey you’d like; I use <Super>l.

I’ve had no issues so far. I think this is a nice solution to this strange problem.

Share this post with AddThis!

Fixed: Synaptic not showing (searching) all packages

•April 4, 2009 • 3 Comments

After creating another persistent Live CD usb installation of Ubuntu 8.10 Intrepid, I noticed a strange quirk with Synaptic: it wouldn’t show all packages available from the repositories I’d specified. While I still have no idea what caused the problem, I’ve just found how to fix it (thanks to Don Wait on the Ubuntu forums). All I had to do was rebuild the “Xapian Index”… How awesome does that sound?

“You’ll have to excuse me from this meeting. I’ve just recieved an urgent message to rebuild the Xapian Index… AWAY!” *Thrusts fist into the air in a SuperMan pose*

To actually do this, close Synaptic then enter this into the terminal:

sudo update-apt-xapian-index

Restart Synaptic and all should be well.

AWAY!

Share this post with AddThis!