Blogg

  • Hello world!

    Welcome to WordPress. This is your first post. Edit or delete it, then start writing!

  • .Xdefaults vs .Xresources

    Many X programs have user-level configuration options that can be set in the X server’s resource database.

    The two most common ways to achive persistent configuration for your X programs are to store them in either ~/.Xdefaults or ~/.Xresources files.

    I will not go into detail of the syntax of these files. However, there are some things to take into consideration between the choice of the two files.

    Consider the X program xterm. You want to make the background black and the foreground white. This can be achived by passing some command line arguments to xterm:

    $ xterm -bg black -fg white

    This is fine if you want this for only one time, but if you want it to be the default you put it in a configuration file.

    XTerm*background: black
    XTerm*foreground: white

    If you put this in the ~/.Xdefaults file you will notice that the next time you start an xterm it has the new colors. Great! Or, is it?
    It is easy to change configuration options and it will be in effect next time you start the program, but it comes at the cost that basically all X programs needs to parse this file everytime you run one.

    A better way is to put the configuration options in the ~/.Xresources file and store the configuration in the X server’s resource database by using the xrdb command:

    $ xrdb -merge ~/.Xresources

    Doing this, (in simple terms) xterm will ”ask” the X server for its resource options rather than reading a file. This is much quicker and avoids unnecessary reads on disk.
    Another great thing about this is that remote X programs (e.g., tunneled through SSH) will be able to catch these options.

    Once configurations are read into the X server’s resource databse (using xrdb), X programs should not look for configuration options in ~/.Xdefaults file.

    As many desktop environments (like Gnome or KDE) will store the configurtion from both files into the resource database upon the start of X, the drawbacks stated above may not be a problem.
    However, if you don’t run a desktop environment (like me) you need to manually run xrdb when starting X (e.g., by adding xrdb command line above to the ~/.xinitrc file).

    If you run xrdb manually, you can of course name the ~/.Xresources file whatever you want, but it’s the defacto standard.

  • Experimenting with window managers

    My current window manager that I’m using, and have used for the last two years, is called wmii (window manager improved 2).  Not going into details with wmii, but I experimented and ”hacked” around with it quite much in the beginning. The problem was though, while I was doing this I couldn’t keep my regular applications running (browser, mail/chat client, etc.) since I needed to restart the X session regularly.

    Then I found out about Xephyr, which basically is an X server which targets a window of another X server as its framebuffer. Making it possible to run a window manager inside of another window manager, for instance.

    Xephyr is a great tool to use even if you’re not developing. For instance, it could be used to try out different kinds of window managers. There are quite many out there worth taking a look at.
    (mer …)

  • About that time, eh chaps?

    … Right-oh!

    It has now been quiiite a while since my last (and only) post, and after a couple of pushes from my friend wildcard I’ve decided to give this blogging thing another go.

    There is always some cool things that you learn along the road that is worth telling about. I just need to take the time to write them down in order to share them 🙂

    I already got a couple of ideas of some topics that I want to write about, and wildcard has been kind to give me a couple of hints as well. So, stay tuned, there might pop-up some posts in the near future (and by future I do not mean as in ~2 years… I hope ;))

    P.S. For you who did not get the initial reference, it’s from the ”End of the World” flash movie. D.S.

  • Goodbye Big-bloated-OTR-button

    Are you using the Off-the-Record messaging plugin for Pidgin?
    Ever get annoyed by the big bloated button?
    How many times have you accidently hit that button and annoyed your friends who doesn’t use this neat plugin, which in turn starts asking you what the heck is going on?

    If your answer is yes in any of these questions, then this post might be of interest to you!
    (mer …)