skweez.net

Alles skweez?

1001111101101111111101101110100

Alles aus der Kategorie “English posts”

20.12.2010

GNOME Contacts mockups

von mks.

GNOME Contacts: Details
This post is a bit late, because I was too lazy too post it. :-)

A few weeks ago I attended a small GNOME hackfest here in Munich. Actually it was more of a “design fest”. The goal was to design a user interface (and software design) for a new address book application for GNOME. We feel that the current contact managing applications just aren’t easy to use. They often miss a simple and clean UI and integration with other applications.

We see two main problems with the current situation. One being that there is no central address book database on GNOME at the moment. All the applications that use contacts (like Evolution, Empathy, etc.) manage them on their own. Of course this is bad, because the user has to manage the same data multiple times. There is the Evolution Data Server, but it seems it’s not flexible enough to be used by other applications.

The second issue is that there is no easy to use and visually appealing user interface to manage contacts on GNOME. Again, there is Evolution but … well, just open your Evolution address book and you’ll know what I mean.

Last Saturday we mainly addressed the latter problem. We started to design a new user interface. After lots of iterations, we identified four possible basic approaches:

  • Displaying a list or grid of contacts and opening a dialog upon double-clicking. We came already very early to the conclusion that a separate dialog would be the most unelegant solution.
  • Displaying contacts like in the first approach but showing details in the same window upon a double-click, providing a “Back” button to get back to the list.
  • Showing details in-line when a user is selected.
  • Using a three-column approach for groups, contacts, details.

We made mockups for all of the solutions (except for the first one). Salomon and Daniel wrote detailed descriptions of everything we came up with. Everything is on Github.

20.11.2010

Using a GUID Partition Table

von mks.

Disclaimer: This article is not a step-by-step guide for beginners! I did this on Arch Linux, the paths may differ slightly on Ubuntu. Playing with the master boot record and partition table of your system is always a risk. Make a backup! I don’t take any liability for your lost data!

This article describes, how you can switch your system from the old MSDOS style partition table to the new GUID Partition Table (GPT) format. GPT is part of the EFI specification and will therefor probably become the standard for partitioning in most desktop computers in the near future. Apple is already using EFI and GPT in their desktops and notebooks and IA64 based servers and workstations do too. However, you can also use GPT on your BIOS based system.

MSDOS style partition tables are stored in the so called Master Boot Record (MBR), the first sector (512 Bytes) on the disk. It also contains the boot loader, which already takes up 440 Bytes. The partition table must fit into 64 Bytes. This is the reason why you can create only 4 partitions at max (with each entry taking up 16 Bytes of space) in an MBR partition table. Because the size of MBR partitions is stored as 32 bit, each one can be 2 TB large.

If you are, like me, fed up with the limits imposed by MBR partition tables and don’t want to use that hack with extended partitions anymore, you may want to try GPT. A GPT can hold 128 partitions each with a maximum of 8192 Exabytes in size.

What you need

The fdisk tool can not handle GPT. You will need gdisk, which is used in almost the same way. You will also need a compatible boot loader: the old grub 0.97 needs a patch, but grub2 handles GPT fine. However I use extlinux from the syslinux package (>=4.0), because I don’t like the complex configuration system of grub2.

You will also need to move your first partition by 33 sectors (because that’s the space, GPT takes up). If you have a separate boot partition, like me, this is pretty easy. If you don’t, you should probably wait until the next fresh reinstall. ;-)

Compatability

Linux can use GPT and boot from it. Make sure your kernel is compiled with the necessary support:

$ zgrep CONFIG_EFI_PARTITION /proc/config.gz

CONFIG_EFI_PARTITION=y # we're ready to go

FreeBSD can also boot from GPT, but I didn’t test it. Windows cannot boot from GPT partitions in BIOS systems! So if you have a dual booting machine with Windows, you shouldn’t do this.

Let’s rock’n'roll

First, I installed syslinux and gdisk from the repository. You will need syslinux 4.0 or newer. If you did not already update to Ubuntu 10.10, you will have to build it yourself.

I then installed extlinux with my MBR still intact, so I could test if it works. Change sda to your needs! Remember to mount your boot partition!

$ dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda # Copy bootloader to MBR
$ mkdir /boot/extlinux
$ extlinux --install /boot/extlinux
$ cp /usr/lib/syslinux/menu.c32 /boot/extlinux

