/usr/portage

Colorful Bash-Prompt 0

<img src=”/img/bash-prompt.png” alt=“Colorful Bash-Promp” style=“float:left” />
Sven Herzberg asked me to fix a bug in his bash-prompt ($PS1). So I got the idea to catch his prompt, adjust some stuff and use it as mine. Here is the code:<br style=“clear:both” />
TTY=$(tty | awk -F "/" '{print $3"/"$4}') YELLOW_BOLD="\[\033[01;33m\]" GREEN_BOLD="\[\033[01;32m\]" WHITE_BOLD="\[\033[01;37m\]" RED_BOLD="\[\033[01;31m\]" VIOLET_BOLD="\[\033[01;35m\]" GRAY_BOLD="\[\033[01m\]" YELLOW="\[\033[0;33m\]" GREEN="\[\033[0;32m\]" WHITE="\[\033[0;37m\]" RED="\[\033[0;31m\]" VIOLET="\[\033[0;35m\]" GRAY="\[\033[0m\]" PS1="${GRAY}\$(RETURN=\$?;[ \"\${RETURN}\" != \"0\" ] &amp;&amp; echo \"\${RETURN} \")${ YELLOW}\$(date +[%H:%M]) $([ $(whoami) != root ] &amp;&amp; echo ${GREEN_BOLD}$(whoami)$ {WHITE}@)${RED_BOLD}${HOSTNAME%%.*}${WHITE}:\$(if [ \$(jobs | wc -l) != 0 ]; the n echo \" ${VIOLET}(bg: \"\$(jobs | wc -l | awk '{ print $1 }')\")\"; fi)${WHITE } \w${GREEN} ${TTY} \$ ${GRAY} "

Filed under & no comments & two trackbacks

News section "Currently Listening" 0

I’ve kicked my jabber-addon and added the “Currently Listening”-Category to my weblog. Sinc I use MPD/MPC for listening music, it is easy to realize something like this. The following script does it perfectly
#!/bin/bash CURRENT=$(MPD_HOST=adorno MPD_PORT=6600 mpc | head -n1) HTML_CURRENT=$(echo ${CURRENT} | awk -F " - " '{print "Artist: \ &amp;lt;b&amp;gt;"$1"&amp;lt;/b&amp;gt;&amp;lt;br /&amp;gt;Song: &amp;lt;b&amp;gt;"$2"&amp;lt;/b&amp;gt;"}') echo "${HTML_CURRENT}" | ssh -q -T schokokeks.org \ "cat &gt; path/to/playlist.html"

Filed under & no comments & three trackbacks

Neue Texte-Sektion auf strojny.net 0

Nachdem ich heute bei Martin Blumentritt den wundersch

Filed under , & no comments & one trackback

Music Player Daemon 0

<img src=”/img/gmpc.png” alt=“GNOME music player client” style=“float:left” />
While setting up, I want to have an elegant solution for listening music. So the server gets a soundcard. Until now I’ve played music with Rhythmbox or BMP player, depending on my daily mood. The first idea of mine was to use a standalone sound-daemon. I decided to try esd but Alan Cox said the right thing about it: “I don’t know why and I’m not yet motivated to fix it since my views on esd are mostly unprintable.” Esd is buggy, its ugly code and its not usable. So I kicked it. Then I was looking for other Daemons. I looked at arts, but it depends on QT and QT itself depends on X. And who wants to have X installed on a Server? Also NAS depends on X, so it is also not the right thing for me.

Again I looked to the portage and I found MPD, Music Player Daemon. It sounded really interesting and so I tried it out. Now I know, this was really the best thing, I could do. NAS is a serverbased daemon and there are a client for near to every interface you want to have. Currently I’m using gmpc and it works quite fine. MPD works a bit different from esd and consorts. It is not only an output-daemon but a complete framework to play music, which is directed on the server, with nice clients and the server soundcard is used as the output device.

Filed under , , & no comments & no trackbacks

Crypt your partition with dm_crypt 3

dm_crypt is the modern replacement for the cryptoloop-stuff. I’d used such a cryptoloop-partition since may but I’m not pleased with the latency and scaling. It is quite too slow. So I tried dm_crypt and now I’m suprised. It feels really faster and is nicer to use (it is handled just like an LVM2-device).

Setup using Gentoo:
PLEASE read any other manual to understand what you’re doing, because otherwise you will surely destroy your data. I’m not responsible, if you make crap!

Install the packages we need:
emerge lvm2 cryptsetup
Select the partitions for LVM:
pvcreate /dev/hda1 /dev/hdb2
Create a volume group (vg_name is free to choose):
vgcreate vg_name /dev/hda1 /dev/hdb2
Create a logical volume (home is a name and free to choose):
lvcreate -n home -L 10GB vg_name
Create a random 32 char long key:
head -c 50 /dev/urandom | uuencode &ndash;base64 /dev/stdin | grep -v 'begin' | head -c 32 &gt; /root/crypto/home.key
Encrypt with GnuPG:
gpg &ndash;symmetric /root/crypto/home.key
Secure remove the unencrypted key:
shred &ndash;remove /root/crypto/home.key
Setup your dm_crypt partition:
gpg &ndash;quiet -d /root/crypto/home.key.gpg | cryptsetup -c aes -s 256 -h plain create home /dev/vg_name/home
Create a filesystem (recommended in every case: xfs)
mkfs.xfs /dev/mapper/home
Mount your dm_crypt-partition
mount /dev/mapper/home /home

