More Tiger stuff for reference

No need to read this… this is just for my personal reference. But I do have a little bit of a “new software utility” mentioned down there, as well as a nifty power tip. So if you’re an OSX user, then you may find it useful too.

Terminal stuff

Adding PATH variables

Some directories, such as /usr/bin are not included in the PATH variable anymore in Tiger (and Panther I believe). To set it back (and to put other directories in PATH), modify /etc/profile.

Modifying OSX Darwin boot message

The Welcome to Darwin! message is located in /etc/motd

Adding/chaning default stuff on terminal/shell

There’s a bunch of files that are considered to affect the shell,#[3] but with a bit of trial and error, the file that seems to have the greatest effect is the ~/.bash_profile so I did most of my customations there to keep things tidy.

Manuals

Manual files (files searched when doing a man command) are found in /usr/shares/man/, which are further subdivided into directories.

I mention all of these now, because I added a nice utility called ManOpen – which in turn had made me dump its files in different places… places which I don’t usually remember… hence this post for reference. And since I don’t want to touch /usr/sbin as much as possible (as it is reserved for system stuff), I thought I’d just use usr/bin and even move setfile (which I added in my Adobe CS tutorial) to the new location and just added a new PATH.

On a different note, as I mentioned earlier, I did modifications on my default shell. Particularly the login line(s), the prompt,#[4] and I enabled color-coding (directories show in diff colors, etc.) I’m too lazy to put in a screenshot, so I’ll just repeat how it looks now on launch (minus the color coding):

Last login: on ttyp1 Logged into Darwin as

DIR: $

Obviously all enclosed in <> are dynamically populated. The reason I had to mention this is because /etc/motd is a simple textfile, so the original Welcome to Darwin! greeting is just echoed text. So to get the effect of having a USERNAME being echoed means that I kept the motd file blank, and implemented the login echo in ~/.bash_profile

So a normal session would now look like:

Last login: Thu Aug 11 13:33:23 on ttyp1 Logged into Darwin as nargalzius

01:33 PM DIR: ~ $ cd Music/iTunes

01:33 PM DIR: ~/Music/iTunes $ ls iTunes Library iTunes Music iTunes Music Library.xml

01:33 PM DIR: ~/Music/iTunes $

You get the idea. Though I don’t really care for the time, I opted to include it in every line just in case I needed it. Like when checking logs or something. You never know.

Plus the whole putting the directory above the actual prompt is useful especially if you’ve dug down really deep into directories. If say you were in a directory that was in /Library/Application Support/Adobe/AdobeHelpData/Cache/AdobeHelpCenter/1.0/en_US/binary/page how would this look normally?

The default Tiger terminal shell prompt is something like <computer name>:<working directory <username>$

So me navigating to the in the earlier mentioned directory would look something like this:

Last login: Fri Aug 12 09:41:27 on ttyp1 Welcome to Darwin!

powerbook:~ nargalzius$ cd /Library/Application\ Support/Adobe/AdobeHelpData/Cac he/AdobeHelpCenter/1.0/en_US/binary/page powerbook:/Library/Application Support/Adobe/AdobeHelpData/Cache/AdobeHelpCenter /1.0/en_US/binary/page nargalzius$

Now wasn’t that messy? I simply broke the line where the word-wrap was to occur on a default window size.

Now if I do the exact same session as above with my new prompt scheme, it would look like this:

Last login: Fri Aug 12 09:43:56 on ttyp1 Logged in to DARWIN as nargalzius

09:46 AM DIR: ~ $ cd /Library/Application\ Support/Adobe/AdobeHelpData/Cache/AdobeHelpCenter/1.0/ en_US/binary/page

09:46 AM DIR: /Library/Application Support/Adobe/AdobeHelpData/Cache/AdobeHelpCen ter/1.0/en_US/binary/page $

It still wraps the words, but much more elegant, plus I put an intentional line break before the prompt so I get a nice clean space between everything to make things easier to see. Plus since the final prompt is always on the edge, then it makes finding the commands used much more easier to find and analyze.

[3]: A type of user interface in computer software, often an operating system shell, such as a Unix shell command line interpreter in the Unix operating system or the DOS Shell in MS-DOS. (from wikipedia.org) [4]: Think C\:> in MS-DOS terms

Have a say

This site uses Akismet to reduce spam. Learn how your comment data is processed.