Create and edit /boot/extlinux/extlinux.conf as described in `man syslinux`, fitting your system. Mine looks like this. Yours should most probably look different!

default menu.c32
prompt 0
menu title Arch Linux
timeout 30
 
label linux
 menu label Linux
 kernel ../vmlinuz26
 append initrd=../kernel26.img root=/dev/sda3 ro resume=/dev/sda2 quiet

After I had a working extlinux config, I rebooted with System Rescue CD. You can not do the following steps on your running system, because you will need to change the partition table and install the boot loader afterwards using the new table. But the kernel will only reload the table at reboot. However you cannot reboot into your system as long as you didn’t install the boot loader.

With the sysresccd running, I mounted my partitions and backed up my /boot.

$ mkdir /mnt/host
$ mount /dev/sda3 /mnt/host
$ mount /dev/sda1 /mnt/host/boot
$ cd /mnt/host
$ tar cf boot.tar boot/
$ umount boot/

Now I started gdisk. It will tell you, that you have a MBR table, which it converted to GPT and that you will have to delete or move your first partition. Delete and recreate it accepting the standards and mark it as legacy BIOS bootable.

$ gdisk /dev/sda
Command (? for help): d
Partition number (1-4): 1
 
Command (? for help): n
Partition number (1-128, default 1): 1
First sector (34-312581774, default = 34) or {+-}size{KMGTP}: 
Last sector (34-112454, default = 112454) or {+-}size{KMGTP}: 
Current type is 'Linux/Windows data'
Hex code or GUID (L to show codes, Enter = 0700): 
Changed type of partition to 'Linux/Windows data'
 
Command (? for help): x
 
Expert command (? for help): a
Partition number (1-4): 1
Known attributes are:
0: system partition
1: hide from EFI
2: legacy BIOS bootable
60: read-only
62: hidden
63: do not automount
 
Toggle which attribute field (0-63, 64 or <Enter> to exit): 2
 
Attribute value is 0000000000000004. Set fields are:
2 (legacy BIOS bootable)
 
Command (? for help): w

You have now converted your partition table to GPT. Last step: restore the contents of your boot partition and install extlinux again, but this time with the boot loader code for GPT partitions (gptmbr.bin).

$ mkfs.ext2 /dev/sda1
$ mount /dev/sda1 /mnt/host/boot
$ cd /mnt/host
$ tar xf boot.tar
$ dd if=/mnt/host/usr/lib/syslinux/gptmbr.bin of=/dev/sda
$ extlinux --install /mnt/host/boot/extlinux

If everything went well, you can now reboot into your GPT system. Good luck. :-)

$ reboot

References

31.08.2010

My current Top 5 Android Apps

von mks.

  1. Aldiko
    Nice eBook reader. Reads books in the epub format. Integrated feature to download public domain books from feedbooks.com. Gratis ad-sponsored version or ad-free for 1,49 US $.
  2. MapDroyd
    Offline, live rendering map application, using Openstreetmap data. No routing, no near places, etc., though. Gratis.
  3. Detexify
    You draw a glyph on the screen of your phone with your finger, Detexify tells you the TeX command for it. Very handy. Gratis.
  4. FeedR
    It’s a RSS reader. That’s it. Google Reader support. 1,99 US $.
  5. Google Goggles
    Take a photo of some landmark, book or painting (and a lot of other things) and Goggles tells you what it is. Pretty cool. By the inventors of not being evil. Gratis.

04.08.2010

Booting a Linux Kernel from USB

von mks.

I am building a custom Linux image to boot on the RoBoard-100 for our FALTER project. As I am currently not in the institute, where the board is, I am trying to boot the generated image in qemu and from a USB stick on my laptop and desktop computers. Booting from qemu works fine, however, booting from USB doesn’t. The Kernel always panics, because it can’t find the root filesystem:
VFS: Cannot open root device "sda1" or unknown-block(8,1)
Please append a correct "root=" boot option; here are the available partitions:

The list of available partitions is empty, even if everything necessary for USB mass storage is compiled in (no modules!): SCSI, SCSI disk, USB, UHCI/OHCI, USB mass-storage.

The problem is, that the Kernel does USB probing in a separate thread and recognizes the USB stick after it’s done with the normal hardware probing and tries to mount the root fs. If you need to boot from USB, a workaround for this problem is the kernel boot parameter rootdelay (e.g. rootdelay=5).

I’ll just stick with booting from IDE, when I’m in the institute again next week. ;-)

