Thursday, December 24, 2009

Tip: X-Window Display on localhost from Remote system (UNIX/Solaris/Linux/OS X)

X-Window display on local host with known hostname or IP address:

  1. Confirm remote host has Xaccess configured to allow remote connections.

    Note:The file is located in /etc/dt/conf/ on Solaris 9

  2. Type on the local host:

    X -query <hostname or IP address>

Tip: Resetting Enviroment Variables without Logging Out (UNIX/Solaris/Linux/OS X)

To reset environment variable changes in bash without logging out

source ~/.profile

Confirm changes by:

set | grep <changed parameter>

Tip: XDMCP using Cygwin (UNIX/Solaris/Linux/OS X)

XDMCP to a UNIX system using cygwin

XWin.exe -kb :0 -query [hostname or ip address]

Tip: Redirect Output to a tty (UNIX/Solaris/Linux/OS X)

Redirect ouptut to tty using the following command:
script -a /dev/null | tee /dev/pts/XX

Four Paths of Yoga

  • Karma – Active Path (service to others)
  • Jnana – Philosophical Path (often the hardest)
  • Raja – Scientific Path (Ashtanga)
  • Bhakti – Devotional Path

Sunday, December 20, 2009

OS X Startup Commands

Keystroke
Description
X
Start OS X in Forced Mode
<option> + <command> + <shift> + <delete>
Bypass primary startup volume and seek a different startup volume (such as a CD or external disk).
C
Start up from a CD that has a system folder.
N
Attempt to start up from a compatible network server (NetBoot).
R
Force PowerBook screen reset.
T Start up in FireWire Target Disk Mode.
<shift> Start up in Safe Boot Mode. Temporarily disable login items and non-essential kernel extension files (Mac OS X 10.2 and later).
<shift> (held until second restart) Boots into "Safe Boot" mode, which runs Disk First Aid. The system will restart on completion.
<command> + V Start up in Verbose Mode.
<command> + S Start up in Single-User Mode. The results in UNIX command line.
<option> Boot into Open Firmware.Select a boot device.
<command> + <option> + P + R Reset Parameter RAM (PRAM) and non-volatile RAM (NVRAM).
(mouse button clicked and held) Eject (internal) removable media.

Monday, December 14, 2009

How to Repair plist files on OS X

To repair Preferences (.plist) files use the following command:
sudo plutil –s ~/Library/Preferences/*.plist – User Preferences
or
sudo plutil –s /Library/Preferences/*.plist – System Preferences

Translating Line Feeds for Mac OS X, UNIX, and Windows

I have been asked to show how to translate line feeds between Mac, UNIX, and Windows. This comes up often so here is one way using PERL which was designed to do just what we need.
  1. How to translate Mac OS file linefeed to UNIX linefeeds:

    perl -pi -e 's/\r/\n/g' file_with_mac_linefeeds.txt

  2. How to translate UNIX file linefeeds to Mac OS linefeeds:

    perl -pi -e 's/\n/\r/g' file_with_unix_linefeeds.txt

  3. Translate a Windows file linefeeds to UNIX linefeeds:

    perl -pi -e 's/\r\n/\n/g' file_with_win_linefeeds.txt

  4. Translate Windows file linefeeds to Mac OS linefeeds:

    perl -pi -e 's/\r\n/\r/g' file_with_win_linefeeds.txt


I hope this is a real time saver. Let me know!

Loading /etc/hosts into NetInfo (OS X 10.4 Leopard)

You can load your /etc/hosts file into NetInfoManager's database using the following command.
niload -m hosts < /etc/hosts

OS X Account Settings Panther and Leopard (10.3/10.4)

OS X (10.3)

Accounts will not appear in the account list unless UID values are above 500.

OS X (10.4)

To hide an account:
sudo defaults write \
/Library/Preferences/com.apple.loginwindow \
HiddenUsersList -array-add account1

This will hide the user names, but has the side effect of adding a login called Other…

To prevent the Other login from appearing use:
sudo defaults write \
/Library/Preferences/com.apple.loginwindow \
SHOWOTHERUSERS_MANAGED -bool false

To unhide all the names you may have previously hidden, you could execute the following from the command line.
sudo defaults delete \
/Library/Preferences/com.apple.loginwindow \
HiddenUsersList

iPod Disk Scan

I was looking through some old notes on my computer and found these notes on how to scan the disk on your iPod (1st and 2nd generation).

The iPod has the ability to scan its hard drive for errors and repair some of those errors. If you suspect your iPod's drive has issues, try scanning the disk.

  1. Make sure the iPod is plugged, or is charged.
  2. To do so, reset the iPod, and when you see the Apple logo, press and hold the Previous, Next, Select, and Menu buttons. 
Note: An animated icon of a disc will appear along with a progress bar.

This test can take a long period of time (15-30 minutes).