@apple4us typical "wolf's coming" for the gov has done 2 much evil. Hard 2 believe not related 2 them. Haha.

Archive for the ‘Tips of’ Category

Turn off MacBook LCD when lid is open while connecting to external display in OS X Lion

Wednesday, September 14th, 2011

MacBook And Cinema Display

I guess you know what I’m talking about. Let’s go to the solution directly first:
Go to Terminal and input the command as follows, press Enter, input password as needed.

sudo nvram boot-args="iog=0x0"

Restart and try it out!
When you want to get back to Lion’s default state, use this command:

sudo nvram -d boot-args

If experiencing problem when restart, restart again and press ⌘, ⌥, P, R together to reset PRAM. (Not sure how to fix this yet, as I guess, it works only for Nvidia video card? Check your MacBook’s specification.)

And here’s why we are doing this:

I found a lot of people have the same habit as me that, we don't want extended desktop because the mouse always travels to some places that hard to find or something like that. So we connect external display to MacBook, close the lid to put system to sleep, then activate display by external mouse or keyboard, then open the lid to keep the MacBook cool. In Snow Leopard age, doing such a thing, the MacBook's LCD won’t wake up when you open the lid. But in Lion, it will turn on automatically.

Fortunately, we can always do some tricks in Terminal like before. Thanks to chenga.8@hengdm, @hello_kukoo, @apple4us to provide the useful tip.

jitouch, the Solution for Multi-touch Gestures of OS X Lion

Wednesday, August 31st, 2011

 

jitouch

A lot of people find that backward/forward multi-touch gestures in Snow Leopard for Finder, iTunes, web browser like Chrome/Firefox, are not available any more in Lion. I wrote a solution for that in July. Later in August, the solution is not working due to the update of 10.7.1.

MagicPrefs is the software I recommended before, which is free, and gives so many gesture functions for trackpad, Magic Mouse. A few days ago I found another software, jitouch, which shows you the new definition of Multi-touch Gesture. It presents dozens of new gestures that you can define for dozens of functions.

Firstly, solve the backward/forward problem.

I know this is what you came here for. Please follow me, we take MacBook built-in trackpad as example:

  1. Download jitouch here and install it.
  2. Go to System Preferences - Trackpad. In tab Point & Click, uncheck the box “Three finger drag”. Maybe you would like this on. But it may cause some mis-selecting text in backward/forward action, you can take a try later. Your choice.
  3. In tab More Gestures, make sure Swipe between full-screen apps is with the option Scroll left or right with FOUR fingers. It ensures that swipe with 3 fingers gesture is not occupied by system.
  4. You can find jitouch setting in the bottom Other group of System Preferences. Click into it. In Trackpad tab, make sure Enable jitouch for Trackpad is checked. In the list box below, find out Three-Swipe-Left/Right. If there’s no, click “+” button to add it. Relate it to Keyboard Shortcut: CMD+[ (for Left)  and CMD+] (for Right) and save it.
  5. Make sure there’s no conflict between system and jitouch setting.
  6. Open Finder, iTunes, Chrome... and take a try!

Ok, why jitouch?

I feel, compare to MagicPrefs, the sensitivity of jitouch is more accurate. You can see a * . Meanwhile, MagicPrefs could do the same thing and MagicPrefs is FREE! Still, your choice.

And any other tips?

  • Don’t make yourself confused by adding too many gestures. Even if you can remember, if you are using different computers in company and at home, relying on so many convenient functions makes u suffer in the other place (esp. Windows. In the mean time, I say, Go Geeks, Go! :D ).
  • The gestures of “n-Fix other-Tab” in jitouch is brilliant, default setting of “Previous Tab / Next Tab” etc. is quite handy. Don’t waste it.
  • Cheers for keeping the “Smooth History (Official name: Swipe to navigate)” of Safari (maybe in some other apps too? I’m not sure yet) and “backward/forward” of Chrome together. Yeah!

ColorSync Profile for Dell U2410 on MacBook Pro

Wednesday, August 17th, 2011

