1. 2010
    May
    13

    KDE environment variables

    Let's say I want to set an environment variable so that its value will be available to all KDE applications. It's surprisingly hard to figure out how to do this — the usual Google-fu techniques come up with a lot of noise. So I wound up digging through the source to startkde (prompted by TechBase's description of the startup sequence) and figured out how to do it: any scripts with filenames matching $KDEHOME/env/*.sh will be run on startup, and changes they make to the environment are propagated to all KDE applications. Similarly to run a script on shutdown, name it something that matches $KDEHOME/shutdown/*.sh.

    To find the full list of directories that KDE searches for shell scripts to run on startup, here's the command, pulled right out of startkde (well, in so many words):

    kde4-config --path lib | tr : '\n' | sed -n -e 's,/lib[^/]*/,/env/,p'
  2. 2010
    Jan
    18

    SIP/PyKDE

    I just tried to test a plasmoid written in Python and got the initially confusing error message

    the sip module implements API v7.0 but the PyKDE4.plasma module requires API v6.0
    

    It wouldn’t be noteworthy except that my usual technique of Google-searching to find someone else who had previously encountered (and solved) the problem turned up nothing, except some discussion on the ArchLinux forums that didn’t seem to be too closely related. Anyway, for the benefit of the internets: this happens when the version of SIP you have installed is a new one, released since the introduction of the version 7 API, but your installation of PyKDE is an old one that still thinks it’s working with the version 6 API. The solution? Upgrade to the latest version of PyKDE, or recompile it if you installed from source. On Gentoo, a simple

    emerge -1 kde-base/pykde4
    

    did the trick.

    Just so it’s out there.

  3. 2009
    Jul
    29

    Yet another fix to the Plasma network manager applet

    A couple of days ago I replaced Gentoo Linux with Kubuntu on my old laptop. I didn’t have the time, and the laptop probably didn’t have the power, to keep compiling every program I wanted to install. As a consequence of the switch, I got to use the nifty new KDE 4 which comes with a little network management applet that looks absolutely gorgeous, but unfortunately doesn’t work.

    Well, didn’t work. I fixed it, though, by following the suggestions at http://uncleham.wordpress.com/2009/07/11/kubuntu-904-wpapsk-nobroadcast/ — I would detail my procedure here but it’d just be a repeat of what you can find at that link, with a couple of notable differences: (1) my router broadcasts its SSID, and (2) “Connect automatically” works fine for me. No need to reenter the encryption key at every login.

    I actually have a hunch about why this worked, and I don’t think it had anything to do with using the “Connect to hidden network” button. When I clicked the button, I made a point of not filling in any configuration settings that I didn’t have to. Checking it over afterwards, the one obvious difference …