Background on Mac OS X Lion Gets Stuck on Gray Linen Background and Menu Bar is Black

I've been having this problem intermittently when plugging in and unplugging my external monitor.

I found a fix to the black menu bar that involved going into System Preferences->Desktop & Screen Saver and toggling the "Translucent Menu Bar" setting.

However, my backgrounds were still the gray linen background. Upon further searching for that system, I found that killing the Dock.app fixing the problem via one of the following code (which I put in my ~/bin as "fixLinenBackground")

sudo kill -HUP `ps -ef | grep [D]ock.app | awk '{print $2}'`

or

killall Dock.app

Script to Change the Title of Your Terminal Window

I decided to create a small bash script to change the title of my current terminal window in bash on my Mac:

change_title:
#!/bin/bash
 
echo -ne "33]0;" $* "07"

The script then runs as:

change_title Your title goes here.