google
yahoo
bing

Posts filed under 'Mac'

GPG Mail under Snow Leopard

For an upcoming project I needed to set up secure communications using GPG. It’s been a few years since I used this, and I have never used GPG on the Mac before… Turn out, that it’s not trivial to get it running… Here’s a bunch of links that helped me get things working:

Then generate your keys (follow the instructions found at Zeitform)

To install the mailbundle, create a folder ~/Library/Mail/Bundles and copy the GPGMail.mailbundle file you downloaded from Github into it. Drop to a terminal and execute the following two command which will enable Bundles in Mail.app.

defaults write com.apple.mail EnableBundles -bool yes
defaults write com.apple.mail BundleCompatibility -int 3
(via blogator)

Now you can start importing public keys from others into you GPG Keychain and sign / encrypt email from Mail.app

Here is my GPG public key 0x3B5F40BE

Add comment April 12th, 2010

Mac OS X Services

R. had told me about this strange “Services” menu in OS X, but I never really bothered to look deeper into it. The article “Mac OS X Services (the menu you never go to)” told me a bit more about the things possible, when text is selected…

  • Let my Mac read some text loud
  • Open the selected text in an editor
  • Call someone on Skype when their name is selected
  • Open the selected text in a web browser
  • Blog the text
  • summarize the text

Many programs install additional services (Ecto, Skype, TextMate, Emacs, Opera, Quicksilver) and there are more services on the internet (for example at DEVONtechnologies) where the great TextServices comes from.

Makes the Mac even more useful

Technorati Tags: , ,

Add comment December 2nd, 2005

Foldershare Customer Service

After the question about “what happend to Foldershare” got answered (Microsoft bought it), the Mac version is back online, the only thing left, that left me wondering, was the question what was going to happen to the US$ 100 I spent just a week before the acquisition on the Foldershare professional service.

Now that also has been answered:

You will be receiving a refund for your subscription at a pro-rated amount. Changes will go into effect early November; FolderShare subscribers will be refunded the pro-rated subscription fee in the week of Nov 7th.

Well done, thank you Microsoft / Foldershare. You earned back quite some goodwill with me again.

And Foldershare just works. Recently I set up a folder between my wife’s PC and our Mac Mini at home so that she can work on her documents at both ends. When she saved her work, she probably saved it to somewhere other than the synchronization folder. When she was at the office, she couldn’t find the document and called me panic stricken. Luckily, Foldershare allows access to any file anywhere on any of the participating computers. So after guiding her through the web interface, she was able to search for her file using Spotlight full-text search, find it and download it to her PC in the office.

Great!

Technorati Tags: , ,

1 comment November 18th, 2005

Long term strategy

That’s what I thought when I read the ongoing announcments (and the howling of the frustrated pro-users) over at Mac Essentials yesterday.

Of course it would be nice to have new multi-core PowerMacs or PowerBooks. But few people would care. The announcements of the new iMac with it’s gadgets, FrontRow and of course the iPod (with video) and iTMS with video and TV-shows appeal to more people. A lot more.

I think Apple is executing a long term strategy that seems to work just really, really nice.

Apple is working on two markets at the moment: The “pro” content creators (video / music) with it’s offering of the PowerMacs and assorted software. And the consumers (iPod, iMac, Mac Mini). One market missing is the corporate market. On my travels in the swiss trains, I see enormous amount of Dell laptops, the occasional IBM Think-Pad and other PC’s. I hardly ever see a Mac. And if I see one, it’s clearly one owned by a creative individual or someone from a small company. Mac’s aren’t being sold to businesses in large quantities. The hurdles to adoption in a corporation must be enormous. And I think Apple wisely is pushing out the battle for the corporation at the moment.

On the other hand, it’s doing very well on the consumer side (witness the iPod and the halo effect). It seems that Apple has 6.6% market share in the US at the moment, and rising fast. So by providing value to the consumers, Apple strengthens that market.

Apple put an enormous amount of work into providing infrastructure for the iPod with iTMS. Now they are doing the same for video. Including TV shows (even if there are only 5, even if the quality sucks) is pure genius. It’s the iPod shuffle all over again: Selling the lack of display as an advantage. Watching a full length movie on an iPod? No, but no thanks, I like my home theater with projector and 5.1 surround sound too much. But watching an episode of a TV show while on the train? Why not?

Quality is an issue at home, but not on the road. TV isn’t exactly about quality (although HD programming could change that). So those people call Steve Jobs a liar think again: Jobs is not giving you movies on the iPod. He’s giving you smaller content that better fits the format of the iPod.

No rival (looking over to the Redmondian empire) has anything similar. I’ll wager that the amount of video and TV shows to come will go up – and probably also the quality. But there are of course also limits of bandwidth. Waiting 10-20 minutes for a TV show is ok. Waiting a day…? But that will come exactly the same way, downloading a piece of music went from 10-20 minutes to a couple of seconds

In the meantime, Apple will have the infrastructure in place to support real videos in HD.

