Archives

Update

It’s been some time, but I’ll try to post more regularly from now on.

Work
The crisis isn’t over yet, but I have a good project now. Can’t tell You many details, but I’m in Augsburg four days of the week now where I’m doing Microsoft Access VBA coding. It’s a good team, the work is mostly fun.

At the moment I’m doing a big international task that’s really stressful and will go on for the next two weeks. Yet, it’s very rewarding, and comes with high responsibility and visibility.

Personal Life
That’s going well, too. I’m only at home on weekends, but I’m okay with it… at least I got work. At the hotel in Augsburg I got time to play PC games again (Monkey Island 2, Sim City 4, Commandos 2, …) and to code for p300. So my leisure time is indeed good.

I was at the Wave Gotik Treffen 2009 around the beginning on June, and that was really great fun, as it is always. Next bigger events are vacation in Sardinia, and maybe some short Stuttgart vacation when I leave the project in September (if it doesn’t get extended again).

Politics
Well, I’ve been pretty pissed off at the whole censorship thing that’s now in place in Germany. I was pleased that the Greens had such a huge success in the communal vote here in Stuttgart, and that the Pirate Party succeeded in getting one guy to the European parliament. The topic of personal and digital freedom is getting worse every day, but the war is heating up. We are fighting on every front.

Crisis

Well, looks as if the economic crisis finally came around to me.

There’s not much to do at work currently and I’m still in the probation phase, and that’s bad. If upper management ever decides to fire people, the probation people will probably be the first ones to go, out of legal reasons.

So together with my boss, I decided to take some vacation. From Friday next week (20.03.09) to the end of the month, I’ll use up 4 precious paid leave days and cover 4 days out of overtime. If there’s still no project on the horizon, I might have to repeat that in April.

This means I’ll have plenty of time for hobby activities, such as p300, gaming, movies and TV series. It also means I’ll have at least 4 days less for festivals, Sardinia, Oslo and christmas.

If that saves my job, I’m happy with it. I just hope it will.

HowTo: Alice DSL in Ubuntu 8.10 using NetworkManager

I recently moved to my own apartment, and just a couple of days ago, I got connected to the Internet. Here are instructions on how to install Alice DSL in Ubuntu 8.10 using NetworkManager.

I assume You already received username and password and your connection is ready to be used (i.e. connected to your PC and to your house).

Sorry for the German translations, I only have a German Ubuntu system at my disposal. :) You’ll get the idea though, it’s quite simple.

First, right click on the NetworkManager icon (usually two computer screens, or signal bars if You’re on wireless LAN). Choose “Verbindungen bearbeiten”.

A new window will open showing your network connections, active and inactive. Choose DSL and “Hinzufügen”.

Again, a new window will open. Set “Alice” as name of the new connection, and insert your username (phone number@alice2-dsl.de) and password into the appropriate boxes. It sounds right to put “alice2-dsl.de” into the “Service”/”Dienst” field, but it’s not.

And it’s all set up! Click “OK” to get back to the connection list and close it all.

Now left click on the NetworkManager icon. A list of possible connections pops up, choose “Alice”.

This will make Ubuntu connect to Alice DSL. Not that when connecting, there will be a short moment where NetworkManager’s icon changes to “broken connection”, but that’s just the time between initiating the DSL connection and actually being connected. After seconds, You should get the following notification:

Congratulations! You have connected to the Alice DSL service using Ubuntu! (Is it even surprising?) :-)

I remember days when it was much more complicated getting DSL to work. Have fun!

HowTo: Disable “middle button” click when pressing left and right mouse button in X.Org 7.4

In the current X.Org 7.4 release that ships with Ubuntu 8.10, there is no xorg.conf anymore. Or at least, it shouldn’t be used any more, because configuration is now done dynamically via hal and dbus.

This means that by default, pressing the left and right mouse button at the same time will generate a “middle click” event, which will usually just paste the clipboard contents. It gets difficult when you play games like Quake 3 Arena and for some reason like left + right mouse button to actually mean “left + right mouse button” instead of “middle mouse button”.

