Tag search
Setting up dual monitors system-wide with XRandR on Debian Lenny
by Sander MarechalI have been playing with my monitor setup again on my Dell D530 laptop. The internal monitor of the laptop is 1400x1050 pixels, but I usually use a 19" external monitor set to 1280x1024. With Etch this worked flawlessly. When the external monitor was hooked up and the lid on my laptop was closed, then my desktop would be 1280x1024. When I booted with the lid open and no monitor attached, the desktop would be 1400x1050. When I upgraded to Lenny this stopped working. I had to change the resolution each time I changed from external screen to internal screen and back. I reported a bug about this but the answer came down to “It’s not a bug but a feature. Use XRandR to change your displays if you don’t like it.”
So, I dove into XRandR. I wanted this to work for all users, so simply sticking some XRandR commands in the gnome session startup wasn’t going to suffice. At the same time I also got interested in trying a dual-head setup instead of only an external monitor when one was connected. I was going to need completely different layouts depending on the external monitor. It took a while before I figured out how to do it, it took a little longer to fight GNOME into submission, but here is how to make it work.
How to install Tracks on Debian Lenny with Apache mod_fcgid
by Sander MarechalI have recently read Getting Things Done (GTD) by David Allen. My geek life is the usual “too much to do in so little time” and I keep forgetting all kinds of important stuff. I saw a lot of FOSS sites covering GTD in the past few months so I decided to give it a go, read the book and play with all kinds of software. I quickly came across Tracks, a nice looking GTD application to manage your actions.
Unfortnately it's written in Ruby on Rails which can be a bit of a pain to set up under Linux, especially if you want to use Apache as the webserver instead of the built-in WEBrick server. I'm already running Apache on my server and I didn't feel like running a second webserver on a different, non-standard port just for this one app. It took me quite a bit of time to piece it all together, but here’s how I set up Tracks in Debian Lenny.
Howto: build and install the intl PECL extension for PHP5 in Debian
by Sander MarechalFor the past few days I have been looking for a proper i18n (internationalisation) and l10n (localisation) method for PHP. PHP has quite a few locale aware functions such as strftime and sprintf. In combination with gettext this can work quite well. The major downside is that you need to install all the locales that you want to support on your server. Want to serve your websites in Russian? Then you need to generate a Russian locale system-wide. That won’t work when you’re on a shared hosting account somewhere.
PHP6 is promising to solve that problem with the intl functions. Even better, the intl functions are also available as a PECL extension and works on PHP 5.2.4 and newer. Debian Etch currently packages PHP 5.2.0 which is too old, but Lenny—Debian’s upcoming version—is up to PHP 5.2.6. There is no package (yet) for php5-intl in Debian Lenny but building and installing the extension yourself is really easy. Here’s a short tutorial.