Entries Tagged 'OS X' ↓

No internal speakers OS X Lion

I upgraded to Lion recently.  It screwed up a lot of things on my Macbook Pro 2010 15″ i7, so I clean installed Lion.  All has been going smoothly until today, when I came home from work and woke my laptop.  Fired up Spotify, and there was no sound.  Then I realized there were no internal speakers recognized.  Oh boy.

It’s late so I will cut to the chase.  I followed many posts in the Apple forums about permissions (always the first thing to try when something is amiss), PRAM reset, rename a plist key from false to true, etc.  You can read about that stuff here:

https://discussions.apple.com/thread/3192295?start=0&tstart=0

Nothing worked.  So I have an old Core2Duo 2007 mini, still with good ol’ Snow Leopard installed.  I grabbed the com.apple.audio.coreaudiod.plist file from it, copied the contents and pasted them into the Lion’s com.apple.audio.coreaudiod file.  Saved the file (you must do this from a sudo TextEdit session) and it worked.  Probably deleting the file and rebooting would also work but I didn’t try that.

Here are the commands in Terminal to type (thanks to Chaindler from AD), followed by my contents of the working file:

1. Open Terminal

2. Type this “sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit"

3. enter your password

4. In textedit open /System/Library/LaunchDaemons/com.apple.audio.coreaudiod.plist

5.  Copy all of the contents with command-a, and then paste them into a new file.  Save that file as a backup.

6.  Paste the following(everything between the start and end markers, but not the markers themselves):

******Start Marker—Do not copy this line**************************
<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE plist PUBLIC “-//Apple//DTD PLIST 1.0//EN” “http://www.apple.com/DTDs/PropertyList-1.0.dtd”>
<plist version=”1.0″>
<dict>
<key>EnableTransactions</key>
<true/>
<key>Label</key>
<string>com.apple.audio.coreaudiod</string>
<key>ProgramArguments</key>
<array>
<string>/usr/sbin/coreaudiod</string>
</array>
<key>KeepAlive</key>
<false/>
<key>MachServices</key>
<dict>
<key>com.apple.audio.coreaudiod</key>
<dict>
<key>ResetAtClose</key>
<true/>
</dict>
</dict>
<key>UserName</key>
<string>_coreaudiod</string>
<key>GroupName</key>
<string>_coreaudiod</string>
</dict>
</plist>

<?xml version=”1.0″ encoding=”UTF-8″?><!DOCTYPE plist PUBLIC “-//Apple//DTD PLIST 1.0//EN” “http://www.apple.com/DTDs/PropertyList-1.0.dtd”><plist version=”1.0″><dict> <key>EnableTransactions</key> <true/> <key>Label</key> <string>com.apple.audio.coreaudiod</string> <key>ProgramArguments</key> <array> <string>/usr/sbin/coreaudiod</string> </array> <key>KeepAlive</key> <false/> <key>MachServices</key> <dict> <key>com.apple.audio.coreaudiod</key> <dict> <key>ResetAtClose</key> <true/> </dict> </dict> <key>UserName</key> <string>_coreaudiod</string> <key>GroupName</key> <string>_coreaudiod</string></dict></plist>

******End Marker—Do not copy this line**************************

7. Save

8. Reboot

Good luck!

There was a problem installing “Mac OS X”. Try Reinstalling.

If you get this message after trying to clean install Lion from a USB drive (the install for me seemed to hang on my i7 MBP), you can try this as it worked for me:

1.  Power off the machine.

2.  Unplug the USB stick and power.

3.  Replace the USB stick, but in a different USB port.

4.  Hold down CMD-OPTION-P-R keys and turn the machine on (hold them until the machine reboots itself for a second BONG sound.)  This resets the PRAM, if you want to google it ;)

5.  Hold down Option and select your USB installer.

Should bring you to the familiar language selection screen.

Hope that helps.

PS-Hey Apple.  I applaud the diskless install, but why not let me choose clean install to begin with?  Restarting and “upgrading” just broke crap.  I broke more crap trying to get a fresh install.  Not easy.

OS X and Reading Text

Apple’s OS X allows you to zoom in on your screen in a number of different ways.  It also can read text to you, if you are so inclined.  There are many ways to do this, depending on which hardware choice you made.

