BlogGalleryAbout meContact

Mac OS X: a few useful tips

1. Let Menu Bar show today's Date The Mac OS X Menu Bar shows time and the day of the week, but doesn’t show the date information. To show today's date on the Menu Bar, do the following:
  • System Preferences -> International -> Formats
  • Select Dates and click “Customize”; choose one of your preferred date format; highlight and copy the date part (use Command-C to copy); click “Cancel”
  • Select Times and click “Customize”; choose Medium; paste the example date just copied in front of the time; click “OK”
2. Stop Mac OS X from automounting all the drives Mac OS X normally automount all partitions it recognises at boot time. Sometimes you may not want this to happen (e.g. you have Windows XP, Tiger and Leopard installed, when you boot one OS, you don’t want the others to be automounted).

This can be resolved using the file /etc/fstab. This file may not exist, so you may need to create this file. First, find out the partition’s volume name when mounted, e.g. Windows XP is mounted as winxp (on your desktop, or /Volumes/winxp), Tiger as tiger, and Leopard as leopard.

When you are booted into Leopard, if you don’t want winxp and tiger to appear on your desktop (suppress automounting), issue the follow command:
sudo pico /etc/fstab
and add the following content:
LABEL=winxp none ntfs ro,noauto
LABEL=tiger none hfs rw,noauto
3. Set up PPTP VPN System Preferences -> Network; click “+” on the bottom left and choose VPN as “Interface”; provide server’s IP address/username/password (this information is provided by your company); optionally add a DNS server’s IP address used within your company (e.g. 192.168.254.1) (this would help resolve links on your company’s Intranet).

4. Use Adium for email notification Adium can be used as an email notification too for all your hotmail, yahoo, google mail accounts, even if you don’t use it to chat with your friends.

Start up Adium; Preferences -> Accounts; double click on an account (you can add all your accounts) -> Options -> check “check for new mail”.

Now you need to create new mail notification event: Preferences -> Accounts -> Events; double click “New Mail Notification” -> choose an action (e.g. “Bounce the dock icon” “Repeatedly”).

5. Extended attribute com.apple.quarantine Sometimes when you download an application (e.g. useful.app) from the Internet, Leopard may add an extended attribute com.apple.quarantine to the application package, and you may have difficulty to run the application.
Issue the follow command at a terminal:
ls –ld useful.app
You will see something like this “drwxr-xr-x@”. The trailing @ indicates some extended attribute on the package.

Issue the follow command at a terminal:
xattr useful.app
You will see “com.apple.quarantine”

You can remove the attribute by issuing the following command (if the file/package is owned by root/admin, add sudo to the command):
xattr –d com.apple.quarantine useful.app
The attribute is likely set for all contents within a package (e.g. .app, .kext). In this case, run the following command:
find useful.app –exec xattr –d com.apple.quarantine {} \;
 Permalink

Mac OS X (Leopard): change time machine backup interval

Objective: to set up a flexible schedule (instead of hourly) for automatic Time Machine backup.

Problem: the Leopard Time Machine is default to an hourly backup schedule. You cannot change the backup frequency through the System Preferences Pane if you would like to backup more/less frequently.

Solution: manually modify the default value within com.apple.backupd-auto.plist. The file is located under /System/Library/LaunchDaemons/. Issue the following command at terminal to open the file and make changes:
sudo pico /System/Library/LaunchDaemons/com.apple.backupd-auto.plist
Find the default value 3600 (seconds) and change it to 7200 if you would like it to backup in 2-hourly intervals (or 1800 for half-hourly backup). Ctrl-O to save the file and Ctrl-X to exit editing. The changes should take effect after reboot.
Comments (1)  Permalink

Mac OS X: file sharing made easy

Objective: to work around Mac OS X's inadequate built-in file sharing facility.

Problem: Mac OS X's built-in file sharing is inadequate: with Tiger, you can only share a user's home directory; although Leopard now allows you to share any folders on your Mac machine, it does not give you ability to fine tune the access control. More over, you need to remember the names of all shares you have created.

Solution in brief: just create soft links to all the folders you would like to share in your home directory. This way, sharing your home directory also enable you to share any other folders on your Mac OS X.