In earlier X.Org versions, it was enough to just disable the “Emulate3Buttons” setting. With X.Org configuration being dynamic, this doesn’t work anymore. But there’s a new solution that’s quite easy to set up.

First, locate your mouse product string, so you’ll set the option of the right device:

lshal | less

This will show a list of devices and their properties that hal (the hardware abstraction layer) knows about. Find the device that has “input.mouse” in the “info.capabilities” section. Write down the “info.product” identification of this device. It should be similar to your mouse, like “Logitech USB-PS/2 Optical Mouse”.

Next, open /etc/hal/fdi/policy/preferences.fdi in a administrative editor and add the following lines:

<device>
<match key=”info.capabilities” contains=”input.mouse”>
<match key=”info.product” string=”<your mouse’s info.product>”>
<merge key=”input.x11_options.Emulate3Buttons” type=”string”>false</merge>
</match>
</match>
</device>

Save, exit, reboot (there should be some way to only restart the appropriate subsystems, but I don’t know how; Restarting X.Org is not enough).

Now pressing the left and right mouse button at the same time should generate two events instead of one “middle mouse button click”.

HowTo: Install OpenGroupware.org on Ubuntu 8.04 amd64 server with LDAP support (part 4 of 4)

We got the core OpenGroupware application.
We got a database backend (PostgreSQL).
We got centralized user management (LDAP).

Now it’s time to finish it all with a basic startup script for ogo.

Open up an editor:

sudo nano /etc/init.d/ogo

And put in the following:

#!/bin/bash

APP=ogo-webui-1.1
PIDFILE=/var/run/ogo

case “${1:-”}” in
’start’)
su -c “source /usr/GNUstep/System/Library/Makefiles/GNUstep.sh && $APP” ogo >>/var/log/ogo/stdout 2>>/var/log/ogo/stderr &
echo $! > $PIDFILE
;;
’stop’)
cat $PIDFILE | xargs kill
;;
‘restart’)
/etc/init.d/ogo stop
/etc/init.d/ogo start
;;
*)      # no parameter specified
echo “Usage: $SELF start|stop|restart|reload|force-reload|status”
exit 1
;;
esac

(This is probably not the best startup script, but I have really no experience with this, and it does the job.)

You also need to create a directory for log files:

sudo mkdir /var/log/ogo

The init script will write stdout and stderr of the ogo webui process to appropriately named files.

Time to add the init script to the boot process:

sudo update-rc.d ogo defaults

Now it will start automatically on boot and stop on shutdown. :)

And that’s it for this HowTo series. If You have any questions, don’t hesitate to comment! Thanks for reading! :-)

HowTo: Install OpenGroupware.org on Ubuntu 8.04 amd64 server with LDAP support (part 3 of 4)

We got OpenGroupware and its database running, but we still want OpenGroupware integrated with our central user management in LDAP. Of course, this is optional, but it’s what we did at my last place of work. This HowTo is focused on OpenGroupware, so I won’t go into the details of correctly setting up your LDAP database; Only the basics.

Install the LDAP database server (slapd) and an administrative interface:

sudo apt-get install slapd phpldapadmin

Choose a good administrator password. Anyone with admin access to your LDAP can easily take over control over big parts of your security/authentication. Note that if you forget the password, you can reset it using a new password in /etc/ldap/slapd.conf.

The default PHP installation on Ubuntu doesn’t provide enough memory for phpLDAPadmin, so we’ll have to increase that. Edit /etc/php5/apache2/php.ini and find the line

memory_limit = 16M

Change it to

memory_limit = 32M

Save and exit. Restart Apache.

Now open http://<yourserver>/phpldapadmin. It should show phpLDAPadmin. Press “Login…” and use the chosen password with the “cn=admin,dc=<yourdomain>,dc=<yourtld>” login DN.

We first need a group for all users. Open the LDAP tree on the left side and create a new entry. Use “Organisational Unit” as template. Name it “Groups”.

Now you have a repository for user groups. On the right side in the “Groups” detail page, create a new nested entry. Use “Posix Group” and name it “Users”. (Caution: If you use the LDAP for Posix auth/Unix user management, the new group will clash with system groups because of its ID.) Leave the “Users” entry empty.

