Powered by
Movable Type 5.2.9

 November 2006 Archives

2006, November 03 (Fri)

Linux bequemes Netzwerking

Ich hab mal wieder mit ein wenig mit ifplugd und guessnet gespielt. ifplugd ist ein kleiner Daemon, der ein Interface überwacht und falls dieses Interface einen Link hat (sprich: Kabel eingestöpselt oder im Falle Wlan in einen AP eingebucht) ein ifup auf das Interface ausführt. Sehr praktisch; heimkommen, Kabel rein, Netz tut, ab in die Uni, Wlankarte rein, Netz tut.

Ein Auszug aus meiner /etc/network/interfaces
mapping eth0
script /usr/sbin/guessnet-ifupdown
map default: dhcp

mapping eth1
script /usr/sbin/guessnet-ifupdown
map default: dhcp
map verbose: true

iface home inet static
address 192.168.156.66
netmask 255.255.255.0
network 192.168.156.0
broadcast 192.168.156.255
gateway 192.168.156.144
dns-nameservers 192.168.156.144
up /usr/local/sbin/neednet
test peer address 192.168.156.144 mac 00:40:33:A6:43:88

iface brenzstrasse-wlan inet dhcp
up /etc/init.d/openvpn start brenzstrasse-wlan
down /etc/init.d/openvpn stop brenzstrasse-wlan
test peer address 10.22.0.1 mac 00:17:31:B4:21:28

iface uni-wlan inet dhcp
wireless-essid welcome
wireless-mode managed
up /usr/local/sbin/uni-ulm-kiz-gast.pl
test peer address 134.60.237.254 mac 00:50:8B:EB:6A:A0

iface dhcp inet dhcp

Über das mapping eines Device wird ein default Ergebnis festgelegt, zum Beispiel ein auf DHCP konfiguriertes iface.

guessnet im ifupdown-Modus wird elegant über /etc/network/interfaces konfiguriert. Dazu müssen die Zeilen innerhalb eines iface mit test anfagen und zum Beispiel mit peer, wireless oder command weitergehen.

Die test peer address Zeile testet auf die MAC-Adressen bestimmter Rechner

Das ganze lässt sich noch mit wpa_supplicant kombinieren, das wenn es ein Wlan findet nach bestimmten Regeln die Wlankarte konfiguriert, so das ifplugd dann einen Link feststellen kann (sollten mehrere Netze verfuegbar sein).


2006, November 06 (Mon)

Linux BitchX on Debian amd64 Or vserver debootstrap chroot

Let me put it straight right away; I didn’t get bx to work reliably on amd64 and I don’t have the necessary C knowledge nor enthusiasm to endulge myself in finding the problems. What I’ll outline here is just the same style instruction on how to set up an ia32 chroot that can be found in many places on the net.

Update: It seems that some other linux distributions invest a bit more into amd64 compatibility than debian. I haven’t tested these patches yet, though. (But I could spot the /window crash bux fix.)

This post will give me enough information to recreate this setup at a later time — if you need any more details feel free to contact me.

Some sample instructions on how to set up such a 32bit chroot inside an amd64 environment can be found on https://alioth.debian.org/docman/view.php/30192/21/debian-amd64-howto.html#id292281

I just did debootstrap --arch i386 etch /var/ia32; of course you need to install debootstrap first. However, my 64bit are on a virtual server which does not allow me to execute mount commands even as root. That gave me a little headache, as debootstrap would crash in the middle; the reason apparently being that it tried to mount /proc, which it couldn’t (but it didn’t tell me that!):

[...]
I: Extracting zlib1g...
zsh: exit 2     debootstrap --arch i386 etch /var/ia32