Apple continues to amaze me. They deliver new products on a very short cycle, and they improve things again and again and again. No — it wasn’t the Überbang announcement all hoped for. But like a good chess player, Apple positions it’s pieces one at a time and with a clear view of where the next piece will stand to support a winning strategy. (At least that’s what I think they do – all of their moves look very deliberate)

The give the consumers more value by providing simplicity. 6 buttons instead of 43. Camera included. Music included. TV shows included. Of course the geeks will wail and turn to bittorrent to download the latest Lost episode with 5.1 channel sound and in HD format. But pray, tell me, what would the normal user do, if they would be faces with a directory full of .r01 .r02 .r03 files? (that’s if they grok BitTorrent in the first place)

Apple is doing the right thing. The PowerMacs will follow. But there’s no need too make that big a deal out of it. Apple current big market segment is the media consumer. The producers will know where to find their next fix of hardware goodness from Apple. The consumers need the education. And later — the attack on the corporate world will follow. When a large number of workers have their Macs at home and are used to them. And some of these users will be decision makers….

Technorati Tags: , , , , ,

Add comment October 13th, 2005

Back-up

This is one of the things that I should have been setting up a long time ago, but haven’t. Yesterday was the day. Remote Backup of my PowerBook.

Goal:
Continuous off-site backup of the most important files (my home directory) on my laptop

Ingredients:

  • Strongspace (I got a 4 GiB account for $8 / month)
  • rsync (comes bundled with OS X)
  • Ruby (comes bundled with OS X)
  • SSHKeychain

Setting up a Strongspace account is easy. Strongspace gives you secure offline storage that you access through SFTP or anything with SSH (like rsync). The cost is negligible if you care about what you have on your laptop.

Set up key based login
Drop to a terminal on OS X. Create a dsa key (if you have one, you will know what to do anyway)

$ ssh-keygen -t dsa -b 1024

Leave the default options for where the key is stored (in ~/.ssh/id_dsa) and pick a password.

If you want to use the automated backup as described below, you must leave the password empty (I’m trying to find a better solution to this, but for the time being, that’s it)
You could leave the password empty, but this poses a security risk, because the key you just created identifies your machine to strongspace. Anyone getting access to the private key (the file id_dsa) could impose you. So protect it with a passphrase and let SSHKeychain handle the password handling (using the normal OSX Keychain)

$ cp ~/.ssh/id_dsa.pub authorized_keys

Now you have a file called authorized_keys containing the public key part of the key you just created. Copy this file to Strongspace using the web interface. In your Strongspace account, create a directory called .ssh (note the . dot in front of ssh) and copy that file to there. Now rsync will not ask for a password.

SSHKeychain (that lives in your menu bar) will take care of protecting your private key and make the keys password available to SSH

Create a Strongspace backup directory
I wanted to set up one directory that contains all the stuff I want to backup and have some control over what is included. The simplest thing would have been to backup the complete /Users/name directory, but I’m not backing up my videos, images and music to strongspace. Therefore I created a directory inside my home directory and use Unix file-system links to link in any thing I want:

$ mkdir ~/strongspace
$ cd ~/strongspace
$ ln -s ../Documents
$ ln -s ../Desktop
$ ln -s ../.ssh
$ ln -s ../any_other_directory_you_want__to_backup

First Sync
Let’s try and see if everything works as expected: Type this into a shell

$ rsync -azvCL –exclude=’*.mpg’ –exclude=’Cache/’ –exclude=’Caches/’ –progress ~/strongspace/ account@account.strongspace.com:/home/account/backup/computer/users/name/

all the bold items in that command line are those you should adapt to your environment:
account is your strongspace login
computer is the name of your computer
name is your user name

The options for rsync:
a: archive mode (recurse into subdirectories and preserve ownership and permission of files)
z: compress the data over the wire
v
: verify the data
C
: ignore files CVS style (don’t worry if you aren’t using CVS. This setting just ignores common artefacts from programming and various temporary files)
L
: follow links (we absolutely want this, because this is what makes our strongspace directory work. Otherwise, we’d only have a directory backed up with the links, but not the directories hiding behind those links)

The –exclude option excludes files (all files ending with mpg) and directories ( I’m not particularly interested in the various cache directories)
–progress gives you a bit more information to look at while the initial rsync is running – it could take quite some time

~/strongspace/ tells rsync from which directory to sync, while account@account.strongspace.com:/home/account/backup/computer/users/name/ tells it where to sync to

Prepare to wait quite a while while the initial rsync takes place (depending of course how many files and directories you have linked into your strongspace directory)

Setting up regular sync
Any backup that needs manual intervention is bad. Therefore we want to set this up to work in the background whenever the computer is online.

cron will handle this for us. We could just enter the commandline we just saw above into crontab (the file that controls which programs are started when), but we’ll get a bit more fancy and write a wrapper around this command that gives us some more flexibility.

I expanded a script I found over at textsnippets.com:

The key difference to the one found on textsnippets is the simple configuration (by expanding the EXCLUDES and DIRS variables). And important for me: This script checks if it is connected to the internet before it starts the rsync process. In addition it checks if the computer is connected through a dial up interface (in my case GPRS EDGE using my mobile phone. Syncing large quantities of data over the air is both slow and expensive) and aborts if that’s the case.