Next, in the LDAP tree on the left side, create a new “Organisational Unit” named “Users”, just the way you did with the “Groups”.

Now, create a new nested entry. Template is “User Account”. Type in some details into the yellow fields. (Caution again: If you use the LDAP for Posix auth/Unix user management, these new users might clash with existing unix shadow users.) Type in a password for the user!

Now we have a new user in the LDAP database. You can create more, if you like. These will be used (with the passwords) for your OpenGroupware installation. You can close phpLDAPadmin now.

In the terminal, do

sudo su ogo
source /usr/GNUstep/System/Library/Makefiles/GNUstep.sh
Defaults write NSGlobalDomain LSAuthLDAPServer localhost
Defaults write NSGlobalDomain LSAuthLDAPServerRoot \”dc=<yourdomain>,dc=<yourtld>\”

Make sure the quotation marks are properly escaped in the last line so that the “Defaults” tool will get the whole thing quoted. You can check with

Defaults read

if your settings came through.

Now do

ogo-webui-1.1

and browse to http://<yourserver>/OpenGroupware. You should get a login screen and should be able to log in using the LDAP username/password combinations.

Success! :-)

In the last part — following soon — we will create startup/shutdown scripts for your OpenGroupware installation.

HowTo: Install OpenGroupware.org on Ubuntu 8.04 amd64 server with LDAP support (part 2 of 4)

Having built the binaries for OpenGroupware.org, we now need a database. OpenGroupware.org uses PostgreSQL. Install that:

sudo apt-get install postgresql

Create the database:

sudo su – postgres
createdb OGo
createuser -A -D OGo

Reply to createuser that the new user will not be able to create new roles, as it’s unnecessary. “-A” creates a regular user (instead of a superuser). “-D” denies the new user the ability to create databases.

Quit from the postgres shell:

exit

Edit the file /etc/postgresql/8.3/main/pg_hba.conf:

sudo nano /etc/postgresql/8.3/main/pg_hba.conf

Add the following:

host    OGo         OGo         127.0.0.1/32          trust

before the line

host    all         all         127.0.0.1/32          md5

And then restart PostgreSQL:

sudo invoke-rc.d postgresql-8.3 restart

This way, anyone trying to connect to the database as user “OGo” will always get in. It works only from the local machine, so if you have control over your users, everything should be alright. (You should note though that any user logged into your machine can access the whole OGo database!)

Now we need to install the database schema:

cd /usr/local/lib64/opengroupware.org-1.1/commands/OGo.model/Resources
psql -h localhost OGo OGo
\i pg-build-schema.psql
\q

Now we have to set up the database connection in OpenGroupware.org:

sudo su – ogo
source /usr/GNUstep/System/Library/Makefiles/GNUstep.sh
Defaults write NSGlobalDomain LSConnectionDictionary ‘{databaseName = OGo; hostName = localhost; password = “”; port = 5432; userName = OGo}’
Defaults write NSGlobalDomain LSAdaptor PostgreSQL
/usr/local/sbin/ogo-webui-1.1

You should now be able to access http://<yourhost>/OpenGroupware and be automatically logged in as root.

That’s it for the database setup!

Global search in p300 file-sharing tool

As you can see on guruz’ blog, our beloved file-sharing tool for private networks and VPNs – “p300” – now has global search and a couple other new features. As the backend code for global search is coded by me, this release is really important for me. The search has been implemented by using the WebDAV SEARCH Standard (draft).

Download now: p300.eu

HowTo: Clone your Ubuntu 8.04 installation for easy 8.10-upgrade tests

In about 27 days, the new Ubuntu 8.10 will be released. The beta has been released yesterday. I have some spare time, so I’m using it to do an upgrade test for my installation. I don’t want my main system to be changed (or destroyed), so I’m first cloning the Ubuntu 8.04 installation on my laptop, then upgrading that clone to Ubuntu 8.10 beta.

There are two reasons why you’d want to do that:

  • Check for yourself if the upgrade will work out alright when 8.10 is released, by testing without much risk.
  • Test the upgrade path on your system, filing bugs if things don’t work out well, to improve Ubuntu. Which is what I want to do.