If you have a track pad on your Mac, and it supports gestures (all Intel versions do, and some late G4 PowerBooks) you can simply spread two fingers apart on the track pad to have it zoom text.  To accomplish this with a mouse, If you’d like to zoom in on the entire screen rather than just make text bigger, hold down the control key (two keys left of the spacebar) and slide two fingers from the track pad’s button toward the screen.  A third option is to hold down command (⌘) and hit + to make text bigger.  Alternatively, command (⌘) – makes it smaller.

Even better, you can easily set up OS X to read selected text for you, using a keystroke combination that you define.  It comes in handy to select some text, and then let the computer read the selected text to you as you continue to browse around a site.  Naturally, if you cannot see the text to begin with, or have trouble reading from a screen for any number of reasons, this built in feature is priceless.

First, open System Preferences by clicking this icon in the Dock:  Screen shot 2010-03-14 at 12.18.27 PMIf it’s not in the Dock, open Finder, and find your Applications folder.  Navigate to System Preferences and double-click to open.  Once open, click the Speech icon, as shown below on Snow Leopard, it looks like a microphone:

Screen shot 2010-03-14 at 12.20.46 PMOnce there, check the box to “Speak selected text when the key is pressed”, then click on the Set Key button to create a keyboard shortcut to have the computer read text you have selected.  This allows you to also deselect the text, while the computer keeps reading it, which is a pretty nice feature.  You can then even navigate way from the page or text, and look at something else while you are listening to the text being read.

Screen shot 2010-03-14 at 12.26.21 PM

Moving Around in Vim

I’ve written a couple of beginning UNIX for OS X entries, such as creating a .bash_profile and .bashrc file using vim.  Here is another vim tutorial for moving around in the screen editor, so you can see just how powerful it’s commands can be.

This post will deal with mostly command mode, the default mode when you open vim (or an existing file with it.)  To move the command marker around the file without entering INSERT mode consists of four basic keys.  Moving to the next/previous word, to the beginning of a paragraph, etc. will require a bit more memorization.

You want to first familiarize yourself with the h, j, k, and l keys.  The outer two (on a standard keyboard) move your cursor left or right one-character;  h, to the left, and l to the right.  j will move your cursor up to the next line, while k moves it down one line.  The fact that you are in command mode means no changes are made to your text at this point.  You can use the arrow keys for the same functionality, but getting used to the keys will help you keep your hands where they belong–typing and editing text.

Moving to the beginning of the current line is done by pressing O (zero).  To move to the end of the current line press $+ moves your cursor to the beginning of the next line, and – moves you to the beginning of the previous line.

Next are some basic ideas for commands.  Some will take a number argument, followed by a command.  Some can be written with a number argument followed by another command.  For example, x in command mode means delete a character.  To delete a word, or the rest of a word if you are in the middle of one, you type dw.  If you precede x with a number, n, vim will delete the following n characters from the line.  The command to delete the next four characters would be written, simply, as 4x. To delete the next four words, you would type 4dw.

Vim is a very capable text editor once you learn more about its commands, and get used to bouncing between INSERT and command modes.  Below you can find a table of common commands and their function, at least enough to get you on your way as a skilled vim user.

Movement Command

Function

h

Move Left One Character

j

Move Down One Line

k

Move Up One Line

l

Move Right One Character

0

Move to First Character Of Current Line

$

Move to Last Character Of Current Line

+

Move to First Character Of Next Line

w

Move to Next Word or Punctuation Mark

W

Move to Next Word

e

Move to End of Current Word

E

Move to End of Next Word

b

Move Back to Beginning of Word or Closest Punctuation

B

Move Back to Beginning of Word

)

Move to End of Current Sentence

(

Move to Beginning of Current Sentence

}

Move to Start if Next Paragraph

{

Move to Start of Previous Paragraph

Delete Command

Function

x

Delete Current Character

X

Delete Character Immediately Left Of Cursor

dw

Delete Current Word

10dw

Delete Ten Words

D

Delete To End of Current Line (also d$)

dd

Deletes Current Line

20dd

Deletes Twenty Lines

dG

Deletes From Cursor to End

u

Undo (doesn’t work for single character deletion)