Posts Tagged Mac
So today I was going through my Synology NAS and noticed .DS_Store files all over the place.
These are actually files containing extended attributes created by Finder in Mac OS X. But, since they get written out to network locations, they can cause backup and versionining issues.
To disable them from being created on network locations, open a Terminal and run the following
defaults write com.apple.desktopservices DSDontWriteNetworkStores true
(Note: This only affects the currently-logged-in user)
Now in my case, I had these files all over my Synology NAS, so I was able to easily get rid of them by SSHing into the box and running the following:
find / -name .DS_Store -delete
If you have an older MacBook and are having problems with CDs getting stuck in the drive, the drive itself might not be to blame. In the case of one particular MacBook that I’ve worked on, it was the dust cover of the drive itself. It had hardened enough over time from dust and dirt to put resistance on the CDs enough to keep them from ejecting.
Below you can see two photos of the dust cover on the MacBook, showing the dirt buildup on the dust cover:
So, the first step is to disassemble the MacBook and get access to the dust cover. Follow this YouTube video for the disassembly, right down to removing the optical drive
Once the optical drive is removed, remove the four screws shown in the following photos, and then remove the dust cover assembly.
Carefully pry the dust cover assembly off. It will be stuck to the plastic base with adhesive, so the use of a tool is recommended.
Here’s a shot of the dust cover, removed:
The dust cover itself is little more than fabric glued to the magnesium bracket. You can easily peel it off. This one only left a little reside and I was able to easily clean it with some alcohol.
Mag bracket, dust cover removed:
Now, just reinstall the bracket, and reverse the above.
You’ll notice the small gap where the dust cover used to be, but CDs no longer get stuck! I’m sure it wouldn’t be hard to fabricate a replacement for the dust cover.
Feel free to comment below.
wget is a really handy command line utility, but unfortunately not included in OS X. Curl could be a suitable replacement, but frequently scripts are written with wget, and it can be difficult and time-consuming to convert them to using curl.
Below are the steps required to install a working wget on Mac OS X. This has been tested on OS X 10.6 Lion.
Install XCode from http://itunes.apple.com/us/app/xcode/id497799835?ls=1&mt=12 (at this time, it’s a 1.5GB download.)
Launch XCode, updating if necessary.
Go to Preferences > Downloads, and install Command Line Tools
Now open a terminal and perform the following steps at the command line one at a time to download, extract, configure, compile, and install wget:
curl -O http://ftp.gnu.org/gnu/wget/wget-1.14.tar.gz tar xvzf wget-1.14.tar.gz cd wget-1.14 ./configure --with-ssl=openssl make sudo make install
You should now have a working wget installed in /usr/local/bin. Confirm by trying
$ wget wget: missing URL Usage: wget [OPTION]... [URL]... Try `wget --help' for more options.
Feel free to comment below. Thanks!
2/7/2016: I got an email from someone who says this no longer works and gives the following message:
configure: error: –with-ssl=openssl was given, but SSL is not available.
If anyone has advice, please contact me. Thanks!
DD-WRT is feature-rich alternative firmware for a large number of home router models. It adds a wonderful array of new features, VPN being one of them. This walkthrough will show you how to quickly and easily configure a PPTP VPN server on your DD-WRT-powered router, so you can connect to your home network from afar, create a secure tunnel so you can safely use a public Wifi point with your laptop, or secure your iOS or Android device.
Setting up the VPN Server
So here’s how to get started. First, you’ll need a build of DD-WRT supported by your router which includes the VPN software. If you’re doing this on an Internet connection which has an IP address that changes periodically (i.e. residential), you’ll likely want a Free DynDNS hostname to point to your IP address. You’ll also need a basic familiarity of networking.
For the remainder of this guide, I will assume your router’s internal (LAN) IP address is 192.168.1.1.
Start by going to http://192.168.1.1 and login to your router’s administration panel.
Go to Services > VPN and set PPTP Server to enable. After doing that, a few new options will appear. The only ones you need to set are Server IP, Client IP(s), and CHAP Secrets. Set them as follows:
Server IP: You can set this to your router’s LAN IP, i.e.
Client IPs: Set this to an IP range OUTSIDE your DHCP range (See Setup > Basic Setup to figure your DHCP range) A good example value would be
192.168.1.200-250 for clients to receive addresses within that range.
CHAP Secrets: This is the username/password combinations for your VPN clients. Format is:
myname * mypassword *
Neither the username nor password can contain spaces, and must be all-lowercase.
You’re done with this page; Click Apply Settings.
Now go to Security > VPN Passthrough and make sure PPTP is set to Enabled. Click Apply Settings if you had to change the setting.
You should now be able to connect to your VPN using your Windows, Mac, or Linux computer by setting up a PPTP connection to your public (WAN) IP or hostname.
Can’t get connected? First, try setting up your connection to the router itself, using the LAN IP (192.168.1.1). If that works, then the VPN server is set up correctly; the problem is likely on the WAN side. Keep reading for suggestions. If you weren’t able to get connected, go back to the top and double-check your settings.
You may need to make the following settings adjustment if you are having trouble connecting specifically from your iOS device running iOS 4.3 or above. Go to Administration > Commands and paste the following in the box. Click Save Startup.
#!/bin/sh echo "nopcomp" >> /tmp/pptpd/options.pptpd echo "noaccomp" >> /tmp/pptpd/options.pptpd kill `ps | grep pptp | cut -d ' ' -f 1` pptpd -c /tmp/pptpd/pptpd.conf -o /tmp/pptpd/options.pptpd
(Source: DD-WRT Wiki)
If you can connect from the LAN side, but are still having trouble connecting from the WAN side, it’s likely your ISP or your gateway device (modem) is blocking the needed GRE protocol or the needed PPTP port or traffic. Contact your ISP for further assistance.
Do you have any experience or tips to share regarding VPN connections to a DD-WRT-powered router, or any suggestions in addition to the above? Please feel free to share them in the comments below. Thank you!
Google and Apple each brought their own services which allow users to upload their music library and stream it to their devices in the form of Google Music and iTunes Match, respectively. But how do those services compare?
Let’s take a side-by-side comparative look at some of the features:
|Feature||Google Music||iTunes Match|
|Number of songs||20,000 songs not purchased from Android Market||25,000 songs not purchased from iTunes|
|Supported devices||Works on common browsers on Win / Mac / Linux / Android / iOS (1)||Works on Win / Mac running iTunes; iOS devices supporting iCloud|
|Sync||Automatically sync music to Google Music using Win / Mac / Linux client||Automatically sync music to iTunes Match using iTunes|
|Sync Selection||Select which songs to upload using sync client||All songs from iTunes library are synchronized.|
|Local Storage||Save music to your Win / Mac / Linux / Android device for offline playback||Save music to your Win / Mac / iOS device for offline playback|
|Uploading||Every song must be uploaded||Matching is performed prior to upload; Only unmatched songs are uploaded|
|Supported file formats||Mp3, AAC (m4a), wma, flac, ogg (source)||Same as iTunes|
|Excluded formats||None||24-bit audio; Bitrates under 96 kbps; File over 200MB (source)|
As you can see, Google Music is aimed at the Android crowd, while iTunes Match is aimed at the iOS crowd. However, a few of the major points in Google Music’s favor that I see are that it supports playback from a web browser, has a Linux client, and is free.
I’m interested in everyone else’s opinion as well. Which streaming music service do you prefer, and why? Please feel free to share your opinion in the comments below. Thank you!
After writing my previous post about ripping DVD to avi using k9copy (and the ddrescue workaround), I found HandBrake. After doing a little reading on it, the general consensus is it does a better job at reading DVDs, even those with some issues. I was able to get HandBrake to completely convert my DVD easily and, although it is a little slower than k9copy, it is quite capable. Another nice thing about HandBrake is it’s cross-platofrm support — it’s available for Windows (exe), Mac (dmg), Ubuntu (PPA/deb), and Fedora (rpm).
This comes with the same general disclaimer as the previous post: Notice: This walk-through is not intended to encourage or facilitate piracy. It is the user’s responsibility to observe all applicable licensing and copyright laws.
That said, on with the how-to.
PPA for Ubuntu 9.10 (Karmic) or newer (Recommended): Open a terminal and enter the following three commands:
sudo add-apt-repository ppa:stebbins/handbrake-releases sudo apt-get update sudo apt-get install handbrake-gtk
Direct downloaders: Download your installation file from the download link above and follow the installation procedure for your operating system.
Using HandBrake – Ubuntu Linux
HandBrake has a lot more flexibility (and therefore a lot more options) but only a few need to be changed to get the best rip possible. You can find HandBrake in the launcher after installing it.
After starting up HandBrake, click the Source button in the top left.
In the new window that opens, go to the bottom and find the “Detected DVD devices” drop-down box. Select the device appropriate for your system and click the Ok button.
After a few moments of scanning your DVD, the summary tab will populate with information.
On the video tab, click the “Target Size (MB)” radio button. The default value of 700 is correct.
Go to the chapters tab and uncheck “Chapter Markers”
Click Start to begin the ripping process.
Using HandBrake – Windows
Windows usage is similar to the above, but with some slight modifications. Also, the below is based on the latest version (0.9.8).
First, go to Tools > Options > Output Files and make sure a directory is selected for Default Path.
Next, insert your disc and click the Source drop-down, and select the disc.
After a few moments, select your preset on the right (based on the intended playback device — if unsure, use Regular > Normal).
Then, click Chapters and uncheck Create chapter markers.
Now, click Start to rip the DVD.
For more information, see the HandBrake Users Guide.
Multiple Boot Systems Time Conflicts
From The Ubuntu Community:
Operating systems store and retrieve the time in the hardware clock located on your motherboard so that it can keep track of the time even when the system does not have power. Most operating systems (Linux/Unix/Mac) store the time on the hardware clock as UTC by default, though some systems (notably Microsoft Windows) store the time on the hardware clock as the ‘local’ time. This causes problems in a dual boot system if both systems view the hardware clock differently.
The advantage of having the hardware clock as UTC is that you don’t need to change the hardware clock when moving between timezones or when Daylight Savings Time (DST) begins or ends as UTC does not have DST or timezone offsets.
Changing Linux to use local time is easier and more reliable than changing Windows to use UTC, so dual-boot Linux/Windows systems tend to use local time.
Since Ubuntu Intrepid (8.10), the hardware clock is set to UTC by default.
Make Windows use UTC
Note: This method was not initially supported on Windows Vista and Server 2008, but came back with Vista SP2, Windows 7 and Server 2008 R2.
To make MS Windows calculate the time from the hardware clock as UTC.
Run regedit and navigate to
Right-click in the right-side panel and select New > DWORD Value. Create the key named
RealTimeIsUniversal and give it a value of 1.
Using a registry file
Create a file named WindowsTimeFixUTC.reg with the following contents and then double click on it to merge the contents with the registry:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation] "RealTimeIsUniversal"=dword:00000001
Make Linux use ‘Local’ time
To tell your Ubuntu system that the hardware clock is set to ‘local’ time:
1. edit /etc/default/rcS
UTC=yes if your hardware clock is set to UTC (GMT), or
UTC=no to have the hardware clock set to local time.
It’s come to my attention that this issue also affects Macs which dual boot via bootcamp or other methods.
Questions, comments, and feedback is welcome and appreciated.