18.03.2010

Update: Bluez in Buildroot

von mks.

Here is an update to my last post. I made a small patch to include Bluez in the Buildroot build system. The bug with attached patch is on the Buildroot Bugzilla. When applied to your buildroot you can activate Bluez under Package Selection for the target → Hardware handling / blockdevices and filesystem maintenance → bluez.

Is it working for you? Let me know if you have any problems with it.

18.03.2010

Cross compiling Bluez for Buildroot

von mks.

Update: This post should be obsoleted by this one.

One optional target for our FALTER project (an autonomous UAV) is to have Bluetooth onboard to be able to get live telemetry data from it and possibly also for mission data up-/downloads.

For this we needed to cross compile Bluez for our Buildroot based Linux image. As it took me some time to figure out how to get it working, I think it might be helpful to others to post it here, because it’s not really hard to do, if you just know about the preconditions.

The problem is that Bluez uses pkg-config to find out where some libraries are. However the toolchain libraries are compiled with a prefix like /usr (the /usr on the target device) but you need Bluez to compile against something like /path/to/your/toolchain/usr. Pkg-config supports this through the PKG_CONFIG_SYSROOT_DIR environment variable, which was introduced in version 0.23.

So the most important thing to know is you need pkg-config 0.23. Version 0.22, that still comes with Ubuntu 10.04 (Alpha 3 as of now) is not enough! There’s a bug report for Debian to include the newer version since Apr 2008, but it seems nothing has happened yet. Fortunately someone already packaged it, get it here, or use my precompiled package (for Ubuntu 10.04 amd64).

Our target device is a x86-based embedded board, so we compile for i586. Of course you need to change this appropriately for your architecture.

You need to tell pkg-config, where your cross toolchain libs are with two environment variables:

$ export PKG_CONFIG_SYSROOT_DIR=<path_to_buildroot>/build_i586/staging_dir
$ export PKG_CONFIG_LIBDIR=$PKG_CONFIG_SYSROOT_DIR/usr/lib/pkgconfig

Then configure for cross compiling (note the –host option):

$ ./configure --prefix=/usr --sysconfdir=/etc --host=i586-linux

You are then ready to build with make and can install it with make install DESTDIR=<your_target_fs>.

I will probably try to write a patch to get this into the Buildroot buid system in the next days.

06.03.2010

IP-Adressen serverseitig anonymisieren|Disable IP logging on Apache

von elm.

[lang_de]Am 02.03.2010 hat das Bundesverfassungsgericht die so genannte Vorratsdatenspeicherung für verfassungswidrig erklärt. Aus diesem aktuellen Anlass möchte ich hier kurz erläutern, wie man auf dem eigenen Webserver vermeiden kann, dass IP-Adressen anfallen.

Seit längerem haben wir auf diesem Webserver das Apache-Modul mod_removeip im Einsatz. Das Modul bewirkt, dass alle IP-Adressen als 127.0.0.1 erkannt werden. So kann auch keine PHP Anwendung, inklusive WordPress und Piwik, IP-Adressen speichern.

Piwik selbst versucht wiederkehrende Besucher über Cookies zu erkennen. Ist das nicht möglich, so wird ein Hash über verschiedene Informationen, wie z.B. Auflösung, Browser, aktivierte Plug-ins und auch die IP, gebildet. Da alle Besucher (scheinbar) die gleiche IP haben, werden Benutzer ohne Cookies und mit den selben Einstellungen als ein und der selbe Besucher erkannt. Wie allerdings Panopticlick zeigt, ist es sehr wahrscheinlich, dass man trotzdem eindeutig erkennbar bleibt.

Für alle, die gerne Statistiken haben, aber nicht gleich mit der mod_removeip-Keule drauf hauen wollen, kann ich das Piwik-Plug-in NoIpPlugin empfehlen. Es greift ein, nachdem der Hash erzeugt wurde, aber bevor die IP-Adresse in der Datenbank gespeichert wird. Es werden die letzten beiden Blöcke der Adresse abgeschnitten. So sind wenigstens in der Piwik-Datenbank keine eindeutigen IP-Adressen enthalten.

Am Besten wäre es natürlich, wenn man einfach keine Statistik erstellen würde. Dazu kann ich mich aber nicht durchringen, da ich sehr gerne wissen will, wie viel auf dieser Seite los ist. Das stärkt das Ego. :)