A small dirty-hack init-script for Gentoo:
depend() { after *
}

start() { einfo “Initializing dm_crypted Partition” gpg –quiet -d /root/crypto/home.key.gpg | cryptsetup -c aes -s 256 -h plain create home /dev/vg/home” eend $? einfo “Mounting dm_crypted Partition” mount /home eend $?
}

stop() { einfo “Umounting dm_crypted Partition” umount /home eend $? einfo “Removing dm_crypted Partition” /bin/cryptsetup remove home eend $?
}

Filed under , , & three comments & three trackbacks

DBUS, Hal and gnome-volume-manager 0

<img src=”/img/gnome-volume-properties.png” style=“float:right;” alt=“gnome-volume-manager – handle your devices automatically” />
I want to see some technology-previews of GNOME 2.8 and I decided to test the Hal/DBUS in combination with the gnome-volume-manager.
I’ve set up my Laptop using udev and I was really suprised. It works nice and you don’t need any entry in the fstab. These things were all automatically managed by the hal-daemon (hald). With gnome-volume-properties you can adjust the settings, what should be done, if you plugin a audio-CD for example.

Short manual for Gentoo-Users:

emerge gnome-volume-manager
echo “sys-apps/dbus” >> /etc/portage/package.unmask
echo “sys-apps/hal” >> /etc/portage/package.unmask
echo “gnome-base/gnome-volume-manager” >> /etc/portage/package.unmask

emerge gnome-volume-manager

rc-update dbus default

Setting up udev
Being sure, that devsfs is inactive.
grep DEVFS /usr/src/linux/.config

  1. CONFIG_DEVFS_FS is not set

grep ^RC_DEVFSD /etc/conf.d/rc
RC_DEVFSD_STARTUP=“no”

shutdown -r now

After reboot
Configure the behaviour with gnome-volume-properties and force gnome-volume-manager to start at GNOME-Loading with gnome-session-properties

Thats it!

Filed under , , & no comments & two trackbacks

And again and again and again: MAC-addresses aren't secure 0

<img src=”/img/random-mac.png” alt=“randomized MAC-addresses” align=“left” />
Why the hell does so many people think, that they can secure anything while using MAC-adresses to “authorize”? Its a trite platitude that everyone can set the MAC-address to whatever he want. But ok, if no one trusts me, here is the implementation from the Gentoo-developers. The new layout of the net.ethX-initscripts allows to run something “pre up”. So you also can run a programm like macchanger. I’d made a small addition to display the MAC-address which was set.

Filed under , & no comments & no trackbacks

aKademy, Server crash and holiday work done 0

Kindergarden, Klassroom, Kollege, aKademy, Kompany, Koffin…
Currently I’m visiting the KDE World Summit, called aKademy. I don’t really have my focus on KDE but takes place ten minutes away from my ::1 and also I dot no have school, so it is a nice pastime.
Also I can develop some stuff in GNOME. In the next days I want to fix some panel bugs and include some evolution-features.
Also herzi set me a forward from lars@gnome-de.org and mastaYoda@gnome-de.org to an existing account. So I have access to mailnicks on such a nice domain ;)

<span style=“text-decoration:line-through;”>MD5</span>
Today I’ve looked for a replacement for the broken md5sum. I’ve checked out sha256sum, from the package hashsum. I’ve writed a eBuild and now it is installed on my loveliest Cookie.

Servercrash
On Saturday, August 21, my server at home was destroyed while changing to new hardware. My backup- and music harddisc was lost and I was forced to barter it. So, if all was destroyed, I think, it is not a problem to set all up clearly and nice. No I’m used LVM2 for partition setup and dm_crypt for preventing security holes. Now my new hardware is working quite fine, nice SCSI-discs, a really faster processor and so on. There is a small tip: Don’t try IDE-hotplug if your hardware isn’t designed for. It is also important, to don’t do such thing intentionally.

Holiday job
After three hard and really boring weaks, my holiday job is done. Now I have enough money to buy a new laptop and do such other nice things a wished in the past.

In the last days I played with DBUS, hal and udev. Also I’m currently using MPD and gmpc to play my music. More tomorrow respectively after sleeping.

Filed under , , , , & no comments & two trackbacks

I, Robot oder die große Langeweile im kleinen Kino 0

The following film review will be in german language, because I’m sure it will bring more linguistic elegance ;)
Zitat von Bernd Wurst nachdem er I, Robot gesehen hatte:
“Es ist zwar Hollywood-mäßig überdreht und Science-fiction-mäßig dargestellt, aber wenn man das mal ausblendet, hast du das, was wir in ein paar Jahen mit TCPA haben”

