When you cross the U.S. border, government officials can confiscate your electronic devices, search them, and keep them for a while for additional scrutiny, even when there’s no suspicion of wrongdoing. If you travel out of or into the United States, do yourself a favor and read the EFF’s comprehensive guide to what can happen, and what you can do about it. follow link
Sleep (and Lock) Your Screen
When you are walking away from your computer, it's fairly common practice to start your screen saver and lock your screen. But did you know that there is a built-in keyboard shortcut in Mac OS X to sleep the screen?
Press Control-Shift-Eject and your monitor sleeps without engaging the screen saver.
EFF Guide to Defending Privacy at the U.S. Border
To do this he does not need to have any reason, all he needs is to distrust or dislike you and to have his immediate supervisor back him up.
If you are not a U.S. citizen, you will want to arrange your electronic files so that you can be perfectly open and aboveboard at the border (and you will want to be pleasant and respectful no matter what).
Some years ago, Farley Mowat was denied entry. It happens that that Farley Mowat had been invited to the States to receive a literary award, and so was uniquely able to publicize his experience. He wrote a delightful book about it, "My Discovery of America." Mowat was barred on order from on high but now field officers with even less knowledge have the discretion to do the same.