Filed under: Odds and ends, Terminal Tips, Snow Leopard
Snow Leopard Fixes: Terminal shell workaround
Ever since I installed Snow Leopard, I've been dealing with a particularly annoying bug. Terminal keeps forgetting my shell preferences.
I generally prefer to use tcsh rather than bash. This is mostly because I'm a technological dinosaur. I also have a lot invested into my ancient and extensive .cshrc that has taken years to grow and develop.
Normally, I set the default shell inside the Terminal app preferences. But there's a problem. Snow Leopard keeps losing my preferences for reasons I do not begin to understand. With this Snow Leopard bug, I had to find another approach for choosing my shell. Terminal preferences were no longer going to work for me.

There are actually two very good ways to handle this problem.
First, there's chsh, as pointed out by Richard Buckle and Brian "Shmit" this morning. A command line utility, chsh edits the OS X user database, allowing you to change a user's default shell. chsh is built into OS X, and you can pull up a man page to read details about its use. Supply the shell you want to use, authenticate, and you're set. There is, however, an easier solution.
It's System Preferences. As Bill Bumgarner and Jordan Breeding reminded me today, you can access advanced user settings by right-clicking (or Ctrl-clicking) a user name in the Accounts settings; then choose Advanced Options. (Please note that you must first unlock the settings before this trick becomes available.)
When selected, an Advanced Options screen appears. You can set the new login shell in this screen. A simple pop-up list offers easy access to all installed shells. Select the one you want to use and, once selected, click OK to dismiss the screen and return to the Accounts settings pane.
This solution works a lot better than the bash .profile approach I had been using for a few weeks. Running tcsh through the .profile initialization file had caused an extra layer of interaction each time I wanted to close a terminal window. The application warned me that I was about to kill a running process (i.e. my tcsh subprocess). Changing my default shell meant I could create and close windows on demand without that extra dialog, a welcome respite.
In conclusion, while I'm not sure why Terminal keeps losing its preferences, I'm pleased that I at least learned a way to bypass the shell issue. Hopefully, Apple will get this bug fixed soon.
Get a WordPress.com Blog
![TUAW [Cafepress]](http://www.blogsmithmedia.com/www.tuaw.com/media/tuaw-cafepress-promo.png)


Reader Comments (Page 1 of 1)
Jared said 10:07AM on 10-23-2009
Thank you thank you thank you! I thought I was going insane because Terminal never seemed to keep my settings. Glad to know I'm not insane.
Reply
Gary said 10:09AM on 10-23-2009
Say What?
Reply
Nick K. said 10:12AM on 10-23-2009
Have you checked the permissions on the preference file?
Reply
maxpower said 10:35AM on 10-23-2009
Seriously?
Maybe you would be happier running Linux.
Reply
Mike said 11:12AM on 10-23-2009
Dinosaur? please. Bourne is older. You are a trendy newcomer.
Reply
greg said 11:05AM on 10-23-2009
This might be a tad OT but, I have 3 macs and with all of them Safari is giving me fits. There's an Apple discussion on it with a DNS setting in Network>System Pref but, that did nothing. I have tried everything. The problem? Pages loading and loading and loading. I would say with at least 80% of pages, I have to reload several times. I click on a link and the page never loads. Hit refresh a couple of times, sometimes more, and eventually it works. I've put 2 posts on the Apple board and they delete them! Weird.
I might add that this is happening to the 3 macs in our house. One of them a brand new 13" MBP. All with fresh, clean installs of SL.
I am at my wits end. By hi speed wireless has essentially been cut in half due to Safari's "problem". I've tried Camino too and it seems to happen with it too. Firefox? Forget it, it doesn't rememeber any sign in info and I have to sign in to each site (like My Yahoo) over and over again.
I'd appreciate any help. Been an avid TUAW reader since the beginning and haven't seen this issue addressed. I am hearing of a lot of similar problems like mine.
Reply
Mike said 11:21AM on 10-23-2009
I've submitted a bug to Apple's Radar about a problem of IPV6 and IPV4 DNS conflicts. It prevents me from accessing some internal sites with only IPV4 DNS internally when there is both an IPv4 and IPv6 record on an external DNS server. To fix it, I have to constantly flushdns.... to flush dns, do:
dscacheutil -flushcache
in your terminal...
You may also check your /etc/resolv.conf to make sure that the correct name servers for your network is listed. Also, try "dig A " in a terminal and see if you get the right IP or any dns response.
greg said 11:33AM on 10-23-2009
Mike-
Yeah, done all that and indeed, I get the right DNS response. Download speeds are not a problem BTW. I will also notice when multiple tabs are open that a background tab or 2 will display the "loading" spinner continually. I go to that tabbed page and the load spinner stops but, usually another background tab will start to do it. I see one now spinning and spinning. It's been maddening I tell you. FF is useless now. Camino has similar problems and Safari has become a major annoyance. I just got off the phone with tech support at Time Warner and everything "appears" fine.
All I know is that since I went with Snow Leopard, my web browsing has slowed to a crawl and become a royal pain.
Reply
c_stodolenak said 12:45PM on 10-23-2009
Have you tried using a different DNS (208.67.222.222, 208.67.220.220 are OpenDNS's addresses)? Have you tried using your computer(s) on another network? ie, take your MBP to an Apple Store or someplace else with free wifi and see if your issue persists?
greg said 12:58PM on 10-23-2009
c_stodolenak -
Yes I have to both. Same thing. I am completely baffled as to what is going on here.
Reply
Greg said 1:06PM on 10-23-2009
just run:
chsh -s (shell path)
I use fish shell so I just typed:
chsh -s /opt/local/bin/fish
Reply
Jerald said 1:55PM on 10-23-2009
The terminal supplied with the Mac is like the old Finder... one of the worst apps around.
iTerm (Free and OpenSource) is by far more feature filled and an all-around high quality app.
As a UNIX admin, I need a terminal that will do everything I need it to do in my work world, and iTerm fits that bill just fine.
Give it a try. It'll make Terminal look silly like Pathfinder makes the Finder look silly.
http://iterm.sourceforge.net/
Reply
macserv said 3:36PM on 10-23-2009
I'm not seeing any advantages, and you certainly didn't list any. I'm definitely not seeing anything on the level of PathFinder vs Finder.
Care to elaborate on what makes this with the switch to something not included with the OS?
Matt said 2:55PM on 10-23-2009
You should change it in System Preferences->Accounts
1) Open that preference pane
2) Authenticate, if necessary
3) Right-click on your username, and select "Advanced Options..."
4) Select "/bin/tcsh" from the Login Shell dropdown box.
Terminal should now open with that shell by default.
Reply
Ralph Zeuss said 6:20PM on 10-23-2009
What could you possibly have in your cshrc that is so hard to port to a bashrc and enjoy the various benefits of a superior and standard shell?
Reply
Tibastral said 11:35AM on 10-24-2009
If you want a really good shell configuration, you should be considering using ZSH with oh-my-zsh (http://github.com/robbyrussell/oh-my-zsh), a theme handler for zsh that's really sweet and beautifully designed.
To use it, it's not really difficult, you can run an automatic script to install it.
After that, you can custom it in your .zshrc.
Really really wonderful
wget http://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh
keep free to fork/improve it on github
Reply
delpi98 said 4:24PM on 11-04-2009
Stated a http://clarksshoess.us/ spokesman for the Department for Business, Innovation and Skills, a government organization currently headed by Labour Party appointees, “The scale of unlawful file-sharing poses a real threat to the long-term sustainability of our creative industries. While surveys asking people about unlawful behaviour should be treated with caution, it’s encouraging that the
http://discounttagheuerwatches.us/
http://mbtsneakers.blogspot.com http://mbtshoess.us findings signal that the three-pronged approach set out by the Government this week – a mix of education, enforcement and attractive new commercial deals – provides the best way forward
Reply