Download and save
ss.rb
this script to ~/bin/ss.rb or any other directory/file in your home directory. Open it with an editor and change the following lines to match your account:

# configuration
ACCOUNT = 'account'
EXCLUDE = [ '*.mpg', 'Cache/', 'Caches/']

DIRS = { '~/strongspace' => 'backup/computer/users/name',
         '/etc' => 'backup/computer/etc' }

instead of account use your strongspace account name
I use the distinction computer and name to separate backups from multiple computers and users, feel free to change that

You can try it out by dropping to a shell and typing:

ruby ~/bin/ss.rb

That should print out something like:

06.10.05 10:18: syncing ~/strongspace -> backup/arwen/users/jcf
/usr/bin/rsync -azvCL --delete --exclude='*.mpg' --exclude='Cache/' --exclude='Caches/' ~/strongspace/ account@account.strongspace.com:/home/account/backup/computer/users/name/

lots and lots of info about files it has backed up

06.10.05 10:18: syncing /etc -> backup/arwen/etc
/usr/bin/rsync -azvCL --delete --exclude='*.mpg' --exclude='Cache/' --exclude='Caches/' /etc/ account@account.strongspace.com:/home/account/backup/computer/etc/

Scheduling
Remember: Only backups that you don’t have to do yourself are good backups. So let’s get the computer doing some work for us. I like to run this script every hour, but you can of course change that to whatever cycle you like.

We use cron, the daemon available on any unix system, to trigger the script when it’s time:

$ crontab -e

This opens an editor window. Normally that’s vi, the visual editor. Mastery of vi is considered a black art – and I’m not going to teach it to you: just do the following:

press i to get into insert mode.
Type the following (changing name to your user name of course):

01 * * * * ruby /Users/name/bin/ss.rb >> /Users/name/var/log/ss.log

then press ESC to get into command mode. Now press the following keys: : w q (colon w q). That saves the file and exits vi. You now get a message that the crontab has been altered. At the shell prompt, type

$ crontab -l

and you should see the listing of what you just typed.

We told cron that we want our script to run 1 minute after every hour, every day, every month and every weekday. Check out a quick reference for more options. Also we told cron, that we want a logfile in the directory ~/var/log. This needs to be created:

$ mkdir -p ~/var/log

(the -p option tells mkdir to create any intermediate directories (var in this case) too)

Now you are all set and regular backups should occur 1 minute after the hour.

Have fun!

Technorati Tags: , , , ,

16 comments October 6th, 2005

I did do nothing, mr lev

Apple500

Technorati Tags:

Add comment August 27th, 2005

Active Timer

What a nice little program! Active Timer keeps track of where you spend your time, while working at the computer.

Activetimer

[via TUAW]

Technorati Tags: ,

Add comment August 26th, 2005

Mail Tools

MailTags for Apple Mail, adding Spotlight Meta Information to mails. Looks good, I’ll try it out. From the same people that gave us Mail ActOn (a plugin that I uses extensively)

Technorati Tags: ,

Add comment August 25th, 2005

sqlite3 on Mac OS X — trials and tribulations

For an upcoming Rails project, the plan is to use the sqlite database. On Windows, the whole process of getting this installed was easy. Download the DLL, do a gem install sqlite3& and be done.

Not so on OS X, where I plan to develop.

sqlite3 is installed by default, but trying to install the gem, I get a complaint about a missing sqlite.h file. Fair enough, it’s probably not there. So I download the tarball and do the “./configure && make && make install” dance.

I end up with this error message:

/usr/bin/libtool: for architecture: cputype (16777234) cpusubtype (0) file: -lSystem is not an object file (not allowed in a library)

some googling later, it seems to be related to wrong file permissions, so I repair the volumes file permissions (using the Mac Disc Utility). Re-running “make” yields the same error message.

Incidentally, this is the same error message I got, when I tried to use the Darwin Ports to install sqlite. So I guess, something in my system is hosed.

Update 1: The fix for compiling & linking was as easy as installing the Tiger version of the XCode Tools from the Tiger CD. Back when I upgraded to Tiger, I didn’t install them.

Update 2: When installing sqlite3, also install the sqlite3 gem: sudo gem install sqlite3-ruby

To be continued

Technorati Tags: , ,

1 comment August 9th, 2005

The cult of the mouse

It’s absolutely unbelievable, how little it takes to make a good design. Actually, it’s unbelievable, how much it takes to make so little.

The Mighty Mouse is such a thing. While I haven’t seen it yet, or actually laid hands on it, it seems to me, reading the descriptions, that the designers have put a lot of thought into this. Items like the left/right finger detector. The built in speaker for audible feedback. The roll-thing (I wonder how this compares to the IBM version of old, where a tracking-point was used instead of a wheel — I never got the hang of that and didn’t like it). The squeeze buttons.

I’m really looking forward to try and use this.

It’s amazing, that Apple can make a mouse and I feel a sudden urge to get it asap.

Technorati Tags:

Add comment August 2nd, 2005

Previous Posts


Posts by Month

I wrote the book