I have used this clone/upgrade path in older releases, I’m pretty sure it will also work in the future. It should also work in other distributions.

Disclaimer: I cannot be held responsible for any damage this HowTo may cause. You are on your own. Only follow the steps if you know the implications of following them. This is dangerous stuff and can destroy your data!

First, backup all your data on your installation. If anything goes wrong, you need to have a safe place for your data! There are many ways to do that, I usually rsync to an external disk.

I now delete everything that I don’t need for the test, but you don’t need to do that. It will make the process take less time though, because there’s less data to clone. DO NOT DELETE IMPORTANT DATA! I only delete music, photos, videos and documents, which are only 1:1 copies of my workstation’s data anyway.

Boot your system from an Ubuntu LiveCD. We’re going to partition and copy the partitions from there.

Now it gets a bit difficult. You need to create new partitions that can take at least the used amount of space in your old partitions. For example, my setup is:

  • /dev/sda1: 5 GB on /, 2.67 GB used
  • /dev/sda2: 2 GB swap
  • /dev/sda3: 142 GB on /home, 8.17 GB used

Swap can be re-used in the new installation, but the other two have to be cloned. So in this case I resized sda3 to have 15 GB of free space. Then I created (in the free space) a new extended partition (disks can only take 4 partitions, so I need this “partition container“) sda4. In this container, I created sda5 (5 GB, my new /) and sda6 (10 GB, my new /home). If you are going to use the upgraded installation for more than just playing around, reserve more space. If you have only one partition, only create one clone partition. It really depends on your setup.

All of this can be done in Partition Editor which comes with every Ubuntu LiveCD.

After some time, the new partitions will be there. Don’t forget to write down your disk partitioning, or leave the Partition Editor open.

Open a terminal. Create directories for your partitions, but name them to resemble their function. It’s more foolproof like that. ;)

mkdir old_root old_home new_root new_home

Now, mount all the partitions:

sudo mount /dev/sda1 old_root/
sudo mount /dev/sda3 old_home/
sudo mount /dev/sda5 new_root/
sudo mount /dev/sda6 new_home/

That’s about it. Now we need to copy the stuff over, bascially cloning your installation:

