Mac

How To disable Time Machine’s MobileBackup

Starting with Lion I noticed that Time Machine is running even when my Time Capsule is not available. I also noticed that Finder shows a different amount of used disk space than df. My MacBook Pro’s SSD also got somewhat slow. Turned out it’s Time Machines MobileBackup function.

If you want to disable MobileBackup and free up the abused disk space, simply run the following command and reboot.

sudo tmutil disablelocal

How to fix SSH UTF-8 issues in Mac OS X Lion

After upgrading from Snow Leopard to Lion, ssh connections to remote servers using iTerm2 have issues with non ascii characters.

Luckily that’s easy to fix. Simply comment SendEnv LANG LC_* in /etc/ssh_config out.

 Host *
 # SendEnv LANG LC_*
 # ForwardAgent no
 # ForwardX11 no
 ...

No other changes are needed. You could also permanently change your locale to UTF-8.
Just place export LANG=en_US.UTF-8 in your shell’s source file.

Intel 320 Series vs. OCZ Vertex 2 (vs. Apple)

Actually this post should be called NO OCZ NO or something like that…

I already wrote about the OCZ Vertex 2 E once or twice with somewhat mixed feelings.
Now after 6 months with the first one, and 3 months with the second one, I wouldn’t recommend buying any of these again. Well, at least not if you’re using Apple.

60Gb OCZ Vertex 2 E in my Mac Mini (6 Months old):

  • huge loss in performance (maybe due to the lack of TRIM in OSX?)
  • sometimes the mini won’t fall asleep or just wakes up again

120Gb OCZ Vertex 2 E in my MacBook Pro (10 weeks old):

  • performance is still good
  • suspend2disk doesn’t work. Known bug. OSX will crash. OCZ promised to fix it – but didn’t!
  • sleep and direct wake-up results in the SSD not being recognized for ~10 minutes!!! No booting possible!

Most of the issues with OCZ’s SSDs seem to be sleep/hibernate related and from what I’ve heard do mostly affect Apple products, but their crappy support prevents me from buying any of their products again. They promised to release a firmware upgrade which fixes suspend2disk, but they did not. They closed the thread in their forums and don’t even respond to requests via eMail. But hey! At least they release the OCZ Vertex 3 – so you possibly get all these bugs fixed for just 180€!

All these issues and their non-responding support made me replace the Vertex with the new Intel 320 Series SSD. They might be slower according to their specs, but performance isn’t everything :)

Which leads me to the next part of this post…

The Intel 320 120Gb SSD! I installed this one in my MacBook Pro last week and what shall I say? After one week everything is great. I’m not talking about pure performance. I didn’t NOTE any difference in real life performance, but just in case… here is a simple sequential performance check:

OCZ Vertex 2 E 120Gb:

homer:~ $ dd if=/dev/zero of=10000M.img bs=1024 count=10000000
10000000+0 records in
10000000+0 records out
10240000000 bytes transferred in 82.815477 secs (123648385 bytes/sec)
homer:~ $ dd if=10000M.img of=/dev/null
20000000+0 records in
20000000+0 records out
10240000000 bytes transferred in 47.731347 secs (214534068 bytes/sec)

Intel 320 Series 120Gb:

homer:~ mrkofee$ dd if=/dev/zero of=10000M.img bs=1024 count=10000000
10000000+0 records in
10000000+0 records out
10240000000 bytes transferred in 108.879939 secs (94048546 bytes/sec)
homer:~ mrkofee$ dd if=file.img of=/dev/null
20000000+0 records in
20000000+0 records out
10240000000 bytes transferred in 47.695655 secs (214694610 bytes/sec)

The Intel is a tad slower in pure sequential write performance, which is a bit disappointing considering it’s one generation newer than the Vertex 2… But, now to the important stuff ;)

  • Suspend2Disk: works
  • Closing and directly opening the MBP: works
  • Support: Well… it’s Intel. I don’t expect it to be any better than OCZ’s.
  • The good feeling of reliability: works ;)

I haven’t received any negative reports from friends about the Intel X25-M  (the 320 Series predecessor) nor have I found much on the Interwebs… so I’m much happier with the Intel now…

Adobe Reader X on Mac OS X – Kidding me?

I just installed Adobe Reader X on my Core2Duo Mac Mini… Adobe? Really? Why is a simple PDF Reader that slow? I have a 1200 pages PDF which I can nicely scroll through using Preview.app, but with Reader X?! Nope. Simple lagging. No fun. Makes reading an eBook reaaaally crappy!

Sadly Preview.app currently doesn’t have support for PDF signatures, so I’ll need Reader X for that, but hopefully that changes with Mac OS X Lion!

