About Me

Mein Bild
Freelancing software developer / architect, mobile geek. Topics: Software technologies (java, groovy, agile), politics, web, science, green, mobile, android.
Homepage: www.tutaona.com

"The absence of limitations is the enemy of art." - Orson Welles
Posts mit dem Label linux werden angezeigt. Alle Posts anzeigen
Posts mit dem Label linux werden angezeigt. Alle Posts anzeigen

Montag, 21. November 2011

German Umlauts For US Keyboard

As a programmer and console lover I very much prefer the US keyboard layout but when writing in German I need a convenient way to access the German Umlauts. I also hate the capslock key as I always hit it by accident, so I want to remove it from my layout. Before I knew how to do this I even ripped off the cap from the capslock key. Here is how:

Create a user xmodmap config file:
gedit ~/.Xmodmap
Paste these key mappings inside:
! Umlauts with modifier RIGHT ALT + 
keycode 108 = Mode_switch
keysym e = e E EuroSign
keysym c = c C cent
keysym a = a A adiaeresis Adiaeresis
keysym o = o O odiaeresis Odiaeresis
keysym u = u U udiaeresis Udiaeresis
keysym s = s S ssharp
Activate instantly:
sudo gedit /etc/pm/sleep.d/50-xmodmap.sh
Did I mention that I hate the capslock key?
System Settings > Keyboard Layout > [your layout] > Options > Capslock key behavior = Caps Lock is disabled

External USB keyboard
The xmodmap trick doesn't work whe the computer resumes from suspend. So we have to execute xmodmap on resume.

#!/bin/bash

. /usr/lib/pm-utils/functions

case "$1" in
    hibernate|suspend)
    ;;
    thaw|resume)
xmodmap $HOME/.Xmodmap
    ;;
    *)
    ;;
esac

exit
Finally make is executable:
sudo chmod 755 /etc/pm/sleep.d/50-xmodmap.sh

Dienstag, 29. März 2011

Snapshot Backups with Linux

I must admit that I was always a bit jealous about the Mac's backup system 'time machine'. Recently I bought a small Linux based NAS (WD MyBook World) and so I wanted to explore if I could find a similar solution like the Mac has got. I found it in Time Drive:

First I found these three candidates, the usual suspects so to say:
  1. TimeVault
  2. Flyback
  3. Back in Time
They all looked not bad but after I browsed some reviews 'Back in Time' drew my attention. Playing around with it I learned that it cannot handle backups to a remote machine. There are of course workarounds (and one more) but I got nervous about the hard links used for unchanged files and it was pretty much obvious the hard links won't work via FTP. The workarounds used sshfs where hard links are no problem but I'd lose some throughput for sure.

For TimeVault there is no 64 bit package and it depended on python 2.5 while my ubuntu 10.04 is already on 2.6.... Meh. Flyback does look kind of unmaintained and also does not support remote machines as backup target.

Just by chance I came across Time Drive which uses duplicity instead of rsync. And I just found it because I looked for a GUI for duplicity. There is virtually no blog entry or review of linux backup software mentioning Time Drive - which is  quite a shame. Duplicity supports a lot of remote options, even Amazon S3 and encryption. They say it's still beta but it has already quite a history, so I think it's mature enough. Well, the UI looks partly copied from Back in Time which I find quite legitemate with OSS. Most of the workflow reminds a lot on Back in Time. Unfortunately Time Drive got its last update in April 2010 - so it might be half dead but it also looks fully featured though. I made my first backup and time will tell if I will keep using it.