What’s wrong with UNIX – configuration

All the programs use their own configuration files. The bad part is that the files have different syntax. This is stupid. Let’s assume one favored multiple files, one or several per application. I’m neutral about this. This could be OK if only they had the same syntax. I would expect one library to be used across all applications to read and write the configurations.

If I understand correctly, Gnome is trying to solve this by using a library. But looking at ~/.gconf/apps I saw big FAIL: it’s XML based.
One could argue about the XML but I’m all anti-XML. You could search the internet for “XML sucks” about that. Maybe I’ll post about that later.
Anyhow the fact that Gnome is doing it differently and not “The UNIX way” just highlights the problem.

Looking at the one-big-stupid-file-to-rule-them-all solution also known as Registry makes it clear that this implementation is plain and simple a failure. So it’s probably not it. Not the way it was implemented anyway.

Just to make clear, I’m not sure what the correct solution is. I just know the solutions I’m aware of suck.

ADSL on Debian

Hi.

Tired of lengthy manuals about ADSL setup, here is a copy+paste (with a bit of editing) from an email I’ve sent once (year 2005).

apt-get install ppp pppoe

### summary of changes ###
file /etc/ppp/options:
    change "auth" to "noauth"
    add "plugin /usr/lib/pppd/2.4.3/rp-pppoe.so"
file /etc/ppp/pap-secrets:
    "MYUSER@MYPROVIDER" * "MYPASSWORD" *
file /etc/ppp/peers/dsl-provider:
    "user" -> "MYUSER@MYPROVIDER"
    on line with "pty" - change eth0 to correct interface
        (eth1 in my case, but should usually be eth0)

manual start:
    pppd call dsl-provider
auto start:
    file /etc/network/interfaces:
        ###
        auto ppp0
        iface ppp0 inet ppp
            provider dsl-provider
        ###
### end of changes ###

Use at your own risk.
Hope that helps.

WordPress SSL small and easy hack

Hi people.
Just installed WordPress (version 2.0.10-1etch3). After the regular installation procedure, the first thing I was trying to do is to configure the SSL.
Being naive, just added Apache alias on another virtual host (which has SSL) to point to the same directory as the original installation.
Oops, that does not work. Googled. Came up with:
http://codex.wordpress.org/Administration_Over_SSL
That page just scared me. It looks too complicated for whatever it does. Spent few additional minutes of search. No satisfying answer.

Here is my small hack which works for me and which should work fine for any installations as long as URI beginnings are the same on both virtual hosts (read same Apache alias, that’s roughly the same thing)
In wp-config.php I’ve added at the end, just before ?> :

wp_cache_add('home_before_ilya', get_option('home'), 'options');
add_filter('option_siteurl', 'ilyas_siteurl');
add_filter('option_home', 'ilyas_siteurl');

function ilyas_siteurl($v) {
    if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {
        $s = 's';
    } else {
        $s = '';
    }
    $v = "http$s://{$_SERVER['HTTP_HOST']}/blog";
    return $v;
}

In wp-includes/functions.php in function weblog_ping :
Replace

$home = trailingslashit( get_option('home') );

with

$home = trailingslashit( get_option('home_before_ilya') );

Note that the code was not really tested. All I know is it worked for me. Use at your own risk!
Hope that helps.