Wednesday, May 26, 2010

How to Setup GnuStep on Lucid Lynx 10.04

If you want to compile any Objective C code on ubuntu platform, you will need GnuStep. The GnuStep turns out to be a two step process.
First:
sudo apt-get install gnustep

Second:
You will need to install gnustep-devel package too. But one of its dependency is a package called gorm.app which is not present in the repos (at least not at the time of writing this blog). So goto this URL (http://packages.debian.org/squeeze/i386/gorm.app/download) and choose any mirror of you liking. Then add this line to your /etc/apt/sources.list file:
deb http://ftp.de.debian.org/debian squeeze main

then:
sudo apt-get update
sudo apt-get install gorm.app
sudo apt-get install gnustep-devel

Also, note that there is a suspected bug in the apt (https://bugs.launchpad.net/ubuntu/+source/apt/+bug/574886?comments=all). So if you see an error in the "sudo at-get update" on some lines like this "(-5 - No address associated with hostname)", try two things:
1) If you can, unplug the router (if there is any) and hook the computer directly to the modem and then rerun "sudo apt-get update"
2) there is an alternative workaround here in post #17
http://ubuntu-ky.ubuntuforums.org/showthread.php?t=1475399&page=2

Monday, May 24, 2010

run a script at logout/shutdown on ubuntu Lucid Lynx 10.04

how to make script run at logout (caution: this method is recommended for admin level tasks to be run on the machine before logout/shutdown):

If the script name is fooOnLogout.sh, then do the following steps (also make sure that the script is executable):

sudo cp fooOnLogout.sh /etc/init.d
sudo ln -s /etc/init.d/fooOnLogout.sh /etc/rc0.d/K10fooOnLogout.sh
sudo ln -s /etc/init.d/fooOnLogout.sh /etc/rc6.d/K10fooOnLogout.sh