Adding personal startup scripts to ubuntu

It’s really been a while since my last post but I decided to get this moving again. I regularly need to remember something and this blog still is a good place to write stuff down.

On this post I want to tell you how I make stuff happening while logging in. I just like it if I don’t have to start the cool stuff manually so scripting was the solution. Since I need the same programs on almost all my systems, synchronisation was needed. I could have putted the code in a repository but I decided to use the ubuntu-one service because it is already there.
I created a little script like this and added it to my $HOME/Ubuntu One/script folder. I made it executable and hoped for the best.

#!/bin/bash
# starting hamster-indicator
if test $(hostname) = 'wimsbuntu'
then
$HOME/src/hamster-indicator/hamster-appindicator/hamster-indicator \
2>&1 >/dev/null &
fi

# starting empathy-twitter-startus
STATUSDIR="$HOME/src/empathy-twitter-status"
test -d "$STATUSDIR" &# starting tomboy
/usr/bin/tomboy >/dev/null 2>&1 &

# starting desktopcouch
/usr/lib/desktopcouch/desktopcouch-get-port >/dev/null 2>&1 &

Unfortunately while syncing correctly the mode-bits where not set correctly so a little workaround was needed. My solution was pretty easy: I created a script in my $HOME/bin which starts the startup-script. It goes a little like this:


/bin/bash "$HOME/Ubuntu One/scripts/startup"

Making the script executable and adding the script to the startup manager finishes the job.
The only thing I’m missing is halting some programs on logout. I’ve been googling around but didn’t found a good answer. Anyone a suggestion?



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s