CDE is Open Source

Today the classic, and old, Common Desktop Environment (a.k.a. CDE) was released into the Open Source world.

You can get the very alpha version at SourceForge.

I haven’t been able to get a running version by now, but I keep trying.

Good job, guys.

linux  code  news 

git status in the prompt

Working with git a lot I decided I needed some git status in my prompt. I searched the web and some solutions where almost what I wanted and this one by Sebastian Celis came very close. But it didn’t work with my version of zsh, because that didn’t seem to understand the =~ operator. I also think Sebastian makes things over complicated and so I changed some things aroud. This is what I came up with: [Read More]
git  sysadm  code  linux 

New version of We-Blog

Today I released version 0.8 of We-Blog. I created a Google project and a Google discussion group. Version 0.8 is now the stable branch and 0.9 the development branch. What’s new? Well, to be really honest, not that much. I fixed some minor bugs and did a lot of code cleanup. Although the original code of Jaromir was very nice, there was some room for improvement. I removed a lot of double functions and variables and put them all together in a We. [Read More]
blog  code 

Finding key codes on Linux

It often happens that I get into a situation where I need to know key codes of pressed keys. On my Mac that’s simple. Just use the Key Codes by Many Tricks. But on Linux I constantly was trying to find out which key produced what. So I ended up writing a program for that. I started of in the shell, but that ended up being rather tricky and unnecessary complicated. [Read More]
code  linux  sysadm 

Shell tip

During one of my teaching sessions a student asked me if it was possible to find the number of spaces in a variable. As with all questions in Linux and UNIX the answer is a simple Of course that’s possible. In UNIX and Linux everything is possible. With some sed or awk this can be done within seconds. But I wanted it done completely within the shell, in this case bash. [Read More]
code  linux  sysadm 

New header

Today I’ve posted a new version of the header program.

Nothing really fancy happened, just added support for zonefiles, in this case the Bind ones.

It’s available at the usual places.

code  linux 

sed tips and tricks

I’m creating a Puppet Starter Kit with some standard manifests included and a complete set of documentation. All documentation should be written in Markdown and will be served by Markdoc. But I want to generate all Markdown files from the Puppet manifests, so I only need to document the manifest file. Generating the Markdown is not that difficult, except that I kept ending up with empty lines at the top of the manifest code and I wanted to get rid of those. [Read More]
sysadm  linux  code 

Puppet updates

When working with Puppet and a VCS (like git and SVN) it’s nice to have a simple way of updating the Puppet tree. My tree is always in /etc/puppet and owned by user and group puppet. User puppet is allowed to checkout the complete tree from git or subversion. I have created two one-liners to update the complete tree and make sure all rights are still correct. update_svn #!/bin/bash # update_svn su - puppet -c 'cd /etc/puppet; svn up; cd doc; . [Read More]

Eeepc battery script for 2.6.24 AND 2.6.25

category: "" The new kernel for the EeePC (2.6.25) has deprecated the /proc/acpi/battery interface, so I had to write a new script for use in my own zsh prompt. The script will work in both 2.6.24 and 2.6.25, so without further ado, here it is. It is written as a function for easy inclusion in any prompts. #!/bin/zsh bat() { PROC=/proc/acpi/battery/BAT0 SYS=/sys/class/power_supply/BAT0/uevent STATE= # dc: design capacity, rc: remaining capacity if [ -f $PROC/info ] then STATE=$PROC/state # 2. [Read More]