The default YouTube app in iOS was great back in 2007, but it hasn't seen a significant update in years and is lacking many features compared to the newer mobile YouTube website that Google launched two years ago.
To stop iOS from launching the native YouTube app, and force it to use the superior YouTube mobile website, simply disable YouTube under Settings > General > Restrictions.
This will make all YouTube links open the mobile website and will also hide the native YouTube app on the device. If you decide you want to revert these changes, simply go to the Restrictions settings and toggle YouTube back on.
Controlling the volume of the startup chime is easy to set in the System Preferences Sound panel, but you need to make two different settings if you have external speakers connected to your Mac. There is no need to use scripts or any other coding to make this adjustment.
There are both internal and external speaker output settings in the sound preference pane. In order to adjust (or turn off) the volume of your Mac's internal speakers, nothing must be plugged into the headphone jack. Keep in mind that this setting completely controls the volume of your internal Mac speakers, so if you mute the sound, and have no external speakers, you will get no sound at all from your Mac.
To adjust the volume on your Mac's internal speakers:
Unplug speakers or headphones from the headphone jack.
Go to System Prefs > Sound, then click on the Output tab.
You will then see Internal Speakers (Type built-in) highlighted in the window.
Adjust the output volume (which also controls the chime volume) in the slider at the bottom of the window. Remember if you mute it there will be no internal speaker sound.
To set the volume for your external speakers:
Plug in speakers or headphones to the headphone jack.
Go to System Prefs > Sound >, then click on the Output tab.
You will then see Headphones (Type built-in) highlighted in the window.
Adjust the output volume (which controls the chime volume in the external speakers) with the slider at the bottom of the window. Remember if you mute it there will be no external speaker sound.
Since I have external speakers, I chose to mute the startup sound on my internal speakers and set the chime very low on my external speakers. If you have an external volume controller for your external speakers, it should still function normally following these changes, but adjusting it will again affect your startup chime volume for those speakers.
[kirkmc adds: Depending on your setup, this can be a bit more complicated. For example, my main Mac is a Mac mini connected to a DAC via a Toslink cable, which uses the headphone jack. When you use the digital output like this, you cannot control its volume. I also have a Cinema Display, connected via Thunderbolt, and it has internal speakers; so I can set the volume in those. This shows in the Sound preference pane as Display Audio.
If you have a Mac Pro, you have a tiny - and tinny - internal speaker. If you have an iMac, you have the same type of speakers as I have in my Cinema Display. And if you have a laptop, you have one or two small speakers.]
There are plenty of hints on this site that use the defaults command to change preferences or settings that are unavailable via the GUI. These are fine to use for isolated changes, but there are some applications where you might want to change a number of settings.
iTunes is one of these. Over the years, Apple has removed a number of options from iTunes; at least from its menus and preferences. Many of these options remain, but are hidden.
Doug Adams' free Change Hidden iTunes Preferences is an applet that lets you change a number of settings. I use it to make sure that when I rip CDs, track numbers are added to the file names; to hide Ping buttons; and to hide the arrow buttons that display next to tracks. Other options it offers are the ability to turn on half-stars for ratings (useful for smart playlists), showing the "Libary" playlist at the top level of the iTunes source list, and to create playlists for new purchases such as albums.
This is a simple GUI tool that allows you to check some buttons and click Apply. So if you want to make changes to some of these hidden settings, check out this applet.
You can view all of an application's graphical resources - icons, pictures, UI elements, etc. - quickly and easily by dragging the application icon onto the Preview icon. When you do this, Preview's sidebar will show all of these items, and you can click on any of them to view it in the main window.
If you do this with Keynote, you'll have access to all the graphical elements in the various themes the program contains; and with Pages, you'll be able to see all the elements from the program's templates.
[kirkmc adds: Interesting, and a good way to copy certain graphical elements, notably from Keynote themes or Pages templates. Note that there are thousands of graphic files in these programs, so it can take a while to wade through them.]
An old hint from 2003 explained how to use the Character Palette to display icons instead of text in the Safari Bookmarks Bar. The addition of Emoji in 10.7 means that colored icons can be added, the only way I've seen to add color to the Safari Bookmarks Bar. Just note that on an iPad, the icon in the Bookmarks Bar of mobile Safari will be black and white, though it will show as color in the iOS pop-up bookmarks menu.
[kirkmc adds: This works as described, but unfortunately, there aren't many Emoji symbols in Lion. For example, if you wanted to have different colored icons for different bookmarks, it would be practical if there were a set of circles or squares. There is a "large red circle," but only red. Most of the icons are not really useful as visual clues to what the bookmarks are for. But they do alleviate the gray a bit.]
Apple has introduced an additional type of preference file in Lion, those whose names end in ".plist.lockfile". Here is a good explanation of the function of those files:
Lockfiles and other plist file subtypes in OS X Lion
Since plist.lockfiles do not contain any useful information for the user and almost double the content of and clutter the Preferences folders in /Library and ~/Library, I've been looking for a way to hide those files. With help from Yvan Koenig of MacScripter
in this topic (I'm flex20 in that forum), I wrote an AppleScript "Hide Unhide plist.lockfile.scpt," which provides a quick and easy way of hiding or unhiding all those pesky files.
You will need an admin password to run the script because some of the ".plist.lockfile" files can only be changed by administrators. You can add the script to your AppleScript menu, or save it as an app, such as "Hide Unhide plist.lockfile.app," that you can keep anywhere you like, as I did.
Here's the script:
-- Hide Unhide plist.lockfile -- version 2.0
display dialog ¬
"Hide or Unhide the plist.lockfile files in the Preferences folders in /Library and ~/Library." & return & ¬
return & "Will require to enter an administrator password." & return with title "Hide or Unhide the ¬
plist.lockfile files" buttons {"Cancel", "Hide", "Unhide"} default button 1 giving up after 60
set dialogResult to result
set giveUp to gave up of dialogResult
if giveUp is true then error number -128 -- Cancel on giving up to cancel the script.
set user_choice to button returned of dialogResult -- Set the user choice.
-- Process the user choice. Will require to enter an admin password.
if user_choice is "Hide" then
do shell script "chflags hidden /Library/Preferences/*.plist.lockfile" with administrator privileges
do shell script "chflags hidden ~/Library/Preferences/*.plist.lockfile" with administrator privileges
else if user_choice is "Unhide" then
do shell script "chflags nohidden /Library/Preferences/*.plist.lockfile" with administrator privileges
do shell script "chflags nohidden ~/Library/Preferences/*.plist.lockfile" with administrator privileges
end if
[kirkmc adds: Works as advertised. You could also just run these commands from Terminal. Look for the chflags commands in the script; there are two to hide and two to unhide, one each for /Library/Preferences and ~/Library/Preferences. I see no need to do this permanently, but it's good to know that I can if I want to, say, clean out my Preferences folder.]
I love TextWrangler, and I have a Mac at work and one at home, but often do coding on both. I set up a system using Dropbox so both my preferences and my Application Support files sync so I always have my stationery files and the same settings, wherever I am.
Run the following as a shell script on each of the Macs. This will copy TextWrangler to your Dropbox folder, and create the support folder on Dropbox, then create a symlink to it in the correct location on your Macs. It will then copy the preference files to Dropbox, so when you launch the application on either Mac, you'll have the same setup.
#!/bin/bash
#+ Portable TextWrangler
#* Formatted date & time string.
FORMATTED_DATE=`/bin/date "+%Y-%m-%d%H%M%S"`
#+ Remove it from /Applications (optional, just so you can replace it with a ln to your dropbox)
sudo /bin/mv -f /Applications/TextWrangler.app ~/.Trash/
#* Add a link in /Applications to your DropBox copy
sudo /bin/ln -Fs ~/DropBox/TextWrangler.app /Applications/TextWrangler.app
#* Archive existing folder
/bin/mv -f ~/Library/Application Support/TextWrangler{,.$FORMATTED_DATE}
#+ Create cloud app support folder
/bin/mkdir -p ~/DropBox/TextWrangler
#+ Link cloud app support folder to your local workstation (this contains your stationery, etc.)
sudo /bin/ln -Fs ~/DropBox/TextWrangler ~/Library/Application Support/TextWrangler
#+ Create cloud app support folder for your preferences
/bin/mkdir -p ~/DropBox/TextWrangler/Preferences
#* Placeholder so your prefs go to the cloud
/usr/bin/defaults write ~/DropBox/TextWrangler/Preferences/com.barebones.textwrangler Placeholder true
#* Link cloud pref to your local workstation
sudo /bin/ln -Fs ~/DropBox/TextWrangler/Preferences/com.barebones.textwrangler.plist ~/Library/Preferences/com.barebones.textwrangler.plist
exit 0
[kirkmc adds: Personally, I wouldn't do it this way. For example, I don't see why you would copy the application itself to Dropbox; you can just have a copy on each Mac. You also might not want to have the preferences the same on both Macs, if one is a desktop and the other a laptop. So all that leaves is the support folder, which is easy to symlink.
If you want to do this with BBEdit, it's much simpler. As explained on the Bare Bones web site, BBEdit will look for the support folder on your Dropbox folder.]
When Apple shipped Mac OS X Lion 10.7, the “Library” folder located within every user’s home folder, which had previously been visible to users in the Finder, was made invisible. This hint shows how to make the folder visible and keep it that way forever.
As you may know, and as mentioned in this hint, the Library folder can be made visible again by running the following command in Terminal:
/usr/bin/chflags nohidden ~/Library
Apple keeps making the folder invisible again with every System update, so it gets tedious re-running the above script. You can automate this by adding a Login Item with an AppleScript "script application" containing the following code:
do shell script "/usr/bin/chflags nohidden ~/Library"
Read detailed instructions for this hint, and download a ready-made script application file on the Red Sweater Blog.
[kirkmc adds: There are any number of ways to unhide the ~/Library folder. Macworld has an article with 18 different methods, plus a few more in the comments to that article. This hint also tells you how you can create an alias in your .profile file to easily run this command. ]
As SSDs become more common, and prices drop, more and more people are either buying Macs with SSDs, or installing them in their Macs. Personally, I started using an SSD with the first MacBook Air in 2008, and bought my current Mac - a Mac mini, purchased in 2011 - with an SSD. The gains in performance are huge, though the price still makes them a choice that is not for everyone.
So, what about you? Does your main Mac - the one you use most - have an SSD? Feel free to post in the comments to the poll which model, whether you bought it with the Mac or installed it yourself, or any other comments you may have about SSDs.
These AppleScripts are related to this hint. Both can already be found in the replies to the hint topic post, but I'm resubmitting them so that they will appear together.
The first is an improved version of the original AppleScript which presents a dialog box from which a selection of local volumes to be ejected can be made. An example of its usefulness might be that it provides a reliable method for quickly ejecting a MacBook's mounted local volumes for users on the go. I've configured it as a "Run AppleScript" step for an Automator-based Mac OS X Service called "Unmounter" and assigned it the keyboard shortcut of (Command-Control-Shift-E) in System Preferences on my system.
The second is a more robust version of the AppleScript included in my first reply to the original hint topic. It attempts to automatically unmount all unmountable local volumes, and if it finds none, attempts to mount any local volumes that are available. I've configured it as a "Run AppleScript" step for an Automator-based Mac OS X Service called "Toggle Available Local Volumes" and assigned it the keyboard shortcut (Command-Option-Control-Shift-E) in System Preferences on my system.
For both Automator-based Mac OS X Services that I created to provide key triggers for the AppleScripts, the scope specified is "Service receives no input in any application."
set alldisks to paragraphs of (do shell script "df -hlg | awk -F/ '/disk*/ {print $5}'")
set nonbootnumber to (count of alldisks)
try
set alldisks to items 2 thru nonbootnumber of alldisks
activate
set your_selected_device_id to choose from list alldisks with prompt "Please choose one or more volumes to be unmounted." with multiple selections allowed
repeat with the_Item in your_selected_device_id
set the_ID to (do shell script "df -hlg | grep -m 1" & space & quoted form of the_Item & space & "| grep -o 'disk[0-9][a-z][0-9]*'")
try
do shell script "diskutil unmount /dev/" & the_ID
on error the error_message number the error_number
display dialog "Error: " & the error_number & ". " & the error_message buttons {"OK"} default button 1
end try
end repeat
on error the error_message number the error_number
if the error_number is -128 or the error_number is -1708 then
else
display dialog "There are no unmountable volumes." buttons {"OK"} default button 1
end if
end try
set alldisks to paragraphs of (do shell script "df -hlg | awk -F/ '/disk*/ {print $5}'")
set nonbootnumber to (count of alldisks)
try
set all_non_boot_disks to items 2 thru nonbootnumber of alldisks
on error
set all_non_boot_disks to {}
end try
if (count of all_non_boot_disks) > 0 then
try
activate
repeat with the_Item in all_non_boot_disks
set the_ID to (do shell script "df -hlg | grep -m 1" & space & quoted form of the_Item & space & "| grep -o 'disk[0-9][a-z][0-9]*'")
try
do shell script "diskutil unmount /dev/" & the_ID
on error the error_message number the error_number
display dialog "Error: " & the error_number & ". " & the error_message buttons {"OK"} default button 1
end try
end repeat
on error the error_message number the error_number
if the error_number is -128 or the error_number is -1708 then
else
display dialog "There are no unmountable volumes." buttons {"OK"} default button 1
end if
end try
else
set actiondisks to {}
set allvols to paragraphs of (do shell script "diskutil list -plist | grep -o 'disk[0-9][a-z][0-9]*'")
repeat with i in allvols
if i is not in actiondisks then
set actiondisks to actiondisks & i
end if
end repeat
repeat with myitem in actiondisks
try
do shell script "diskutil mountDisk /dev/" & myitem
end try
end repeat
end if
[kirkmc adds: I'm posting this so the final scripts can be easier to find. There were a lot of comments that helped the poster improve on his original submission, and I thank all the users who gave their thoughts on the original script, and the poster who took the time to improve it and re-post it.]