How to enable Syslog on iPhone fw 2.x for debugging

news 7 Comments »

You can no longer debug output in 2.0 by launching your app from SSH. So how do you get those NSLog outputs? The answer is to enable the syslog and then you can use tail -f /var/log/syslog to see all the output. Here is how:

  1. edit /System/Library/LaunchDaemons/com.apple.syslogd.plist
  2. find the <string>/usr/…/syslogd</string> line
  3. below that add:
    <string>-bsd_out</string>
    <string>1</string>
  4. Type: echo '*.* /var/log/syslog' > /etc/syslog.conf (open /etc/syslog.conf and make sure that you have *.* /var/log/syslog without any extra characters)
  5. Type: launchctl unload /System/Library/LaunchDaemons/com.apple.syslogd.plist
  6. Type: launchctl load /System/Library/LaunchDaemons/com.apple.syslogd.plist

And now you have an awesome /var/log/syslog that contains NSLogs (and I think stderr) from your application.

Remember, to see the output open SSH and type: tail -f /var/log/syslog to see all the output.

Source of these info: TheBigBoss website, and originally from Saurik.

Here’s an output example… frack!

Mar 23 09:56:37 iPhosk com.apple.locationd[198]: 259491397.100,static void CLFileUpdate::onDownloaded(CLFileDownload*, bool, void*): could not download from https://iphone-services.apple.com/clbl/unauthorizedApps to /var/root/Library/Caches/locationd/clients-b.plist.temp

How to make a DVD copy backup of MAC OS X

news 41 Comments »

The following steps will help you create a perfect working (i.e. also bootable, indeed ) DVD copy of Mac OS X Leopard. I successfully followed this tutorial to backup the two InstallDVD that come in bundle with my MacBook.

Making a DVD Image

Step 1. Insert the retail Mac OS X Install DVD into your drive.

Step 2. Launch Disk Utility (Applications > Utilities).

Step 3. In Disk Utility, you will notice a white pane on the left hand side. In the pane, select the Mac OS X Install DVD by clicking on it once.

Step 4. Click New Image on the Disk Utility toolbar.

Read the rest of this entry »

How to open a new finder window from current location

news 13 Comments »

A pretty handy tip I picked up from the Mac OS X Hints useful if you tend to open multiple Finder windows for organising/moving folder/files on the Mac OS X. This script helps to reduce the time after you open a new instance of Finder (ctrl + N) and navigate through endless sub-directories to reach the folder you want.

In more details, this Applescript gets the location of the front-most Finder window and opens a second instance of Finder with the same path and view. If there is no Finder windows at the present when this script is executed, it launches a new Finder window at the system root directory (or any other pre-defined target path).

Read the rest of this entry »

How to change default file format for Grab.app on OS X

news 7 Comments »

A quick way of changing the default file format for Grab.app (or “Command + Shift + 4″ short-cut) from .tiff to other formats such as .pdf, .png, or .psd etc…
Choose any of the following line and paste it in your Terminal window and press the return key, that’s it.

defaults write com.apple.screencapture type png
defaults write com.apple.screencapture type pdf
defaults write com.apple.screencapture type jpg
defaults write com.apple.screencapture type tif
defaults write com.apple.screencapture type psd

By the way, here is a list of short-cuts for making a screenshot quickly:

Read the rest of this entry »

Mac OS X: How to prevent .DS_Store file creation over network connections

news 1 Comment »

To configure a Mac OS X user account so that .DS_Store files are not created when interacting with a remote file server using the Finder, follow the steps below.
Note: This will affect the user’s interactions with SMB/CIFS, AFP, NFS, and WebDAV servers.

Open the Terminal.
Type:
defaults write com.apple.desktopservices DSDontWriteNetworkStores true
Press Return.
Restart the computer.

If you want to prevent .DS_Store file creation for other users on the same computer, log in to each user account and perform the steps above—or distribute a copy of your newly modified com.apple.desktopservices.plist file to the ~/Library/Preferences folder of other target users.

These steps do not prevent the Finder from creating .DS_Store files on the local volume.

How to enable mouse scroll under VMware guest

news No Comments »

In case where using guest Linux under VMware, mouse scroll does not work.
To fix this, open terminal and type the following:
$ sudo gedit /etc/X11/xorg.conf
Then find “InputDevice” section with Identifier “Configured Mouse”
Change Option “Protocol” “ps/2″
to
Option Option “Protocol” “IMPS/2″
Last restart X using Ctrl + Alt + Backspace.

© 2000-2007 by fosk & powered by Wordpress themed by N.Design Studio