Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Poor Title: Display Debian fortune quotes when starting up terminals' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Poor Title: Display Debian fortune quotes when starting up terminals
Authored by: jdera on Jan 05, '04 10:34:44AM

This article is also titled poorly. It doesn't tell you _how_ to have the fortune display when starting up terminals, merely that a utility has been made that can display a fortune. I haven't bothered to download the suggested script (I have DarwinPorts' fortune package installed), so here's how to do get pretty much anything to run when you first open a new terminal window. This works with OS X 10.3, which has bash as the default shell. Users of earlier versions of OS X will want to edit a file named .login instead of .profile.

Open up Terminal, and enter the commands cd; pico -w .profile. This will launch the pico editor with a new file, named .profile, that is located in your home directory. The file .profile is executed by the shell (bash on Panther, tcsh on earlier versions) during login. Any commands you insert in this file will be processed each time you login. Enter /opt/local/bin/fortune in the pico window, then press Ctrl+X, y, enter.

Next time you open a Terminal window, the .profile file will be run and your fortune will display. Play around with the login files a bit. There might be other things you'd like to have run at login. For more information, take a look at this article over on the O'Reilly Network.



[ Reply to This | # ]