How to Upgrade to Xcode4 (or uninstall Xcode3)

I recently bought Xcode 4 on the Mac AppStore and thereby thought I’d upgrade. Nope. Xcode 3 is moved to ‘/Developer-old’, but kept. No big dead actually, except when your OS Disk is only 60Gb ;) The new Xcode 4 uses almost 10Gb plust 5Gb for Xcode 3. So if you don’t need Xcode 3 anymore, just run:

sudo /Developer-old/Library/uninstall-devtools --mode=all

This removes all Xcode3 files, freeing up about 5Gb of space.

MacBook (Pro) and the OCZ Vertex 2

Well… I know it’s very silent over here… not just lately. :/ Anyhow…

I recently upgraded my 2010′s MacBook Pro with a 120Gb SSD. I already installed  a OCZ SSD in my Mac Mini a couple of months ago… Everything runs fast and smooth and the MBP’s battery run time is now even more awesome ;) BUT… the hell! Hibernate is broken! It’s a known bug. Mac OS X just Kernel Oopses on wake-up! OCZ promises to fix it… since 6 months or maybe even longer, I don’t know. There is a Thread over at the OCZ forums, but it’s closed by the ops… lol!

I wasn’t aware of this issue until I ran into it myself. Maybe this post keeps someone from buying the OCZ. It might be worth waiting for the Intel G3 SSDs. But hey… I now have about 10h runtime with my MBP, so I shouldn’t need Hibernate anyway :P

UPDATE: I’m also having the issue that the Vertex2 isn’t recognized, when my MBP goes to sleep and I directly wake it up again. Reboot doesn’t fix it. It just doesn’t boot. Powering it off for 5 minutes does fix it! Weird…

Mac Mini and the OCZ Vertex 2

Last week I upgraded my early 2009 Mac Mini (Core2Duo, 8Gb RAM, 320Gb 7200rpm HDD) with an SSD. I do heavy multitasking, and my HDD was just slowing me down. I did some research and brought it down to the Intel X-25G2 and the OCZ Vertex 2 (A SandForce based SSD, which works quite different than the Intel SSD). I went with the OCZ Vertex 2 E 60Gb… I am no expert in this SSD stuff, but what I’ve figured out so far is that Mac OS X 10.6 (Snow Leopard) doesn’t support TRIM, which should not be a big problem with current SSDs under Mac OS X from what I’ve read and noticed so far.

The installation itself was as “easy” as I described earlier.

I then booted from the Snow Leopard installation DVD, selected Restore from Time Machine Backup and 30min later my system was back up. As a side note: You can restore from a bigger HDD to a smaller SSD (as long as your data fits with no problems of course), but you will need to format the SSD using Disk Utility first. Otherwise the Restore Wizard will tell you, that your Backup doesn’t fit! It does format it later on again…

(I did re-install yesterday because of some weird issues with graphics performance, but that had nothing to do with the SSD or restore process. I had annoying lags when scrolling in Lightroom or Firefox for example since the Graphics Driver update for Snow Leopard a few months ago…)

Everything works smooth and well. System boot has decreased from 1min 15s to about 30s, OpenOffice now starts in 2s instead of 20s, Lightroom switches quickly between it’s modules… My average write speed is around 90MB/s, average read speed is around 150MB/s. Both for one stream. Should be much higher with multiple streams combined. But what’s more important is the very low access time.

After about one week the Vertex 2 looks like a good teammate for the Mini.

P.S. it looks like Sunday is a good day for scheduling my posts from now on :-)

How to Fix “The file server has closed down” issues in Mac OS and netatalk

Netatalk versions older than 2.1.3 had some issues with the TCP/IP Stack on Linux which resulted in errors like

Luckily they seem to have fixed this in 2.1.3 as the ChangeLog states: fix a serious error in networking IO code.

So the solution is as easy as upgrading. I am running Ubuntu, but two months after netatalk-2.1.3 has been released, they don’t even have it in unstable. Lucky Gentoo users you! I needed to fix this very quickly as it started to disrupt my workflow. Sadly I currently don’t have the time to dig into the packaging system of Debian or Ubuntu, so I looked up Debian’s configure options and just compiled from source:

cp -a /etc/netatalk/ ~
aptitude purge netatalk
apt-get build-dep netatalk
wget http://sourceforge.net/projects/netatalk/files/netatalk/2.1.3/netatalk-2.1.3.tar.bz2/download
tar xjvf netatalk-2.1.3.tar.bz2
cd netatalk-2.1.3
./configure  --with-shadow --enable-fhs --enable-tcp-wrappers --enable-timelord --enable-overwrite --with-pkgconfdir=/etc/netatalk --enable-krb4-uam --enable-krbV-uam --with-cnid-dbd-txn --with-libgcrypt-dir --with-cracklib=/var/cache/cracklib/cracklib_dict --enable-debian --disable-srvloc --enable-zeroconf --with-ssl-dir --enable-pgp-uam --prefix=/usr/local/netatalk/
make
sudo make install
mv ~/netatalk /etc/
/etc/init.d/netatalk start

This saves a copy of your running netatalk configuration to your home directory, removes netatalk, downloads all necessary libraries to build netatalk, downloads netatalk from SourceForge, extracts it, configures it, builds it, installs it, restores the configuration and starts it as usual.

I am running netatalk 2.1.3 for a week now and the error seems to be gone :-)

If you know how to easily create a Debian package, feel free to post in the comments.

Empty Trash issues in Snow Leopard

I recently had many issues with Mac OS X 10.6′s Trash. The problem is that, when you Empty the Trash in Snow Leopard, Finder sometimes can’t erase all items because some of them are still in use. The funny part about this is, that most of the time, it’s the Finder itself that still uses the items! I haven’t found a solution so far, but there are at least two workarounds which don’t require logging out or even rebooting.

The first one is to force a relaunch of Finder via Apple -> Force Quit and then try it again.

If that doesn’t help it gets more complicated. You will need to open Terminal.app or any other terminal emulator.

Then type ps auxw | grep <yourfile>. The output will look something like:

$ ps auxw | grep Scan.pdf
Finder     169 chrisk   13r     REG       14,2       286 1417024 /Users/chrisk/.Trash/Scan.pdf/..namedfork/rsrc

This might look complicated, but it’s actually simple. The first column is the name of the application, which uses your file, the second column is the PID (process ID) of the application, third column shows the username and the last column simply shows the path to your file in the Trash folder.

Now use ‘kill’ and the applications PID to terminate it.

$ kill 169

You should be able to empty your trash again.

How to Fast VNC alternativ to Remote Desktop to a Mac using NoMachine

I am a very happy Mac OS user with a Mac mini and a MacBook Pro coming soon, but one things I really miss about Mac OS X is the lack of a fast and standards based remote desktop solution. The VNC server built into Mac OS X isn’t really compatible with all clients, and I still haven’t figured out if it’s possible to run it with a different resolution and color depth than the real screen!!!

But, I recently re-discovered a solution I got to know in my Linux time on a desktop: NoMachine. You’ll need a server running a recent Linux distribution or OpenSolaris which will act as a kind of a proxy and the setup is a bit complex, but it does work well. I’ll show you how to do it running Ubuntu Lucid.

First go to http://www.nomachine.com/select-package.php?os=linux&id=1 select your architecture and download all three files: client, node and server.

Then install them in the following order, fix the missing dependecies and install a vnclient plus vncpassword:

sudo dpkg -i nxclient_3.4.0-7_x86_64.deb
sudo dpkg -i nxnode_3.4.0-11_x86_64.deb
sudo dpkg -i nxserver_3.4.0-12_x86_64.deb
sudo aptitude -f install
sudo aptitude install xvnc4viewer vnc4-common

Since it’s really advisable I hope you already have PasswordAuthentication no in your sshd_config to disable Password authentication and to only allow key-based authentication. You’ll need to tweak nxserver a bit to get it working with key-based auth. Edit /usr/NX/etc/server.cfg to…

EnablePasswordDB = "1"

…edit the following line in /usr/NX/etc/node.cfg to enable VNC…

CommandStartRFB = "/usr/bin/vncviewer -fullscreen"

…create a key for your key-based authentication and restart nxserver.

sudo /usr/NX/bin/nxserver --keygen
sudo service nxserver restart

Your new key is placed at /usr/NX/share/keys/default.id_dsa.key. Copy it the device you want to connect from using scp or similar tools. Now all you need to do is enable the users you wan’t in nxserver:

sudo /usr/NX/bin/nxserver --useradd <user>

This enables the user in NX’s database and copies the previously generated key to the user’s authorized_keys file.

Now just enable VNC on your Mac. Go to “System Preferences”, select “Sharing” and enable “Screen Sharing”:

Now you’ll need to configure your client. Read more…

Christian KildauHi, my name is Chris. I am a wannabe photog, traveler & geek that lives in Hesse, Germany.

more about me...

PayPal - The safer, easier way to pay online!
Please consider supporting me


Advertise here Advertise here Advertise here Advertise here