Fixing iPhoto Issues

October 31st, 2008

Quite a few people I have meet have issues with iPhoto. One of the first things to try with regards resolving such issues is to follow these Apple knowlage base instructions.

Basically, you backup the iPhoto Library and then launch iPhoto while holding down the ‘Command’ and ‘Option’ keys. This then presents you with a dialog box with various options for repairing the iPhoto library.

Setting up commands to enable and disable safe sleep mode

October 19th, 2008

If you add the following lines to the file “~/.profile“. Then you can easily enable or disable safe sleep mode from a standard user account.

# Safe Sleep
alias safesleep_enable=’osascript -e “do shell script \”sudo sudo pmset -a hibernatemode 1\” with administrator privileges” 2>/dev/null’
alias safesleep_disable=’osascript -e “do shell script \”sudo sudo pmset -a hibernatemode 0\” with administrator privileges” 2>/dev/null’

Then you can use the commands “safesleep_enable” or “safesleep_disable” to change this pmset option. You will be prompted for an administration user name and password. This is because changing this option requires administrator authentication.

Running SSH on Multiple Ports (Mac OS 10.4.x)

October 18th, 2008

This hint provides various useful information for setting up SSH to listen on multiple ports.

Before editing any configuration file make a backup of the file.

Below is a summary of the helpful posts :

Step #1 :

Add an entry to /etc/services such as ssh2, pointing to a second port. For example add the following to /etc/services:


ssh2              10022/udp
ssh2              10022/tcp

Step #2 :

Find the following lines in the ssh.plist file:


Sockets

Listeners

Add new lines as shown below, with the new lines marked with “+”:


Sockets

+ Alternate Listeners
+ 
+ SockServiceName
+ ssh2
+ 
Listeners

If you want more then two port numbers, just change “Alternate Listeners” in the first new line to something unique, and duplicate the 5 additional lines again.

Step #3 :

Execute the following commands to restart SSH.


service ssh stop
launchctl unload /System/Library/LaunchDaemons/ssh.plist
launchctl load /System/Library/LaunchDaemons/ssh.plist
service ssh start