This blog posts is one of the several guest blog posts to MikeSel.info. Posted by one of my readers Thomas Hazlett, Thomas has converted the terminal commands in my earlier post Show hidden files in OS X 10.7 or 10.8
- Launch -> /Aplications/Automator
- Select what type of workflow you would like. I feel a service is a good choice for this so go ahead and;
- Select -> Service
- At the top of the window there should be 2 combo-boxes.
- Select -> no input
- Select -> Finder.app
- Drag -> Run shell script; from the left panel to the right and enter the following:
is_shown=$(defaults read com.apple.finder AppleShowAllFiles) if [ $is_shown != "YES" ] then defaults write com.apple.finder AppleShowAllFiles YES else defaults write com.apple.finder AppleShowAllFiles NO fi
(You may have to retype the quotes around the “YES” in the if statement).
8. Below that Drag -> Ask for confirmation and enter a message to the effect of “Do you want to relaunch finder? This will cancel any file transfers etc.”Under that,
9. Drag -> Run shell script and enter killall Finder
10. Save it, naming it whatever you want it to appear as under the services submenu of the Finder menu.
11. With Finder in the foreground, click Finder in the top left -> down to Services and click your newly created Service.
Thomas Hazlett is from and still lives in Belfast, N. Ireland. He is currently studying with the Open University towards his BSc in Computing and IT however has decided to take a year out to work on his own projects; start a blog; and spend more time doing home renovations. You can find more about him at www.hazlett.info
By default the library menu option in the go menu is hidden. Although I’ve never quite understood why it needs hiding, this quick tip will show you how to unhide it with just a quick keyboard click.
- Make sure you have a finder window active and focused
- Click on the Go menu at the top of the screen
- Press and hold the ‘Option/Alt’ key on your Mac’s keyboard
- The library icon should now appear. Upon releasing the keyboard key the icon will disappear again
Last night one of my twitter friends (Ben Casablancas) asked me an interesting question, he wanted to grab his OS X login screen ‘avatar’ for use on twitter. Now, on first appearances the image file seemed to be well hidden away in the deep dark depths of the OS X file system.
However using this little snippet of code in a terminal window made it much easier to find:
dscl . -read /Users/`id -un` JPEGPhoto | tail -1 | xxd -r -p > ~/Desktop/MyAccountPic.jpg
Now if you check your desktop, you should see a JPG labelled MyAccountPic.jpg. That’s right… That’s the picture seen in the login window. But wait… I hear you cry, what about the ‘halo’ ring! Well don’t you worry, we’ve got that covered too!
Back in terminal, paste in this line:
cp /System/Library/PrivateFrameworks/LoginUIKit.framework/Versions/A/Frameworks/LoginUICore.framework/Versions/A/Resources/avatarWhiteRing.png ~/Desktop/MyRing.png
You should now find another image on your desktop – this one labelled MyRing.png. This is the ‘halo’ circle from around your avatar. Now last but not least, you’ll be wanting the mask to go with that:
Back in terminal, paste in this line:
cp /System/Library/PrivateFrameworks/LoginUIKit.framework/Versions/A/Frameworks/LoginUICore.framework/Versions/A/Resources/avatarMask.png ~/Desktop/MyMask.png
You’ve guessed it! You will now also have an image on your desktop labelled MyMask.png.
So although it’s hidden away, using the extremely powerful terminal it can easily be retrieved.
For reference, all the code above does is create copies of the graphics, and is in no way dangerous. If your stuck looking for something in OS X drop me a line and maybe I can help you too.
Recently my Address Book app decided it no longer wanted to sync with my online contacts, and what’s worse, the preferences pane was completely blank too. So I couldn’t even re-enable or re-configure the sync.
After an hour of so of frantic googling blog posts kept pointing me in the same direction, and that was Pacifist. Pacifist is a donate ware application which is capable of extracting the pkg files directly out of the setup media’s image. Thus giving the ability to reinstall stock OS X applications without having to reinstall the OS.
Pacifist is a shareware application that opens Mac OS X .pkg package files, .dmg disk images, and .zip, .tar, .tar.gz, .tar.bz2, and .xar archives and allows you to extract individual files and folders out of them. This is useful, for instance, if an application which is installed by the operating system becomes damaged and needs to be reinstalled without the hassle of reinstalling all of Mac OS X, or if you want to inspect a downloaded package to see what it will install before installing it. Pacifist is also able to verify existing installations and find missing or altered files*, and Pacifist can also examine the kernel extensions installed in your system to let you see what installer installed them, and whether the installer was made by Apple or a third-party.
The application has a simple, straightforward interface. An once pointed in the direction of the media it does the rest of the work for you!
As you can see, Pacifist is a powerful little application. However the section that saved my bacon was the ‘Open Apple Installers’. This is where the magic happens. Once you hit this button you’ll be prompted to point the app at your OS X Lion media or DMG file. The app will the pick apart the main installation application and present you with all the PKG files contained within it.
Now all you have to do, is right click on the PKG file your after and click install. That’s it! Within minutes I had reinstalled my OS X Address Book, and resolved my syncing issue! Pacifist will now take pride of place in my utilities folder, and will be my first point of call should I have any further stock app issues!
If you know of another way of resolving Apple application issues without reinstalling OS X, drop me a note below.
You can download Pacifist from http://www.charlessoft.com/
As a keen Mac user for many years, I’ve often been bugged by the same age-old issue. An that’s the fact that you can’t keep important windows ‘top-most’. This can often be a bind, especially when you spend time in both terminal and GUI applications. Last week this pushed me over the edge, as I was getting tired of flicking between the two. So I finally found what I think is the perfect solution to my problem.
The clever people over at Infitite Labs have produced a handy little utility named Aflot. It’s completely free of charge and offers some pretty impressive features.
Afloat features include:
- Keep any window ‘afloat’ (aka top-most)
- Pin windows to the desktop
- Move windows from anywhere
- Turn a window into an overlay (transparent<->semi transparent)
- Show a windows file in Finder
- Resize windows from anywhere.
Afloat requires OS X Snow Leopard (10.6) or above, and is available to download from here
Once downloaded and installed, the OS X ‘Window’ menu in the menu bar of your favourite apps will include extra options:
This has saved me lots of pain when using terminal. If you know of other methods to ‘pin’ windows let me know.