Nun, gut, dachte ich. Auch wenn ich sonst solcherlei Filme eher links liegen lasse (oder rechts?), den werd ich mir nicht entgehen lassen. Montag ist “Spardägle” im Union-Kino in Ludwigsburg. D.h. relativ wenig Geld für viel Kino oder wenn der Film schlecht ist, ists auch egal, das Kino war nicht teuer. Der erste Schock am Eingang: “Raubkopierer sind Verbrecher”, die unsägliche Kampagne der Filmindustrie. Nun gut, Schock mit einem feinen Bacardi Breezer Lemon (Vorsicht: Flash und erst ab 18 gg) verdaut und dann mutig zur Kasse geschritten. Einen netten Platz ausgesucht und dann rein ins Kino. Da ich glücklicherweise schon zu spät dran war, kaum noch Werbung sondern nur den letzten Spot vor Filmbeginn. Der allerdings war abermals ekelig (“Aber meiner hat den knackigeren Arsch”). Btw: Warum gibt es im Kino eigentlich kein Bacardi??
Der Film beginnt, New York im Jahre 2024. Ein durchtrainierter Will Smith mit offensichtlich größeren Schulterproblemen räkelt sich müde auf der Leinwand und zum ersten mal fällt auf: das Kino hat keinen guten Sound. Auch wenn hier wieder ein Bacardi angebracht gewesen wäre, gab es das selbstredend wieder nicht. Der Film nimmt seinen üblichen Lauf, Will Smith als anachronistischer Cop, der sowieso schon alles vorher wusste, entdeckt das Böse ressentimenthaft in der Technik die den Menschen behilflich ist, Roboter die menschenunwürdige Aufgaben übernehmen und weitere Nettigkeiten. Dann stirbt der Professor, der ihm kürzlich einen neuen Arm schenkte und der Verdacht kommt auf, dass ein Roboter dahintersteckt. Smith enttarnt daraufhin, dass ein Zentralcomputer die Kontrolle über die neue Robotergeneration übernommen hat. Nach einigen kleineren Irrungen steuert er zielsicher auf die Rettung der Welt vor der bösen Technik zu. Das ist dann auch der komplette Inhalt des Filmes und man geht mit dem sicheren Gefühl nach Hause: dieser Film lohnt sich nichtmal am “Spardägle”. Als Aesthetik-Fan ärgert man sich auch über die unterste Qualität der Spezialeffekte. Eine Szene: W. Smith wandelt durch einen Containerwald. Hinter ihm die Ruinen der Golden Gate Bridge. Die Landschaft und mit ihr die Brücke wirken eher wie einen Lucky-Luke-Zeichentrick Kulisse als wie eine gut gemachte Landschaft.

Filed under & no comments & no trackbacks

Testing the evolution-beta 0

<img src=”/img/evo-1.5-thumb.png” align=“right” />For a long time, an evolution beta, evolution-1.5x, is availiable. The 1.5x-Series will be flow into the 2.0-Release which will be availiable in the 3 Quarter of 2004. I’ve tested the not really fresh version 1.5.91.1, which is the current unstable-evo in the Gentoo-Portage. Is is rather really nice, some important features like NNTP-support, a clearer GUI-design and a look, much more away from Outlook&trade;, better addressbook-dialogue, support for online-calendar resources and much more. If I refrain from the NLS-Bugs, which are quite normal in a development-version, it is stable. No Hangups, no segfault. It became my default-mailer.

Filed under & no comments & three trackbacks

Nice Icons 0

While reading Pylons Blog I rediscovered the Site of Taylor McKnight. So I created an “Hosted on schokokeks.org”-Icon and tried to submit it but the webform seems to be buggy. So here is it.

Filed under & no comments & two trackbacks

bBlog upgraded and PHP 5.0.1 on Schokokeks 0

Today I’ve checked out the new version of bBlog. Also today schokokeks.org was upgraded to PHP 5.0.1

Filed under & no comments & two trackbacks

Long delay 0

Today I remembered that there is something like my Weblog. And I was frightened. But I can announce a lot of done things in the last weeks, menoca-sources (one article down), founding Menoca Webservices and I did the biggest part of my holiday job (baaaah, getting up at 5 o’clock).

Filed under , , & no comments & one trackback

menoca-sources or: there aren't enough kernel-sources until now 0

Today I’ve released menoca-sources, a patched version of Kernel 2.6.7. It includes a lot of security fixes (proc-, nfs- and mem-bugs, etc.) and the Grsecurity-patch. Its created for the audience of those who want to have a short delay between the announce of the security-whole and the fix. To do this, I will release revision how often it is needed. It will be continued as a complete Kernel-Tree, including Grsecurity, the ongoing security-fixes and maybe later rsbac. In general it is for server-systems, which want to have an up-to-date Kernel. But you can also use it in your Laptop or whatever you want…

Current Version: 2.6.7-beta1 (should be stable)
Project Page: strojny.net/menoca-sources.php

Filed under & no comments & no trackbacks