Archive for the Category 'linux'

aptitude search

Tuesday, March 09th, 2010

Ich brauche deine Hilfe, denn hier (Tansania) komme ich mangels fehlender Testinfrastruktur nicht weiter. Falls du also ein aptitude (je neuer desto besser) zur Hand hast, kannst Du mir vielleicht das erklären:
aptitude search libstdc
Einen Haufen Resultate
aptitude search libstdc++
Einen Haufen Resultate
aptitude search libstdc++6
Kein Resultat
aptitude search libstdc++5
Kein Resultat

Suche ich nach einem anderen Paket mit vollem Namen funktionierts aber:
aptitude search geany
Ein Resultat.

und so weiter.

Getestet mit aptitude Version 0.4.11.11-1~lenny1

Offline Wikipedia and unicode support

Tuesday, January 26th, 2010

There is an excellent tutorial which describes the procedure to get an offline version of wikipedia. The description can be found here Building a (fast) Wikipedia offline reader (download the all in one file, plus the mediawiki_sa.tar.7z and un7zip it, run the Makefile). The big wikipedia file can be downloaded from here Wikipedia database download

It works pretty straightforward.

The problem which I faced was with the typical German umlauts like ä,ö,ü. If you enter Pfäffikon (my hometown) than you get a nice exception. Of course there is a solution for this problem (have a look for the modified views.py file on the first mentioned site). But because of the lack of internet I solved the problem by myself.

Here the short explanation:
The script receives the HTTP Data in unicode but uses it with the default encoding of Python. The default encoding can be displayed by printing sys.getdefaultencoding(). On my Debian machine it was ascii. So the script tries to change the Umlauts from unicode to ascii, which can’t work.

Two solutions:
Either you add two lines to the file (/etc/python2.5/sitecustomize.py) and set your default encoding to UTF-8
import sys
sys.setdefaultencoding('utf-8')

or

you do the following in the views.py file:
After line 7 (def article(request, article):)
add
article = article.encode('utf-8')
and
replace the line 71 (searchData = request.GET['data'])
with the following line
searchData = request.GET['data'].encode('utf-8')

Now the offline Wikipedia reader should handle umlauts properly

Change Timezone in Debian

Sunday, October 04th, 2009

If you’re in a new timezone (e.g. in Tanzania )and you configured originally your laptop for another timezone, it’s easy to change that in Debian:

Execute the following command as root
dpkg-reconfigure tzdata
Then select your continent and the capital city of your country where you’re staying at the moment.

After that the new timezone will be set and your clock gets adjusted.

Detail:
For Tanzania you have to choose Dar es Salaam, this isn’t the capital city, which Dodoma is, but it’s the de facto capital and biggest city.

Skype mit alsamixer auf einem T60

Monday, September 21st, 2009

Alsamixer ist nicht leicht zu bedienen und damit das Mikrofon über Skype funktioniert muss einiges eingestellt werden.

Bei mir hat es mit diesen Einstellungen funktioniert.

  • alsamixer in der Konsole aufrufen
  • Pfeiltaste links, bis zum Mic auf 60 stellen
  • M drücken, so dass Mic eingeschalten ist
  • Wechseln zu Mic Boost auf 33 einschalten
  • Mit Tabulator in Reiter Capture wechseln
  • Mic auswählen und Space drücken (es erscheint rot L R CAPTUR)
  • Capture auswählen und Space drücken (es erscheint rot L R CAPTUR)
  • Capture auf 47 stellen
  • Wechseln nach Digital und auf 70 stellen
  • Mit diesen Schritten hat bei mir die Konfiguration funktioniert. Die Soundqualität ist noch nicht die beste, da muss man ein bisschen mit den Parametern spielen.

    Dateien mit Passwort schützen

    Wednesday, August 12th, 2009

    Verschlüsseln
    Mit gpg geht das einfach:
    gpg -c test.txt
    Passwort eingeben und wiederholen.
    Die verschlüsselte Datei wurde mit der Endung .gpg abgelegt.

    Entschlüsseln
    gpg test.txt.gpg
    Passwort eingeben
    Die Datei wird entschlüsselt.

    Optionen
    Will man den Algorithmus wählen, so muss herausfinden, welche unterstützt werden:
    gpg --version
    gpg (GnuPG) 1.4.9
    Copyright (C) 2008 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    Home: ~/.gnupg
    Supported algorithms:
    Pubkey: RSA, RSA-E, RSA-S, ELG-E, DSA
    Cipher: 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH
    Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
    Compression: Uncompressed, ZIP, ZLIB, BZIP

    In der Zeile Cipher stehen die unterstützten Algorithmen für die Verschlüsselung mittels Passwort.
    Verschlüsselt man nun mit AES256 sehen die Kommandos so aus:
    gpg -c --cipher-algo AES256 test.txt
    gpg test.txt.gpg
    Beim Entschlüsseln wird der Algorithmus automatisch erkennt.

    imapsync

    Monday, July 27th, 2009

    Die Zeit kommt näher und ich verlasse diesen Kontinent. Das bringt einige Umstellungen in meiner Serverlandschaft mit sich. Mein Mail- und Webserver, der in der Waschküche vor sich hinwerkelt und an einem minderwertigen ADSL-Anschluss hängt, hat ausgedient. Es wird alles zu einem Schweizer Provider gezügelt.

    Für den Mailaccount ist das Tool imapsync ein Traum. Es bietet vielfältige Möglichkeiten, um Mails zwischen zwei Konten zu synchronisieren.

    Nach 5 Stunden Synchronisation waren alle Mails auf dem neuen Account. Irgendwann in den nächsten Wochen wird dann definitiv umgestellt und in der Waschküche kehrt Ruhe ein.

    ls <-> sl

    Tuesday, April 07th, 2009

    Wer hat es schon nicht falsch getippt.

    Für ein wenig Auflockerung sorgt das Paket sl
    aptitude install sl

    Was genau sl macht erklär ich hier nicht, bitte selber ausprobieren. Und als extra sl -laF eingeben :)

    Adobe Reader 9.1 für Linux ist da

    Thursday, March 26th, 2009

    und im Gegensatz zum startet er richtig schnell (kein Einfrieren des Bildschirms während 1/2 Minute).

    Sed und Variablen

    Friday, March 20th, 2009

    $test=”2″
    sed 's/$test/3/g'
    geht nicht
    sed "s/$test/3/g"
    geht

    SMTP Relay Checker

    Sunday, January 04th, 2009

    Unter http://www.rbl.jp/svcheck.php findet man einen Test, welcher den mitgegebenen Server auf Mailrelayfunktionen überprüft.