Für weitere Informationen über das Thema “Personenbezogene Daten auf Webservern” empfehle ich noch http://www.wirspeichernnicht.de/.

Die Statistik von skweez.net kann man hier anschauen.[/lang_de]

[lang_en]On 2 March, 2010 the german federal constitutional court has ruled that the data retention law enforcing every communications service provider to save connections data for six month is against the german constitution. For this reason I would like to give you a short introduction about avoiding personal data on your own web server.

We use the Apache module mod_removeip since a while. This module disables IP logging on the web server. Even applications like WordPress or Piwik cannot get the real IP address. Every visitor seems to come from 127.0.0.1.

Piwik tries to use cookies to determine whether you are a recurring visitor or not. If the visitor does not allow cookies an algorithm is used to get a hopefully unique hash based on certain settings of the visitor’s browser like resolution, active plug-ins and of course the IP address. Since the address is always 127.0.0.1 some visitors might be treated like one. But as Panopticlick tells us most likely all your visitors have an unique hash.

If mod_removeip is to heavy for your purpose I recommend using NoIpPlugin for Piwik at least having no IP addresses in your database. This plug-in shortens the IP address right before it’s saved in the database but after the hash is generated. Only the first two blocks of the address are saved.

Most certainly the best way to prevent data is not generating any statistics. But I cannot bring myself to do this because I like to know what’s going on at this site. That’s an ego-boost. :)

For additional information about saving personal data I recommend http://www.wirspeichernnicht.de/ (german).

The statistics of skweez.net can be found here.[/lang_en]

06.03.2010

Image Segmentation

von elm.

Here is a paper from a fellow student about image segmentation.

Image Segmentation has been a long standing issue in the field of Image Analysis and Computer Vision. Practical applications such as computer- driven Facial recognition and Medical Imaging would be very difficult to define without addressing segmentation problems.

This paper focuses on giving the reader an understanding of the basics of well known algorithms and segmentation techniques like Watershed and Graph partitioning methods.

The work is released under cc-by by Loucas L.

Download (pdf)

04.03.2010

Gnome Nautilus sidebar mockup

von mks.

Nautilus sidebar mockup

Click for full size

I think the mode selection of the Nautilus sidebar currently has some flaws, that’s why I made a little mockup.

Please note this is not about its contents, there are already some interesting mockups for this.

I did nothing revolutionary, the changes are really pretty small. Here’s what I did in detail:

  • Remove the border around the selection thingy, it seems useless to me and clutters the UI.
  • Optional: Remove the close button, it looks weirdly out of place and provides duplicated functionality. You can hide and show the side pane with F9 or via the View menu.
  • Change the dropdown into a toolbar. This should be more user friendly because you only need one click instead of two to cange the mode and it’s more visible that something can be clicked here at all. The current dropdown is only visible on mouse-over and looks like a label (besides the little down arrow).
  • Fallback to dropdown, if the available space is to narrow, but always show the dropdown. The current doesn’t look like clickable, see above.

What do you think?

28.02.2010

Menü-Icons in Ubuntu 10.04 (Lucid)|Menu icons in Ubuntu 10.04 (Lucid)

von mks.

Konfigurationseditor

Konfigurationseditor

Deutsch: Seit Ubuntu 9.10 bzw. Gnome 2.28 werden standardmäßig in Menüs keine Icons mehr angezeigt. Bisher kann man dies jedoch in den »Erscheinungsbild-Einstellungen« unter »Oberfläche« wieder aktivieren.

Diese Option wird allerdings, zusammen mit dem kompletten »Oberfläche«-Reiter, in Gnome 2.30, also in Ubuntu 10.04 »Lucid Lynx« aus den Einstellungen verschwinden. Das heißt aber nicht, dass man die Menüsymbole nicht trotzdem wieder herbeischaffen kann.

Dazu startet man mit Hilfe des Ausführen-Dialogs oder eines Terminals das Programm gconf-editor. Hier sucht man nun den Pfad /desktop/gnome/interface und setzt dort den Haken für menus_have_icons.

English: In Ubuntu 9.10 (Gnome 2.28) menus don’t show icons per default anymore and the option to reenable them will be removed from the user interface in Ubuntu 10.04 (Gnome 2.30). If you want to reenable them, run gconf-editor from the »Run« dialog (Alt+F2) or from a terminal, go to /desktop/gnome/interface and check the option menus_have_icons.