Macintosh Customizations

Terminal Settings (preferences)
  • Use the tcsh shell as the default. Select default login shell on startup tab
  • Turn on anti-aliasing for fonts under Settings -> Text
  • Select 12 pt. Monaco font under Settings -> Text

Login environment
  • Here is an example .tcshrc file for setting up your environment for the tcsh shell.
  • The file should be in your home directory and be named ".tcshrc"
  • The "." at the the beginning of the file name will make the file invisible in the finder.
  • Also see Terminal Settings above.

Terminal Script for Connecting to Linux Workstations
  • download these scripts and install in your unix path on Mac (maybe /usr/local/bin or your local scrips folder if you have one) and make executable (chmod +x filename)
  • general host script: ssh_login
  • specific host script: ssh_hostName
  • from Terminal application preferences, first adjust display settings the way you want
  • in preferences -> Shell Tab, check “Run command” box and enter following text in entry field
  • ssh_login; exit
  • where ssh_login is the name of the script file on Mac, including its path
  • save .terminal file using the “Export Settings” item under the “Shell Menu”
  • Put wherever you want and double click on file to start terminal with these settings.

Activate tcp wrappers so only specified computers can connect to Mac
  • You may have to enable root access to do the following, or use the sudo command
  • Create a text file /etc/hosts.deny that will deny access to all computers not listed in next file. The file contents should be the following
  • ALL: ALL
  • Create another text file /etc/hosts.allow that contains a listing of computers that can connect to Mac, one on each line
  • ALL:
  • Now you can activate remote login and ftp access using the Sharing system preferences. Users that are allowed access will now only be able to connect from the specified hosts.
  • Note that this does not affect personal file sharing.

Firewall and Security settings
  • In SystemPreferences -> Security, start the firewall
  • You may also want to enable “Stealth” mode under Firewall -> Advanced
  • Keep “Block all incoming connections” UNchecked under Firewall -> Advanced
  • In SystemPreferences -> Sharing check those services that you need, such as personal file sharing, remote (ssh) login

Make an application executable from a terminal command line
  • This also enables you to have more than one instance of an app open at the same time
  • Example for chimera molecular modeling program, but works for most applications including nmrview
  • Use an editor to create a file called "chimera" in the /usr/local/bin directory
  • The file should contain the path to the executable, like this
  • /Applications/ &
  • Make this file executable with "chmod +x chimera"

Modifications to X11 (OS X 10.5)
  • Leopard (10.5) X11 works a little differently. There is no xinitrc. So do not implement the 1st item in the list above. Also do NOT set variable DISPLAY in login script.
  • Do not manually start X11 unless you need to start a remote session. Instead, X11 will automatically start whenever you start a Mac application that needs X11. -> launch on demand

Older Mac OS-X Versions

Modifications to X11 (OS X 10.4)
Keep xterm window from appearing every time X11 starts up (10.4 and earlier only)
  • edit /etc/X11/xinit/xinitrc OR copy this file to your home dir and name it .xinitrc
  • scroll down to where it starts up xterm and comment out this line
Disable dialog that asks if you want to quit X11 every time you try to quit
  • type the following in a terminal window
  • defaults write no_quit_alert true
Enable focus with pointer instead of having to click in an X11 window
  • type the following in a terminal window
  • defaults write wm_ffm true
Enable click thru so mousing in spectral window works
  • type the following in a terminal window
  • defaults write wm_click_through -bool true
add DISPLAY variable to login environment (10.4 and earlier only)
  • edit .tcshrc file in home dir and add following line
  • setenv DISPLAY :0.0
  • you may need to add computer name like this

Allow x-window connections by creating an entry for it.

  • In SystemPreferences -> Sharing, click on new
  • select other for port name and enter X-windows
  • enter 6000-6050 into the TCP port numbers box
  • click OK and then finally check the X-window entry in the firewall panel to activate it
  • You may want to block UDP traffic and enable stealth mode in the advanced firewall window