The result was a broken debian installation without any much needed programs like apt, that with the help of Myon from #debian I could fix - however, I have no clean path. First, I entered the chroot: SHELL=sh chroot /var/ia32,
then I needed to create a few files: touch /var/lib/dpkg/{diversions,statoverride},
next, I tried to install all the packages debootstrap had downloaded: dpkg -i /var/cache/apt/archives/*.deb,
however, that wouldn’t quite work and I got a shitload of errors.

So the next thing I did was to run dpkg --configure -a, a typical command to execute whenever something with dpkg isn’t working quite right. Then I reran the dpkg -i command, which still bailed out, but with a few less packages on the list. Now started the fun part, I resolved all the dependencies by hand, installing each package manually with dpkg -i /var/cache/apt/archives/PACKAGENAME.deb. Oh the joy. After each install I reran dpkg --configure -a and looked at the top line to see what it was complaining about, for example

dpkg: dependency problems prevent configuration of lsb-base:
 lsb-base depends on sed; however:
  Package sed is not installed.

which I then follewed with a dpkg -i /var/cache/apt/archives/sed*.

For the last error:

Setting up base-files (3.1.16) ...
mkdir: cannot create directory `/var/mail': File exists
dpkg: error processing base-files (--configure):
 subprocess post-installation script returned error exit status 1

I simply had to rm /var/mail. Phew. Set up.

(Note: I did not follow the “fstab / mount” steps outlined in the AMD64 HOWTO nor did I set up schroot.)

Hit the jump if you want to learn about BitchX.

Continue reading “BitchX on Debian amd64 Or vserver debootstrap chroot” »


2006, November 09 (Thu)

 Bibliotheker kriegen wohl nur schlechtes Crack

Ein Auszug aus der Hilfe der Bibliothek der Uni Ulm:

Der Katalog 2 läuft als Windows-Applikation auf einem Terminalserver. Über ein im Webbrowser des Benutzers laufendes Java-Applet werden Bildschirmdarstellung und Tastatureingaben von diesem Terminalserver auf den PC des Benutzers umgelenkt. Diese Besonderheit bringt es mit sich, daß ein direktes Ausdrucken aus dem Katalog 2 (z.B. von Ergebnissen einer Recherche) nicht möglich ist.

Bestellen, verlängern und so weiter ist natürlich nur darüber möglich.


2006, November 14 (Tue)

Linux mplayer & via mpeg2 hardware decoder

My VIA Epia board is a bit weak to decode DVDs with the processor, so it has a hardware mpeg2 decoder on board. On Windows, this can be accessed with either PowerDVD http://www.cyberlink.com/ or WinDVD http://www.intervideo.com/

Googling reveals that there is a “VIA enhanced Xine Player” called VeXP for Linux that is supposed to do the job. However, I like mplayer and I had read that it would support XvMC — the XVideo-MotionCompensation extension — which is supposed to be a general layer to access hardware accelerated mpeg2 decoders.

(II) VIA(0): [XvMC] Registering viaXvMC.
(II) VIA(0): [XvMC] Initialized XvMC extension.

Of course, compiling mplayer with ./configure --enable-xvmc did not work.

MPlayer dev-SVN-r20923-4.1.2 (C) 2000-2006 MPlayer Team
CPU: VIA Nehemiah (Family: 6, Model: 9, Stepping: 8)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 SSE
[...]
vo_xvmc: X-Video extension 2.2
vo_xvmc: X-Video MotionCompensation Extension version 1.1
[...]
======================================================================
Forced video codec: ffmpeg12mc
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
[VD_FFMPEG] XVMC accelerated codec.
INFO: libavcodec init OK!
Selected video codec: [ffmpeg12mc] vfm: ffmpeg (FFmpeg MPEG-1/2 (XvMC))
======================================================================
[...]
[VD_FFMPEG] XVMC-accelerated MPEG-2.
[VD_FFMPEG] Trying pixfmt=0.
[...]
VDec: vo config request - 720 x 576 (preferred colorspace: MPEG1/2 Motion Compensation and IDCT)
Trying filter chain: vo
vo_xvmc: query_format=1DC70082
vo_xvmc: Querying 1 adaptors
vo_xvmc: Quering adaptor #0
vo_xvmc: probing port #68
vo_xvmc: XvMC list have 2 surfaces
vo_debug: query(MPEG1/2 Motion Compensation and IDCT) returned 0x0 (i=0) 
vo_xvmc: query_format=1DC70002
vo_xvmc: Querying 1 adaptors
vo_xvmc: Quering adaptor #0
vo_xvmc: probing port #68
vo_xvmc: XvMC list have 2 surfaces
vo_debug: query(MPEG1/2 Motion Compensation) returned 0x0 (i=1) 
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
SwScale params: -1 x -1 (-1=no scaling)
Trying filter chain: scale vo
vo_debug: query(MPEG1/2 Motion Compensation and IDCT) returned 0x0 (i=0) 
vo_debug: query(MPEG1/2 Motion Compensation) returned 0x0 (i=1) 
The selected video_out device is incompatible with this codec.
Try adding the scale filter, e.g. -vf spp,scale instead of -vf spp.
[VD_FFMPEG] Unexpected init_vo error.
vo_xvmc: query_format=4D504553

Asking in #mplayer again (as I did in my last post about it), iive tolde me that the mplayer xvmc support would only work with NVIDIA’s hardware mpeg2 decoder. What a disappointment!

Turns out there is a (slightly outdated) patch at http://www.openchrome.org/ that brings the VIA XvMC support to mplayer.

Update: Check out their Mailing List, it might contain more recent and more professional patches!

Continue reading “mplayer & via mpeg2 hardware decoder” »


2006, November 27 (Mon)

Linux, Web Dump misc scripts: 32bit chroot on 64

compiling software in a 32bit chroot on a 64bit box which tries to loot out the arch with “uname” requires some guidance:

/usr/local/bin/uname

#!/bin/sh
/bin/uname "$@"|sed -e's/x86_64/i686/'

Linux, Web Dump misc scripts: shadow mirror (aka xcopy/t)

populate a directory tree without the actual files, for example if you want to show someone your hdd content without giving her the data:

on the system with the data, create a list of directories:

find -type d > hdd_dirlist

and a list of files:

find -type f > hdd_filelist

on the target, replay these with

perl -ne'chomp;mkdir$_' ~/hdd_dirlist
touch .empty
perl -ne'chomp;link ".empty",$_' ~/hdd_filelist

beware of the links, if you want to put an actual file in place of a shallow one, rm it first or modify the scripts to create files instead of just links.