Other stuff‎ > ‎

OSX notes


Keynote

Useful link to keyboard shortcuts: http://www.apple.com/support/keynote/shortcuts/

Especially useful the movies control:

   Action                                                                           Shortcut
Rewind movie (by frame if paused)          J (hold down)
Pause or play movie                        K
Fast-forward movie (by frame if paused)    L (hold down)
Jump to beginning of movie                 I
Jump to end of movie                       O


Change metadata in PDFs


Focus follows mouse

defaults write com.apple.Terminal FocusFollowsMouse -string YES


Mac OS X boot

sudo /usr/sbin/nvram boot-args="-v"

The -v flag tells the system to boot verbosely. You can get the same result by holding Command + V at boot time, but that will only work the one time. Modifying the boot-args will cause Mac OS X to always boot verbosely from now on.
To turn it off:
sudo /usr/sbin/nvram boot-args=

Show hiddens stuff in Finder

To switch on full view, in the Terminal type:
defaults write com.apple.finder ~AppleShowAllFiles TRUE

and then:

killall Finder

Various how-to

Detach widgets from the Dashboard 
http://www.macosxhints.com/article.php?story=20050422172929402
Add a 'recent things' stack to the Dock
http://www.macosxhints.com/article.php?story=20090902223042255
Show full directory path in Finder window title bars
defaults write org.x.X11 app_to_run /usr/bin/true
Prevent XQuartz from opening terminal:
defaults write org.macosforge.xquartz.X11 app_to_run /usr/bin/true
(http://xquartz.macosforge.org/trac/wiki/X11-UsersFAQ#Suppressingxtermlaunchingbydefault)

Triple boot, OSX-WINXP-Ubuntu

After trying everything, after repeating every kind of combination in subsequent installations that kept me busy for two days, this is how it worked for me (on macmini 2,1, for osx snow leopard, windows xp, ubuntu 9.1):

- Make sure you use Leopard and have it updated (10.5.2).
- Start BootCamp and create a partition for Windows XP (15G is enough).
- Don't install it through Bootcamp.
- Insert Windows CD and reboot holding C when you hear the beeping sound.
- Windows installation should start, follow the usual installation process of Windows.
- If it reboots during installation, you press ALT during reboot so that you can pick Windows installation.
- After Windows is installed, insert your Leopard DVD and it should install all your Apple drivers and stuff.
- Update your Apple Software (there will be an option on the start menu to do so).[ ] Update Windows XP.
- Now that Windows is installed, get back to MacOS, we are going to install Linux now.
- Start Disk Utility and create a new partition on Machintosh HD, name it Linux
- Insert Linux CD and reboot holding C
- On Linux installation, delete the partition you created (Linux) because its HFS, and set it as ext3 and mount /. Don't create swap (I know its going to warn you, but ignore it).
- At the last step of setup, click advanced because you need to change where GRUB is going to be installed, choose sdaX (which X is your Linux partition).
- Let it install Ubuntu.[X] Get back to MacOS, install rEFIt, reboot and run the partition manager of rEFIt, which should take care of every detail of booting for each OS.
- If XP was installed before the partition change, it will need boot.ini to be edited to change its partition from 3 to 4.

And the most important thing is perhaps that I copied the above from here: https://help.ubuntu.com/community/MactelSupportTeam/AppleIntelInstallation
So it was out there already!

Apple script to combine Word documents


set theItems to {}
set x to 0
repeat until (count of theItems) > 1
set theItems to choose file with prompt "Select two or more Word documents." with multiple selections allowed without invisibles
if (count of theItems) < 2 then
display dialog "Please select at least two Word documents." buttons {"OK"} default button 1
end if
end repeat
set theItems to only_doc(theItems) -- check files type
set theItems to reverse of ~ASCII_Sort(theItems) -- sort files alphabetically
tell application "Microsoft Word"
activate
make new document
repeat with aFile in theItems
tell application "Finder"
set fileRef to ((a reference to file aFile) as string)
end tell
insert file at text object of selection file name fileRef
if x < ((count of theItems) - 1) then
insert break at text object of selection
end if
set x to x + 1
end repeat
end tell
on only_doc(my_list)
set cleanList to {}
repeat with i from 1 to count my_list
set filetype to type identifier of (info for file ((item i of my_list) as string))
if filetype = "com.microsoft.word.doc" then
set cleanList's end to my_list's item i
end if
end repeat
return the cleanList
end only_doc
on ~ASCII_Sort(my_list)
set the index_list to {}
set the sorted_list to {}
repeat (the number of items in my_list) times
set the low_item to ""
repeat with i from 1 to (number of items in my_list)
if i is not in the index_list then
set this_item to item i of my_list as text
if the low_item is "" then
set the low_item to this_item
set the low_item_index to i
else if this_item comes before the low_item then
set the low_item to this_item
set the low_item_index to i
end if
end if
end repeat
set the end of sorted_list to the low_item
set the end of the index_list to the low_item_index
end repeat
return the sorted_list
end ~ASCII_Sort

Copy and paste into Script Editor, and save it as an application (File: Save As, Format = application) in a convenient location. When you launch it, a dialog will prompt you to select two (or more) Word documents. Hold down the Command key, and click on each document you'd like to combine.

When you click Choose, Word will open and then create a new document holding the combined content of each of your chosen files.

Convert complex Word documents to PDFs

When users make the documents multi-section, and change the page layout between sections, if you use the standard PDF button in the Print dialog box, it outputs multiple files, creating a new PDF document for each time the page layout changes. So if you go from portrait to landscape and back, you get three documents. 

The solution:
Click on the Preview button instead of the PDF button. It will generate a single PDF file with the correct page layouts and open it with Preview. Then all you have to do is save the resulting PDF.

Reset the parameter random access memory (PRAM) and nonvolatile RAM (NVRAM)

http://docs.info.apple.com/article.html?artnum=2238

1. Shut down the computer.
2. Locate on the keyboard: Command, Option, P, and R. Hold these keys down simultaneously in step 4.
3. Turn on the computer.
4. Press and hold the keys Command-Option-P-R. Press this key combination before the gray screen appears.
5. Hold the keys down until the computer restarts and you hear the startup sound for the second time.
6. Release the keys.

Play unplayable AVI/WMV filesWorkaround

1. Open up VLC and make sure there's nothing in the playlist.
2. Press the Play button, click Browse, and select the troublesome video file.
3. Click the checkbox that says 'Advanced output' and press the Settings button.
4. In the sheet that comes down, make sure that the 'Play locally' checkbox is unchecked, select the Stream radio button, and choose MMSH from the pop-up list. Make note of the port number (1234 by default).
5. Make sure that the Encapsulation Method is set to ASF and press the OK button. Press OK on the previous window as well.
6. Double-click on the file which should now be in the playlist (or just press the Play button). You should not see the file playing.

Now open up WMP and select File: Open URL (or press command-U). Paste this into the dialogue box: http://127.0.0.1:1234. The 1234 bit should match whatever you set in VLC; 1234 is the default. You should now be able to see the video. However, when I tried this, I did not get any audio; read on for the solution to that problem.

Convert FLAC files to m4a for iTunes