Change ColorSync Profile
Dell U2410 is a great monitor in 24 inches, with vivid color, convenient UI. When using it with my Macbook Pro, I found it too bright and the default color setting is not so good. I adjusted the color in comparison of MacBook Pro's own LCD. And here is the Dell U2410 ColorSync Profile for MacBook Pro. Follow the steps below you may feel better with your U2410's color.

  1. Download and unzip the file to /Library/ColorSync/Profiles/Displays (change the unzipped filename if you want).
  2. Press the menu button on U2410 and change the settings to:
    Brightness - 70
    Contrast - 100
    Color Settings - Input Color Format - RGB; Gamma - MAC; Mode Selection - Graphics; Preset Modes - Adobe RGB
    Display Settings - Sharpness - 50
    (BTW, I'm using miniDisplay->DVI adapter to connect to U2410)
  3. Go to System Preferences -> Displays. In Dell U2410 window, choose "Color" tab, you may find "Dell U2410 (tkjune)" in the left list. Click it.

The color of your monitor should now change. Is that okay? If not, you still have to "Calibrate..." by yourself. Don't worry it's quite easy with the guide of Apple Display Calibrator Assistant. Only that you may have to do it several times to find out your favorite mode. Tips for you: Open same application window, same photo in both monitors and calibrate step by step. To make the U2410's color exact same with MacBook Pro's LCD, you win.

Disable update checking of WordPress 3

Sunday, August 14th, 2011

WordPress Update Check
When you designing a website for client with WordPress, you may not want your client click the "Upgrade" button for any reasons (mostly, by curiosity). We all know that it may cause unusable of customized theme. Here's how to disable it. Open functions.php of your theme and add following lines.

  1. add_filter('pre_site_transient_update_core', create_function('$a', "return null;")); // screening core update
  2. add_filter('pre_site_transient_update_plugins', create_function('$a', "return null;")); // screening plugin update
  3. add_filter('pre_site_transient_update_themes', create_function('$a', "return null;")); // screening theme update

Or

  1. remove_action('admin_init', '_maybe_update_core'); // forbid wp_version_check();
  2. remove_action('admin_init', '_maybe_update_plugins'); // forbid wp_update_plugins();
  3. remove_action('admin_init', '_maybe_update_themes'); // forbid wp_update_themes();

The second method is recommended that it removes the function in grain.

Disable window pop up animation in Mac OS X Lion

Thursday, July 28th, 2011

Fully agreed with some reviews of Mac OS X Lion that, pop up window animation is quite annoying. Luckily it also provides a way to disable it with Terminal.

In Terminal, paste command below and press enter:

defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool NO

UPDATE on Aug 13,2011: Try Lion Tweaks to make it more easier. You can change many other hidden settings with it too.

Pop up window animation in Lion

Using magic mouse 2 fingers swipe in Chrome/Firefox in Lion

Tuesday, July 5th, 2011

UPDATE on Sep 15th:

If you don't want to use any other 3rd party software, it still can be done. Take Trackpad as example: Keep the default setting no change (2 fingers for Safari smooth history, 3 fingers for full screen app switch), when going forward or backward in Chrome or Firefox etc., press ALT(OPTION) key while swiping with 3 fingers. Thanks to Alejandro to provide the useful tip!

UPDATE on Aug 31st:

jitouch, the Solution for Multi-touch Gestures of OS X Lion

IMPORTANT UPDATE on Aug 21st:

After upgrading to 10.7.1, solution below does not work anymore. If you want forward/backward back, try using MagicPrefs. I'm testing. Again, you cannot use 2 fingers swipe of Trackpad (1 finger for Magic Mouse) go back and forth in Chrome, Finder, iTunes, Firefox and so on in 10.7.1 without help of 3rd party software's help.

Just upgraded to Mac OS X Lion. A lot of new features come with some habits you may have to change. For example, the smooth browsing backward/forward experience in Safari together with no functioning of magic mouse's 2 fingers swipe for backward/forward in Chrome/Firefox or other web browser or applications.

You may have same habit with me, on using magic mouse:

  • Use 1 finger to scroll around (few webpages scrolls left to right, but they exist)
  • Use 2 fingers to go backward/forward
  • The 2 habits above apply to all browsers Safari, Chrome, Firefox and Opera, etc. Oh, and Finder.
  • Some other applications may need this too, like in Sparrow, to fold and unfold a mail

When upgrading to Lion, something changed as follows by default:

  • Use 1 finger to go backward/forward in Safari. (Yes, it's moving smoothly, nicely, elegantly...)
  • Use 2 fingers to move to different desktop in "Mission Control"
  • Cannot go backward/forward in other favorite browsers. Oh, and Finder.
  • Cannot fold/unfold a mail in Sparrow either.

And here's the solution(with which, you need to give up something):

  1. Open Magic Mouse setting in System Preferences
  2. In More Gestures tap, click the drop down list under Swipe between pages and choose Swipe left or right with two fingers
  3. Uncheck the Swipe between full-screen apps

Now you get your old 2 fingers gesture for magic mouse back, and you give up smooth moving backward/forward in Safari -- you can still move backward/forward in Safari, just not smoothly.

Wait a minute, how about the "Swipe between full-screen apps"? If you really need that and don't mind to use 3 fingers to swipe for this, you can use MagicPrefs, which provides you so many different actions for Magic Mouse, Magic Trackpad, Macbook Trackpad. You can define a 3 fingers swipe gesture to "Switch Space Left/Right", and it's free, Hallelujah!

For smoothing moving backward/forward in Safari, if only one finger swipe can be applied to it, I have to give it up. One reason is as above, the other is, it may cause some mis-action when browsing. Hope apple could give a update for magic mouse 2 fingers gesture later.

Mac OS X hotkey table for print

Sunday, March 6th, 2011

It's so convenient to use Mac when making full use of hotkeys. I found the most used hotkeys list and made a table, which can be printed on 2 pages of A3 paper. It can be the quick reference for Mac newbies.

Click images below to zoom and save.

Mac hotkey table page 1

Mac hotkey table page 2

WordPress auto upgrade in Mac local environment

Saturday, April 17th, 2010

When I test WordPress in local Mac OS X, the auto upgrade function is not available. It shows up like below:

Connection info needed

Here describes reasons and solution. But it doesn't work in my situation: Using XAMPP to set up the testing environment. Another solution were provided in comment 44 by Johan L. It works alright!

Do as follows:

 

To set up file ownership correctly:
In WP root directory
chown -R yourusername:apachegroupname *
In my case...
chown -R johan:apache *

find . -type d -exec chmod 770 {} ';'
find . -type f -exec chmod 660 {} ';'

WP 2.8: add
define('FS_METHOD', 'direct');
define('WP_TEMP_DIR', ABSPATH.'wp-content/tmp');
in wp-config.php
The function in file.php reads FS_METHOD and the tmp file creation test is never executed.
Make sure the wp-content/tmp directory exists and is writable by the apache user

Pre WP 2.8: well... you may need to patch the function in file.php by removing the if statement before $method='direct';
see comment #38 above
Only do this if you're sure you've setup file ownership correctly.

BTW the three numbers in chmod describe rights for "user", "group" and "others". read==4, write==2, execute==1. Sum of rights make up the number. Hence 777 means read, write and execute for user, group and others. 660 means read and write for user and group, no rights for others.

NEVER do a chmod 777 on any file or directory. NEVER recommend anyone to do it either!

Note that it's better to upgrade to 2.8 and above first.

The key is the two lines in wp-config.php.

Thanks Johan L.

Shortcut of locking Mac's screen

Wednesday, January 13th, 2010

CTRL+SHIFT+EJECT
Works in Snow Leopard.
Note: Before that, check the General tab on the Security System Preferences panel to ensure that the "Require password [some period] after sleep or screen saver begins" box is checked.
Lock screen

Snagit the screen capture tool

Friday, January 8th, 2010

I introduced Paparazzi! to capture the whole webpage until Ray recommended Layers by Wuonm. Now I just got Snagit from TechSmith, another screen capture too. From the video introduction, it looks good. Will try it out later.