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.
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.
Traceroute is an important part of any IT experts toolkit who’s worth his salt.. Traceroute enables you to track down potential routing issues between your Mac/PC/Device to your Router/DNS Servers/Web Host.
If, like me you migrated over to Mac from a PC, you will be used to launching a command prompt and firing off the tracert command. However, in OS X the command is slightly different. Some may say it makes more sense..?
To use OS X Traceroute you need to launch a new terminal session, to do this open Applications > Utilities and click terminal.
When the terminal has launched simply type Traceroute followed by the address you want to trace the route to. So for example, if you wanted to check how your devices browser gets to Google.co.uk you would type:
Your mac will then resolve Google.co.uk to it’s IP address, and then trace each ‘hop’ from your device to the address. This can be very handy when trying to figure out if the routing issue is your equipment, your ISP’s equipment or the web host it’s self.
I think it’s fair to say that iTunes really does split the crowds, some people love it.. Some people hate it with a passion, well I am up there with the ones who love it.. Sure it’s got it’s issues, but I am not sure the iPhone or the mac would be the same without it.
For those of you who do love it, and think it’s here to stay.. Here’s a quick terminal command to enable a hidden feature. The feature gives you a small notification popup each time the iTunes track changes.
In a new terminal window, enter the following command:
defaults write com.apple.dock itunes-notifications -bool YES Killall Dock
Now, the next time iTunes track details changes you will get a popup like the one seen above! Not sure why this isn’t a built in iTunes feature, I personally think it’s pretty cool.