Gnome-Terminal Fun

August 22nd, 2006

I do most of my development in Ubuntu. The gnome-terminal app is one of my favorite terminals, mainly I think because of it’s tabbed structure. When I start working on Rails stuff, I usually end up opening a terminal and about 4 or 5 tabs. Everytime I do it, I think to myself “I should just script this to open – I wonder if I can tell gnome-terminal to open tabs with certain scripts loaded in each tab…”

Turns out, it’s not really that difficult. Here’s my shell script:

#!/bin/sh

# set working dir
wd="/home/jason/dev/rails_app" 

gnome-terminal --geometry=179x59+0+25 --working-directory=$wd  -e "mongrel_rails start" -t "web server" \
--tab --working-directory=$wd -e "tail -f log/development.log" -t "dev log" \
--tab --working-directory=$wd -e "script/console" -t "irb console" \
--tab --working-directory=$wd -e "mysql -u root --password=mysecret rails_app_development" -t "mysql" \
--tab

Ok, now I should get some stuff done…

Sorry, comments are closed for this article.