Solemn's Site
Never stopping to think if I should.

Serving static gzip-compressed content with Apache

Posted in Linux on 28 Mar 2019 at 18:49 UTC

The CI pipeline for one of my projects generates coverage reports as a collection of HTML files, which are published on one of my web servers. Each report is only ~8MB, but that starts to add up pretty quickly after a few dozen commits, so I wanted to compress the reports on disk and have them decompressed as needed rather than using up my precious disk space.

Strangely, this doesn't seem to be a widely-used (or at least well-documented) Apache configuration. All references I found were out of date or didn't do what I wanted.

So here's how I got it working...


Comments (0)

Year of the Linux desktop

Posted in Linux on 02 Mar 2009 at 09:43 UTC

Every year people say "Is this the year of the Linux desktop?", well I think 2009 is it. Ease of installation has come far since the 1990s, as I prove with the following install story.

After binman180 installed Debian 5.0 (lenny) on his "new" laptop (Celeron 1.3, circa 2000 BC) he wanted to install KDE instead of GNOME, which is the default. Installing the 'kde' metapackage resulted in GDM refusing to start, with some error that neither of us can remember. The error log, had nothing helpful (since GDM was written by the GNOME devs they probably thought error messages would be too cluttered/complicated for users). After purging and re-installing GDM it decided to not even give us an error on the screen, still nothing in the error log.

Clearly GDM wasn't going to work without a huge hassle, so we decided to install XDM instead. Joy! We managed to get the login screen working again! Pity it was still loading GNOME. My next thought was "Maybe if we uninstall GNOME, XDM will load KDE, since it's the only installed DE".... Wrong! After running `aptitude purge gnome` and restarting XDM, it attempted to load a (broken) installation of GNOME... I have no idea why.

After poking around my own homedir, I remembered that mine did the same, in order to make XDM run KDE, this is all that had to be done:

cat > ~/.xsession << EOF
chmod +x ~/.xsession

I mean, it's so obvious that you should create a shell script that runs 'startkde' named ~/.xsession, how could I have overlooked it in the first place? 2009: Year of the Linux desktop

Comments (3)

reboot(2)? What's that?

Posted in Linux on 15 Apr 2008 at 21:07 UTC

To reboot Linux you use a syscall named reboot, the reboot(2) manpage shows that the libc reboot() function should have the same arguments as the syscall:
int reboot(int magic, int magic2, int flag, void *arg);
However, the uClibc developers decided to be clever, they instead made a reboot() function that takes a single argument (flag), of course they don't include a declaration in the headers, then you would KNOW they don't use the normal arguments. After several hours of debugging and finding that flag was 4276215469 (magic1) in sys_reboot() I eventually downloaded the uClibc source, lo and behold!
int reboot(int flag)
	return (_reboot((int) 0xfee1dead, 672274793, flag));
This has been very productive.

Comments (0)

Xinerama tutorial

Posted in Linux on 07 Feb 2007 at 15:54 UTC

This howto explains setting up 2 or more monitors under X11 using the xinerama extention which is supported under XFree86 and, it is only tested under Linux but I assume it works under BSD and other unixes as well.


Comments (0)