Associations in my mind
I've had a good idea, and I want to 'blog it before it falls out of my head.
Exhibit A (to the left/above) is a screenshot of my desktop, as of about 20 minutes ago. I'm guessing, but the time in the top left will tell you exactly, if you're picky. You'll notice that Rachel Bilson is my desktop wallpaper, and that I have a shell open with Britney Spears as its background - this last part is important. You will also notice that I have several other shells open within that one window. This is called "tabbing" and I find it's an effective way to minimize the number of running programs.
If you're using Firefox, try hitting CTRL-t now and you'll see it opens a new tab within the same browser. Incidently, middle-clicking (if you have a scroll-wheel that clicks down like a button - try it) will open the link in a new tab, which makes reading news stories online, and following their links later really simple. But I digress.
When I start my day programming, I normally open a shell, then open three of four other tabs. Then in each tab I SSH (connect) to prime, our server. Then I login with my password. Then I sudo su username to change to the user that I'm working as. For example, I've changed to "webpilot" for this recent project - I assume that client's identity. Then I'll normally start work. I have to repeat this procedure for each shell that I've opened. It's not hard work, but it's repetetive, and Computer Scientists don't like that, do we? Can I get a hooah? Good, then I'll continue.
The terminal shell I'm using supports different profiles, which means I can change features like the wallpaper in that tab, the text colours (do I want white on black, or black on white, or green on black, etc.) and what is displayed in the tab title. This is good because I have set up two profiles so far: Rachel and Britney. You'll see Britney has "MySQL" before her name, because she's the lucky lady that gets to have my connection to the database "in her".
Each shell normally has a different purpose: I'll have a database connection open in one to interact with the database, I'll have a few vim windows open to edit the files, and I might have another monitoring log files for example, or compiling the application as I fix bugs (not that I compile much anymore - web programming doesn't need this step).
So, each girl will have her own purpose. Like I said, Britney's my database babe, and Rachel seems to be the "default" profile. I'll get more profiles made later.
Now, this is where it gets real good. I can pass in paramters to the gnome-terminal application when I start it, meaning that I can say "don't just open one window, open it and then launch two Rachels, a Britney, a Kylie and a Maggie, and in the Rachels connect to prime and login as me, change to user X and go to their public_html folder, and in the Britney tab connect to prime and login as me and change to user X and connect to MySQL user user X with password Y,and in Kylie..." so on.
I'd then link this (huge) series of steps to a single icon on the launcher bar. One-click and I'd "be at work" ready. Sounds more like it, right?
"Hooah!"
Now I've really got something to play with over the Christmas break. If I can't "script" the solution, I can always download the source to gnome-terminal and modify it to work the way I want, which would involve adding a dialog box that requests some information, like the user that I want to change to, their database username and password and other such details. I could even have a drop-down menu with a list of clients, and store their credentials locally (securely, of course) and the "type" of window configuration I would want to launch (do I want two Rachels and a Britney, or three Maggies for example).
Thinking out aloud, I could even write this handler as a seperate launcher that determines the list of parameters to pass into gnome-terminal. I wonder if I could really simplify this and have Firefox launch a local application? I don't think it would out of the box, but maybe I could do some panel beating there?
Either way, I'm excited at the prospect of knocking out the 60 seconds of repetition that I do at the start of every day.
What a brain-dump!
Edit: 24/12/2004 - 3:40AM
Considering how unstable my ADSL has become over the last few months, this would be even handier. It's bad enough going through the motions at the start of the day, let alone repeating it later when the net drops out.
Though, Steve's wireless might fix all of these issues ;)