Nun ist es also soweit: neues Notebook mit (relativ) neuer Hardware und eine Neuinstallation von Ubuntu 10.10.
Es gab und gibt dabei logischerweise wieder den ein oder anderen Fallstrick, von daher hier mal ein kleiner Merkzettel, was wie wo gemacht werden muss, damit das Ganze einigermaßen einfach läuft.

  1. Installation Basissystem / Base installation
    Bei der Installation des Basissystems ist darauf zu achten, dass man schon in der Hauptauswahl die Kerneloptionen “nomodeset i8042.nopnp” setzt, das erste für die Anzeige (man bekommt sonst einfach nur einen schwarzen Bildschirm) und das zweite um das Touchpad benutzen zu können.
    Nach der Installation muss jetzt die Datei /etc/default/grub angepasst werden: GRUB_CMDLINE_LINUX="i8042.nopnp nomodeset nouveau.modeset=0" um auch zukünftige Starts mit Touchpad und Display zu ermöglichen. Nach der Änderung muss der Befehl # sudo update-grub ausgeführt werden.

    In the main option screen (“Try Ubuntu”, “Install Ubuntu”, …) you have to define kernel parameters “nomodeset i8042.nopnp” to get a) the display and b) the touchpad working during live demonstration and installation.
    After finishing the installation you have to edit your /etc/default/grub
    and set the line GRUB_CMDLINE_LINUX="i8042.nopnp nomodeset nouveau.modeset=0" to make the touchpad and display work permanently. After editing you have to issue the command # sudo update-grub.

  2. Grafik mit 3D Beschleunigung / 3d accelerated graphics
    Ubuntu bietet als restricted driver die Version 260.xx an (Paket “nvidia-current”). Dieses funktioniert nicht (siehe auch http://www.nvnews.net/vbulletin/showthread.php?t=155218). Leider ist der 256er Treiber nicht der schnellste, aber er funktioniert wenigstens überhaupt.
    Stattdessen sollte man folgende Schritte ausführen:

    • Ubuntu in den Recovery Modus booten
    • # apt-get remove nvidia-*"
    • # wget http://uk.download.nvidia.com/XFree86/Linux-x86_64/256.53/NVIDIA-Linux-x86_64-256.53.run
    • Treiber installieren
    • Die Datei /etc/X11/xorg.conf editieren, Beschreibung weiter unten

    Do not install restricted drivers (version 260.xx), they do not work!
    Instead, boot into recovery, remove all nvidia related packages and install driver version 256.53 directly from nvidia. The driver is not the fastest on earth, but at least it does work. After installation succeeded, edit the file /etc/X11/xorg.conf. How to edit: see next paragraph.

  3. Xorg Konfiguration / Xorg configuration
    Der Einfachheit halber hier der einzig relevante Auszug:

    Section "Device"
    Identifier "Device0"
    Driver "nvidia"
    VendorName "NVIDIA Corporation"
    Option "ConnectedMonitor" "DFP-0"
    Option "CustomEDID" "DFP-0:/proc/acpi/video/IGPU/LCD0/EDID"
    Option "RegistryDwords" "EnableBrightnessControl=1"
    EndSection

  4. FN Tasten / FN Buttons
    Per default funktionieren nur die Tasten für die Lautstärkeregelung (lauter, leiser, mute). Die anderen Tasten (inklusive ASSIST und VAIO) können aber per acpi angesprochen werden, jedoch müssen die entsprechenden Events erst abgefangen werden. Hierzu kann man mit dem Befehl “acpi_listen” die entsprechenden Events auslesen, oder einfach diese Dateien benutzen:

    Dann fehlen nur noch die Dateien, die ausgeführt werden sollen, wenn die Buttons gedrückt werden. Bisher habe ich nur das Skript für die Helligkeit implementiert (bzw. hier geklaut).

    Darauf achten, dass das Skript auch ausführbar ist!


    Per default, only the buttons for volume control (raise, lower, mute) do work. All the other buttons can be used through acpi, but you have to catch the corresponding acpi events first. For that you can use the command “acpi_listen” or just use the files above.
    I just implemented the brightness control shell script until now, but I could write bash scripts which will be executed if I press one of the other buttons (perhaps enable / disable bluetooth with zoom buttons?! :-) )

Linksammlung / Resources

Comments Off

September 16th, 2010 | Tags:

Nur für mich als Memo: Klick

Comments Off
August 8th, 2010 | Tags: , , ,

The problem of CSRF attacks is commonly known. If you did not hear about this kind of attack, I recommend reading this article of the OWASP Project to you.
We will now think about how to prevent this attacks. The best way, which is transparent to the user, is to create a token for every special request a user does. Special request means something like deleting, editing or creating something like a post or a user account (the own or in case the user is an administrator editing the account of another user) or writing a message to another user…
Read more…

Comments Off
June 24th, 2010 | Tags:

Apple hat es geschafft. Endlich werden Träume wahr und die Frage bei Freunden, wenn man das neue Spielzeug vorstellt “Kann man denn damit auch noch telefonieren?” kann endlich mit “Nein” beantwortet werden.
Demonstration

Hier ein schöner Artikel dazu (ist ja alles nicht so schlimm, telefoniert man eben nur noch mit einem Bluetooth Headset :-D )

Comments Off
June 21st, 2010 | Tags: , , , , ,

A tiny script to have your video- or music library updated when ever a new file is added or modified / removed
from one of the folders which are watched.
Uses inotify and xbmc-send. Tested on Ubuntu 10.04.
Just download the script and run it manually or in background after changing the path variables in the script.

Ein kleines Skript, welches anzugebende Ordner auf Veränderungen überwacht. Werden Dateien modifiziert (also hinzugefügt, gelöscht oder umbenannt) wird ein Update der XBMC Medienbibliothek getriggert. Ich habe es auf einem Ubuntu 10.04 am laufen, funktioniert einwandfrei :-)
Einfach das Skript runterladen und dann manuell oder im Hintergrund ausführen (nachdem man die Pfade im Skript angepasst hat).

You don’t want to enter your password for a partition (e.g. root partition) every time
the computer starts? Then you should use a key file on an USB stick or something similar.
But wait… you want to be able to unlock the partition as well with your password when you don’t
have your USB stick with you? Or your USB stick does not have the same device identifier (e.g. /dev/sdc1)
OK, then do it like this (I AM NOT RESPONSIBLE IF YOU BRICK YOUR SYSTEM! Make sure you have a live CD for rescueing if you make a mistake ;-) ). Read more…

Comments Off