• How to limit the size of a Time Machine networked backup

    Posted on February 2nd, 2009 ola No comments

    As a little reminder to self, here is how you do it – from macosoxhints.com via Bytex. If you don’t limit the size of the DMG you will apparently run into problems with Time Machine (TM) killing off your entire backup. I currently use a smallish USB disk for backup, but I would much rather have TM back up over the network, preferrably via SSH. Unfortunately, ExpanDrive does not support this officially. I am planning on giving it a try over ordinary sshfs in Fuse. I’ll be back with more.

  • Topp-posting – det eg kaster bort mest tid på i løpet av dagen.

    Posted on December 7th, 2007 ola No comments

    I forretningsverda er det blitt slik at det er vanleg å topp-poste. Dette medfører at istadenfor ein vanleg tekstflyt lyt ein begynne nederst i eposten og lese oppover for å få med seg heile historien. Personleg brukar eg utruleg mykje tid på dette i høve til å kunne lese ein korrekt sitert epost. Difor oppmodar eg alle om å legge til denne vesle tankevekkjaren i signaturen sin – på fritt vald målføre:

      A: Fordi det er heilt motsett av den måten menneske vanlegvis les tekst.
      Q: Kvifor det?
      A: Topp-posting.
      Q: Kva er det mest slitsame i epost og på news?

      A: Fordi det er helt motsatt av den måten mennesker vanligvis leser tekst.
      Q: Hvorfor det?
      A: Topp-posting.
      Q: Hva er det mest slitsomme i epost og på news?

      A: Because it messes up the order in which people normally read text.
      Q: Why is top-posting such a bad thing?
      A: Top-posting.
      Q: What is the most annoying thing on usenet and in e-mail?

    Meir om det same:

    http://audun.norblogg.net/2007/01/10/sitering-av-epost/
    http://home.online.no/~vidaandr/news/OBSquoting.html
    http://antibiomatika.net/usenet/quoting.html

  • Finally figured out how to customize Spaces “Switch directly to a space”shortcuts

    Posted on November 22nd, 2007 ola 3 comments

    I started using Linux in 1997, and fell in love with virtual desktops right away. A real productivity-booster. When I turned to Mac OS X in 2006 after a hard breakup with Linux on my laptop one of the first things I installed was VirtueDesktops. It worked very well, and  I used it all the time.

    Then came Leopard bringing not gifts, but Spaces. Spaces is one of the worse implementations of virtual desktops I have seen.

    1. Impossible to turn off the animations when switching desktop. Theese animations tend to get slower during the day also.
    2. Impossible to have more than 4 columns of desktops
    3. When you Cmd-Tab around in your applications you also switch desktop. With the whole animation and all this is horrible. Just ask Nick Santilli over at theAppleBlog.
    4. You may not set up your own keyboard shortcuts for direct access to each desktop. You must live with <Modifier>+<Number>

    The first three annoyances are something I cannot remedy that easily. But number four is something you may actually do something about! Or at least, there is a workaround.

    Enter Butler.

    Butler is a tool to make repetitive tasks easier. Like launching applications. It’s much like QuickSilver in many ways. The Butler website has some challenges as I write this, so I enclose the install DMG here.

    Download Butler:  butler.dmg.zip

    Now, for the setup. I want to have a grid of 4×2 desktops. I want the upper row to be accessible with Cmd-Esc to Cmd-F3, and the lower row with Cmd-1 to Cmd-4.

    So, what to do?

    * Start Butler.

    * Modify your spaces settings. Set the “Switch directly to a space” key to be Option, as you want Cmd as your future hot
    key, and Control is convenient for having as the real spaces shortcut. See illustration below.

    Dock-7
    * Configure/Customize Butler. Add a new Keystroke Smart Item.

    Butler Add Item

    * Then add a name to it, like “Workspace 1″. Also give the keystroke that you want Butler to generate.
    Workspace Keys

    * Now select the “Triggers” tab, and give the hotkey wanted for switching to that workspace. I prefer my first workspace to be on Cmd-Escape:
    Workspace Hotkey
    * Repeat the process for all your desktops/workspaces, then go back to System Preferences and make the hot key for “Switch directly to a space” to be Control (^).

    Workspace Hotkeyspaces

    Voilá. You now have your own hotkeys for navigating directly to a desktop in spaces.

  • Backing up the Leopard?

    Posted on October 30th, 2007 ola 8 comments

    I have now switched to Leopard, and wanted to test out the much anticipated Time Machine that supposedly makes backups a breeze. So I happily plugged in a empty USB drive, Time Machine asked me if I wanted to use that disk as a backup disk, and then it started backing up my data so that I can easily restore them… or not.

    You see, I am one of those paranoid geezers that like to keep their files encrypted in case someone steals their laptop. So I use Apple’s built in encryption, FileVault, for my home folder. And it seems Time Machine does not play as nice with FileVaults as it does with non-protected data. Time Machine itself states, albeit not in that exact wording, that it sucks with FileVault:

    Time Machine Filevault

    Another thing that annoys me with Time Machine is that you cannot make bootable backup disks with it. When your laptop gets stolen or your disk crashes and the customers are calling you every ten minutes the luxury of just plugging your USB/Firewire disk in, boot from it and have your complete work environment ready is pretty priceless. I’ve been there. Spending time reinstalling may not always be an option.

    My current backup scheme that allows for this consists of two parts:

    • Using RsyncX for backing up my entire system. This approach has the same caveat as Time Machine – I prefer to log out and back in as a second Admin user in order to successfully unmount the sparsebundle (sparseimage in Tiger) that holds my home folder, so that I am sure that it gets backed up properly. There is one “problem” with this – I only get the latest snapshot of my complete system. I can live with that, as I can boot from it. This method is not new, I used this howto from 2005 to get it rolling.
    • Using plain rsync over ssh to get incremental backups of my home folder. I used a slightly modified version of the “backup to a central backup server with 7 day incremental” from the rsync examples page. Since this runs over ssh to a server at home I may take backups while on the run with my laptop, so I do not have to lug around the extra USB drive in order to get backups done.

    The combination of theese two methods makes restoring my system in case of a disk replacement as easy as two rsync commands after I boot from my USB drive:

    1. Rsync the entire contents of the USB drive into the new disk after partitioning it. The backup USB disk is, needless to say, also the perfect rescue tool.
    2. Log in as my FileVaulted user and update my home folder from the server via ssh.

    However, if bootable backups is not a priority and you are OK with carrying the extra Time Machine backup disk with you and risk getting BOTH your laptop and your backups stolen – then Time Machine is for you. Also, if you are a home user with a desktop Mac Time Machine is also probably perfect for you. But as a laptop user with security needs Time Machine is not an ideal solution. The rsync setup is also more of a hack, and could be more seamless.  Any hints towards a seamless, fast restore, backup regime for security-minded laptop users is greatly welcome :)

  • Leopard finally supporting ssh-agent at login

    Posted on October 28th, 2007 ola 8 comments

    In previous iterations of the feline OS we had to rely on SSHKeyChain in order to get a working ssh-agent setup that was global to all applications and not only for the current bash instance.

    With Leopard the environment variable $SSH_AUTH_SOCK is set automatically, and the ssh-agent is managed by launchd (I think). SSHKeyChain may still prove useful for setting up tunnels, but I see no point in waiting for yet another application to start at login.

    If you have been using SSHKeyChain you must remember to go into it’s Preferences and Uncheck the “Manage (and modify) global environment variables” ticker, otherwise SSHKeyChain will override the OS settings – even if it’s not running.

    Sshkeychain
    The actual adding of ssh keys is a bit non-intuitive for people used to doing ssh-add. Just using ssh-add <keyfile>  will only add the keyfile to the current session. If you want to never type your passphrase again, but let ssh-agent get your passphrase from Keychain every time you try to use the ssh key/identoty file you need to have a few things in place:

    * Your <identity>.pub must be present in the remote accounts $HOME/.ssh/authorized_keys file

    * You may use this syntax from the command line to add the key: ssh -i <identity file> user@host . I guess you may do this from the Keychain Access application in some way too, but I was not able to find out how. There must be a slicker way.

    So, I used this command in my terminal to add my “lolcats” private key/identity to my Keychain:

    ssh -i lolcats lolcat@hostname.tld

    And up came this dialog window, voilá:

    Dock-1