Solution in detail: Why not create soft links to all the folders you would like to share, and put these links to a central place within your home directory? The soft links will be resolved to the actual folders when the shares are accessed over a LAN.

Say you would like to share the follow folders/volumes: /Volumes/data, /Volumes/backup, and /Volumes/media/videos.

Step 1: enable file sharing - System Prefences -> Sharing, check "File Sharing", click "Options...", check "Share files and folders using SMB" if you would like to enable Windows or Linux to securely access the shares, check your account name (e.g. john), click "Done".

Step 2: create a directory (e.g. share) within your home directory to hold all the shares - type the follow command in a terminal (NOTE: change john to your user name):
mkdir /Users/john/share
Step 3: create soft links for the shares - type the follow commands in a terminal:
cd /Users/john/share
ln -s /Volumes/data/ data
ln -s /Volumes/backup backup
ln -s /Volumes/media/videos videos
It's done. On a Windows machine, you can map the share, say your Mac machine's IP is 192.168.0.2. Map a network drive with \\192.168.0.2\john, provide your user name (i.e. john in this example) and password. Now you'll be able to access all shares within the share folder.
 Permalink

Windows: file sharing without setting up a share

Objective: quick and easy access to files on a Windows machine over a LAN.

Problem: Say you have laptop running Mac OS X, Ubuntu, or Windows XP/Vista, and you would like to quickly grab some files from a PC running Windows 2000/XP/Vista on the same Local Area Network (LAN) at home or at work.

Solution in brief: There is a hidden share for each drive under Windows (e.g. C$ for C:, D$ for D:). Simply connect to one of these shares to access files you need. You need to provide admin user name and password. Under Mac OS X or Linux, you would use "Connect to Server..."; under another Windows, you just use "Map Network Drive...". Find out the target Windows machine's IP address and off you go!

Solution in detail: There is no need to login to your Windows machine and set up a share for this purpose. There is a hidden share for each drive under Windows. That’s right, there is a hidden share C$ for drive C:, D$ for D:, and so on. These shares are enabled by default for administrative purposes. You need to have an account with administrative privilege.

Step 1: find out the IP address of the Windows machine (type the command “ipconfig” from a terminal). Say the IP you got is: 192.168.0.2. You can also use the easy-to-remember machine name instead of the IP address on a LAN with all Windows machines.

Step 2: from the laptop connected to the same LAN, connect to one of the default shares of your Windows machine:
  • If your laptop runs Mac OS X, from Finder menu item Go->Connect to Server… (or Command-K for quick access), put smb://192.168.0.2/D$ in Server Address and click Connect, provide admin user name and password for the Windows machine when prompted (do not worry about the workgroup setting if you are running Tiger).
  • If your laptop runs Ubuntu 7.10, from menu bar Places->Connect to Server…, select windows share as service type, server: 192.168.0.2, share: D$ (if you leave this blank, you will be able to access all default shares on your windows machine), User Name: admin user name, leave the rest blank, click Connect, a folder named “D$ on 192.168.0.2” will appear on your desktop, double click you will be prompted for password (do not worry about the workgroup setting).
  • If your laptop runs Windows XP/Vista, open Windows Explorer, select menu item Tools->Map Network Drive…, put \\192.168.0.2\D$ in Folder section, click Finish button, and provide admin user name and password.
Step 3: you now have full read and write access to drive D: on your Windows machine. Be warned, your domain administrator can access any part of the local drives of your Windows machine connected to the LAN!
 Permalink

Fix your computer problems for free

I have always been interested in playing with computers and have accumulated some experiences fixing computer problems. I would like to have fun and meet new friends. Therefore I will offer the following services free of charge to people in need:
  • Boot: boot failure; multi-boot
  • Installation: operating systems (windows, linux, mac os x); software; virtual machine
  • Backup and data recovery
  • Malware removal
  • Home network: ADSL; home LAN; file/web server
  • Custom PC build: advice on selecting hardware; help put pieces together
I recently completed my PhD study (in computer science) and started working. I'm living in Manchester (UK), so this service will be only available to people in Manchester area. I can only work on this on Saturdays at home by appointment. Please drop me a message if you need help on your computing problems.

PS: Watch this place - I'll put some useful guides out soon!
 Permalink
1-5/5