Much ado about scripting, Linux & Eclipse: card subject to change


Suspend To RAM

Phew. Solved the suspend to RAM issue, after a few annoying crashes.

For details and links to required .deb packages, see this script, /etc/init.d/ibm-acpi

The above script/instructions permits suspending to RAM in response to Fn-F4 keypress and optionally, closing the lid as well.


Performance tuning the Linux lappy

Some do's and don'ts for performance tuning (disk, battery, swap) your Thinkpad with ubuntu/debian:

DO use a swap partition.

/dev/sda3 swap swap sw,pri=1 0 0

DO replace apmd with powersaved, and install kpowersave. This gives you a system tray icon for configuring cpu behaviour (throttling when running on battery), and a way to suspend to RAM ("sleep mode"). Now I just need to figure out how to map that to my Fn-F4 key.

DON'T mount your /tmp folder using tmpfs, unless you want to see the machine crash. It's not as fun as a BSOD, but it's a much bigger pain to recover from. You could also have a dedicated partition for /tmp if you want to restrict it to a given maximum size.


How to make your shell prompt prettier

It's been a long-standing kvetch on my part that when navigating deep directories in a Konsole window (or really, any xterm), when the paths get too long the line wraps on top of itself. So, today, as part of Think Fridays, I decided to solve this problem.

Step one: put the script lspathseg in your /usr/bin/ or somewhere else where your $PATH can find it.

Step two: use it in your /etc/bashrc like this:

export PS1="\$(lspathseg 2) \$ ";

Additionally, if you want to play with colour in your prompt, see my /etc/bashrc for how to do that.


Notes 7 + SimplyMEPIS 6 = one sweet lappy

Well, I've finally got my Thinkpad set up just the way I like it: running the latest SimplyMEPIS 6, KDE 3.5.3, and kernel 2.6.15-27-686. Goodbye, Windows! After a couple days of pain, I managed to not only get Notes 7 working through the IBM Lotus Workplace client (aka a bloated Eclipse RCP app), and annoyed at having to search in several places for instructions and packages, I've written an interactive installer script. Instead of being a recipe for what to do, it does it all for you! The script should work for any ubuntu-based distro, but you might have things missing from your etc/apt/sources.list, like the multiverse stuff. Anyway, it's bound to be hella easier to use than the old manual trial and error method. Drop me a line if you use it and it works for you!


And the winner is...

Ah, Scott Adams, you've entertained me again. I raise a burrito to you. I'd always thought so, and now there's "enthusiastically unscientific" proof that the USA is as weaselly a country as North Korea. Heh.