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

Change your 'root' prompt for safety System
Thanks to Keith O. for this one...

If you occasionally use the terminal as root, you should consider using a different prompt when 'rooted' - this will help you remember that you are working as root, and hopefully prevent you from doing something that you didn't intend to do.

The first step is to create a file named .tcshrc in /var/root (this file could also probably be created as /var/root/Library/init/tcsh/rc.mine, but I haven't tried that). You'll be placing your prompt in this file, so that it gets loaded each time you start a root session. Here's what Keith O. placed in his root .tcshrc file:
set prompt="%{\033[32m%}%n @ %/ on $host %#%{\033[30m%}  "
This changes the content and color of the prompt, so that it differs from that of his normal user. If that looks completely foreign to you, that's perfectly normal! Read this hint for a general overview of prompt variables, including an explanation of the color codes, which should help clear things up (a little!).

You can experiment all you like in a terminal session - whatever you set as prompt will only last until you change it again or close the session. It only becomes permanent when you place it in root's .tcshrc file. Also read the referenced hint for setting your normal user's prompt. You can do some pretty neat stuff once you figure out the structure. For instance, this is my normal prompt string:
set prompt="%{\033[0;1;32m%}[%{\033[36m%}%t %n%{\033[32m%}%{\033[33m%}[space]
%c3%{\033[32m%}]%{\033[0m%}%# "
Note: Replace [space] with the actual space character, and enter on one line; broken for easier display. That prompt string leads to this prompt display:

The colors help the prompt stand out from the text that flows as the result of whatever command I'm running. Customizing your prompt string (for both your normal user and root) is a good way to make your time in the terminal more productive.
  Post a comment  •  Comments (9)  
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
[6,120 views]  View Printable Version
A guide for compiling UNIX programs UNIX
If you're interested in learning more about how to compile UNIX programs for OS X, I found a great reference on the X4U mailing list. This tutorial will walk you through the basics of downloading, expanding, configuring, and compiling UNIX programs. It's not specific to OS X, but it's a great overview of the process.

I've also added the URL to the links section of the site.
  Post a comment  •  Comments (2)  
  • Currently 3.00 / 5
  You rated: 3 / 5 (1 vote cast)
[2,753 views]  View Printable Version
Changing MAC Address/ifconfig? Network
Anyone know how to change the MAC Address on the ethernet card?
I've been trying ifconfig but I can't seem to get it to work.

My cable provider registers MAC address and I switch back and forth between two machines. I don't want to use a router. Any help would be appreciated.
  Post a comment  •  Comments (14)  
  • Currently 4.33 / 5
  You rated: 5 / 5 (3 votes cast)
[11,150 views]  View Printable Version
Repairing OS X disks in a GUI System
If you have filesystem errors, Mac OS X doesn't allow you to repair the startup disk, so you need to boot from a CD to run a repair utility. Of course if you formatted your drive in UFS, tools like Disk First Aid and Norton Utilities won't be able to do anything for you. However, Apple has provided a solution.

If you boot from the OS X install CD, you can go to the Installer menu, and choose "Open Disk Utility...". This will allow you to test and repair both UFS and HFS+ disks, without having to venture into the scary land of terminals and Single User Mode.
  Post a comment  •  Comments (3)  
  • Currently 2.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
[3,912 views]  View Printable Version
PDF file as desktop background Desktop
Instead of choosing a jpg file for a desktop background, you can also select a PDF file to use as desktop background.

This is specially cool when you want to see sharp text. And most of the times a PDF file is smaller than a JPG.

  Post a comment  •  Comments (5)  
  • Currently 1.33 / 5
  You rated: 2 / 5 (3 votes cast)
[10,442 views]  View Printable Version Activity window Apps
I just discovered (a colleague of mine) that when you double click on the rotating arrows in the main window in the, the activity window appears. That's a bit easier than selecting it in the Window menu.

  Post a comment  •  Comments (2)  
  • Currently 2.43 / 5
  You rated: 5 / 5 (7 votes cast)
[4,566 views]  View Printable Version
Disable ATI extensions for better perfomance Classic
This is something I saw somewhere else but cannot remember where.

If you disable all of the ATI extensions in Classic (which aren't needed if you're running OS X) then you seem to get better performance in some Classic applications.

[Editor's note: As an expansion of this theory, there's a bunch of stuff that I've disabled in Classic - nearly everything, in fact. I basically installed just the base OS with networking, and nothing else. Then I installed (running the "Classic" 9.1 natively) all my apps that put bits into the system folder (Office98, goLive, etc.). Then I restarted into X and set my lean OS 9.1 as my Classic volume. You can definitely improve performance and decrease loading time by thinning your Classic system -- which is another argument for having your "real" OS 9.1 on another partition, so you don't have to mess around with extension sets.]

  Post a comment  •  Comments (5)  
  • Currently 1.50 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
[5,237 views]  View Printable Version
Change the version number System
This is completely useless tip, but OS X stores the version number in /System/Library/CoreServices/SystemVersion.plist
If you edit this file, you will be able to make it say Mac OS 3 (build 3p14) in the about this mac.


[Editor's note: This shouldn't bother anything like future upgrades, since they look elsewhere to see if they're needed ... however, use at your own risk. During the Public Beta, people had great fun changing the version number and publishing screenshots to confuse forum readers!]
  Post a comment  •  Comments (0)  
  • Currently 5.00 / 5
  You rated: 5 / 5 (2 votes cast)
[8,737 views]  View Printable Version
Safer file manipulation in the Terminal UNIX
By default in OSX, terminal commands like move (mv), copy (cp) or remove (rm) can overwrite or delete existing files without prompting you whether it's really want you want to do. These commands can be dangerous to use especially when using * for designing multiple files. To be automatically prompted for confirmation before each file is processed, create yourself a .cshrc file in your home directory and put the following lines
alias mv 'mv -i'
alias rm 'rm -i'
alias cp 'cp -i'
Another thing I find very useful is to have the target directory listed automatically when issuing a cd command. This can be done as well by adding the following line in your .cshrc file:
alias cd  'cd \!*;echo $cwd; ls -FC'
For these changes to be effective, type source .cshrc or open a new terminal window.

[Editor's note: Please see this related conversation on aliases in another macosxhints' posting. Aliases can live in a number of locations; .tcsh is one of them, but the referenced article gives an alternate, (possibly better?) location for these types of files.]
  Post a comment  •  Comments (5)  
  • Currently 2.50 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
[3,023 views]  View Printable Version
Adaptec beta drivers and disk space System
I noticed on MacFixIt today that someone commented on the system.log file getting filled with data from the Adaptec SCSI drivers. So I took a look at system.log in the /var/log directory, and was surprised at what I saw:
May 15 10:01:41 mach_kernel: ADPT_OSI_IndicateQueueFrozen: id 4, freeze
May 15 10:01:41 mach_kernel: ADPT_OSI_IndicateGenerationChange (nop)
May 15 10:01:41 mach_kernel: ADPT_OSI_IndicateQueueFrozen: id 4, unfreeze
May 15 10:01:42 mach_kernel: ADPT_OSI_IndicateQueueFrozen: id 4, freeze
May 15 10:01:42 mach_kernel: ADPT_OSI_IndicateGenerationChange (nop)
May 15 10:01:42 mach_kernel: ADPT_OSI_IndicateQueueFrozen: id 4, unfreeze
As you can see, all those messages were written in the span of two seconds. My system.log file was over 5.5mb in size, and the system had backed up about six previous logs, all over 2mb in size. You can see these in the list as system.log.0.gz, system.log.1.gz, etc.

I deleted the backup log files, and will remove the drivers later tonight (see the Adaptec ReadMe for instructions on how to do so).

So if you've noticed some vanishing drive space, and have the Adaptec drivers installed, check your log files!
  Post a comment  •  Comments (3)  
  • Currently 1.00 / 5
  You rated: 1 / 5 (2 votes cast)
[2,631 views]  View Printable Version