sudo cp -av old_root/* new_root/
sudo cp -av old_home/* new_home/

“-a” means it will preserve links, file mode/ownership/timestamps, and copy recursively. Make sure the partitions you copy this way don’t have any files like “.file” in them, or copy them over manually, because the “*” won’t match those.

Of course, the last 3 steps really depend on your setup. If you have more or less partitions, you need to adjust the commands, but you should get the idea.

Depending on the amount of data and speed of your disks/machine, this can take some time. Grab a coffee!

When this is finished, you can unmount your old partitions, just to be safe:

sudo umount old_root old_home

First, we need to change the partition identifiers in the new installation:

sudo chroot new_root
nano /etc/fstab

Here, you need to set the UUIDs of your new partitions instead of the old ones. Swap stays the same. You can find the UUIDs through

sudo blkid

Save & exit from nano.

We want to upgrade the new installation, so grub (the boot loader) needs to be configured to run from the new installation:

nano /boot/grub/menu.lst

Copy and paste the list of boot options (title, root, kernel, initrd, quiet) – there should be 3, depening on your setup – below the line “END OF DEBIAN AUTOMAGIC KERNELS LIST“. Add something like “(old installation)” to the end of the “title” lines, so they differ from the new installation. Now, find a line that says:

# kopt=root=UUID=<text> ro

And set the UUID to be the UUID of your new root partition (found through blkid).

Find the line:

# groot=(hd0,0)

and change it to

# groot=(hd0,4)

(or whatever your new root partition is).

Now we need to regenerate the boot options list:

update-grub

Ignore the errors. They are caused by the fact that the environment is mixed between the LiveCD and your installation root. Yet, the /boot/grub/menu.lst should now contain both your new as well as your old kernels. Exit from the chroot shell:

exit

In the regular LiveCD shell, we now need to install the new boot loader:

sudo grub-install –root-directory=new_root/ /dev/sda

(Depends on your setup, /dev/sda might be another disk.)

And that’s it. We should now be able to boot into the new or the old installation. Try it out! (Press Esc before Linux boot to open the grub boot loader option screen.) Verify by typing

mount

in a terminal that you are indeed using the correct partitions in each case (because of the fstab change).

You now have two identical copies of the same installation. They could also be used as a failover over something, in case you hack the wrong file in the original installation. ;)

What I want to do is upgrade the installation to the current development version: Boot into the new installation. Open a terminal. Type:

gksudo — update-manager -d

(”–” is necessary so the “-d” won’t be mistaken for gksudo’s “debug” option.) You should now get a notification that there is a new version available. By pressing the button you start the upgrade process. Realize that this is really what you want and that you are mostly safe because you are running a cloned install, and press it.

And that’s it for this HowTo. Upgrade, file bugs, test the installation however you like. Your old system is safe. In a couple of days/weeks I’ll write a HowTo on how to remove the clone and get back to the old setup (basically, it’s “remove new partitions” and “grub-install –root-directory=old_root /dev/sda”).

If you have questions/suggestions/thanks, don’t hesitate to comment.

Update:
I often have the problem that — when resuming my 8.04/8.10 dualboot laptop from hibernation — I choose the wrong Ubuntu version in grub. It can’t resume and wipes out the hibernation image from the swap drive. This is bad. Here’s a small workaround:

Before doing “update-grub”, open /boot/grub/menu.lst and change the lines

default 0
savedefault=false

to

default saved
savedefault=true

(They are not really next to each other, this is only to shorten the text.)

Also, add “savedefault” to the regular boot option of your old installation, before or after “quiet”. With these options, grub will recognize which was the last Ubuntu version booted, and will automatically load it the next time, unless changed manually. When resuming from hibernation, it will always load the appropriate Ubuntu version.

First visit to the the Federal Employment Office

Agentur für Arbeit (Federal Employment Office)

Agentur für Arbeit (Federal Employment Office)

This post is meant for people who want to know what it will be like to enter the Federal Employment Office for the first time. Of course, this will be a purely subjective story.

There are two good reasons to visit the office, even when you don’t have trouble to find work:

  1. Get the status of “seeking work” so your pension won’t suffer. If you have one or more months between education and a job, this is the case. These months should be certified.
  2. Get job offers. Some companies look for employees via the office.

First tip: Get up early and be there at opening time. As with any federal office, you have an advantage by coming at times of less traffic, like the early mornings.

What to bring:

  • Personal ID card
  • Social security number (if you have one)
  • Curriculum vitae

The receptionist will give you a sheet about your personal data to fill out and you’ll be transferred to the waiting room. If you haven’t finished filling in your details, one of the consultants will help you after they pick you up (which happened after one minute for me).

The sheet is about your life, your social situation, military service, side jobs, disabilities. The consultant was really nice and explained anything I wanted to know about the questions. This is where you’ll also need the ID card and social security number. The consultant then copied my curriculum vitae. Hint: Electronic copies are useless, I brought one, but she couldn’t accept it.

Then she’ll input the data into your computer file. At the same time, you fill out another paper sheet about your past, current and future employment(s). This is mostly data that you would research when looking for a job:

  • Area of work, past and desired
  • Status of current job search (companies names + status, but you can just give the number of job applications you sent out)
  • Job start date, salary (past and desired)
  • Ability to travel and/or move, commuting, details like distance and/or time
  • Working skills, computer skills, personal skills with one of four qualities between excellent and bad

After that she will give you an appointment for a counseling interview, but also details on how to cancel the appointment if you already have a job offer. The important thing is that only the consultant of that interview can certify you were looking for a job! If you cancel, you need to strongly point out that you need the certificate.

She gave me a brochure about what the office can offer me for getting a job, like financial aid for moving homes.

I asked about health insurance, because that would cost about half my salary currently. Unfortunately, as I already suspected, you only get free health insurance by the office if you receive unemployment benefits. Without any full time work, there are no unemployment benefits, so that leaves social welfare. If you have enough money to cope I suggest not to apply for this.

The whole process took a little more than half an hour.

If you have any questions concerning my visit, please leave a comment or contact me.