Important: If you want to remove the sunroof yourself for whatever reason, you do NOT have to remove all the pillar trims and the roof panel as I did. Just after I finished refitting the roof panel, I finally understood, why the rails were made out of several weird parts and screws.
It is possible to simply remove the shortest part of the rail housing and then lift the pane out of the roof. But I didn't notice that, so I followed the Citroen BX DIY guide for removing the roof panel (which was originally written to clean clogged tubes).
I had to remove all the A-, B- and C-pillar trims, which was a bit tricky because of those stupid plastic rivets and I accidentally broke one of the A-pillar trims because they were attached with some silicone-like rubber. I'm sure that someone had already done this before because I found a cut-off antenna cable up there and that silicone didn't belong there eighter. I also had to remove the overhead bracket and the grab handles and finally I was able to remove the roof panel which was still being held by a metal retainer at the back and a plastic retainer at the front. That metal retainer had to be bent by force and a small bit of plastic at the front broke off.

All told, it was a pain in the * and doing this should be avoided at all costs. In the end, it looked something like this

The cables were still attached, so I removed them, too and took the whole thing indoors.

The reason why the sunroof wouldn't open was that one of the slides was broken in three pieces right where it should hold the pane. Of course it's very hard to find a spare part for that, so I had to glue it together somehow. So I took some super glue...

and filled it up with hot glue:

Well it's not inspiring confidence, and I preyed that it would work like this, and in the end it did, so I was lucky this time. This is, how the important side now looks like:

This is one of the hooks. The motor at the front moves to spiral wires contrariwise so that the slides go back and forth.

So I refitted the pane on the roof panel and greased it throughly because it was squeaking really loud. By the way, that small wheel on the right is supposed to go under the rail and not where it's right on this picture. It's a bit tricky...

and put it all toghether in the car.
Yeah, it was a pain, but at least the sunroof is now fixed. The guy I bought the car off had sealed the roof with silicone but still the footwells were soaked in water. As I removed the roof panel completely, I also had to reattach the four tubes and this gave me the chance to clean them, too.
Well. I hope I was able to entertain you for a minute or two, there



