Monthly Archive for July, 2008

Nice global environment variable additions

Since my vacation is coming to an end I thought I’d leave a nice little trick on how to administrate a number of environment variable additions for all users on the system.

Sure, there is the /etc/environment file but it seems rather limiting to me. I needed a little more control, so I came up with the following the little scripting:

Create a new folder /etc/environment.imports, in the folder just have a ordered/leveled number of scripts (i.e. 01_qt, 02_java). Add the following code to your /etc/profile:

# Custom PATH and LD_LIBRARY additions
xdg_source_list=`echo /etc/environment.imports/*`
for source_file in $xdg_source_list
do
        source $source_file
done

Now you can just export all the necessary additions through the files in /etc/environment.imports:

#!/bin/sh
export LD_LIBRARY_PATH=/opt/wine/lib:$LD_LIBRARY_PATH
export PATH=/opt/wine/bin:$PATH
export PKG_CONFIG_PATH=/opt/wine/lib/pkgconfig:$PKG_CONFIG_PATH

export XDG_DATA_DIRS=/opt/wine/share:$XDG_DATA_DIRS

This way it’s extremely easy to maintain a large number of custom-prefixed software for a complete system without touching the user’s custom profile.

Building Qyoto from SVN

Lately Qyoto won’t build because of a rather minor issue in the code. Basically it references itself in kdebindings/csharp/qyoto/src/SmokeInvocation.cs on line 20, so be sure to comment this line if you want the build to succeed.

A bunch of cool things

So far, this weekend has been a great one. Met a bunch of old pals again, fixed some long-due problems and even got something productive out of it!

The first cool thing is that Plasma does work correctly now. Yes, this means that this strange behaviour is history and I’m able to freely move plasmoids around the place. Problem was, as usual, not the main program itself but one of the underlying libs: In this case a fresh Qt checkout from KDE’s trunk solved the problem nicely. Yes, it really was that simple. Maybe this will be of help, as nobody on the official support channel really had an answer for that :) .

In order to allow me a quick and dirty playground like that computing power is necessary. Compiling large projects like Qt takes a lot of time it becomes clear that reduction of this compilation time is advised. About a year ago I blogged about Icecream, a nice way of clustering compilation tasks around your network. By the time you read this all of my machines (except for one pesky bugger) are running Linux exclusively so getting a small cluster of dualcore processing power together wasn’t hard, it also allowed me to trash one system and set it up with Debian again, now it’s usable after whooping 10 seconds. Beat that, suckers!

I said to myself “Tsukasa, if you’re already using bleeding edge software like KDE 4.1, Wine and Mplayer then you should use the latest and greatest Mono + toolchain as well”. So I went on compiling Mono and Monodevelop straight from svn. Monodevelop did refuse to start though and presented me with the following error message:

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object
at MonoDevelop.Core.Runtime.Initialize (Boolean updateAddinRegistry) [0x00000]
at MonoDevelop.Startup.SharpDevelopMain.Main (System.String[] args) [0x00000]

Looking this up on the net didn’t bring any good results, trying to fiddle around with mdtool? No cigar, same message. So, what’s the fix? Simply delete your ~/.config/Monodevelop directory so the Add-In registry has to be rebuilt. Yes, it’s those darn buggers that make everything bad and boo. Now it’s up and running and I’m eagerly trying to build Qyoto now :) .

Using twhirl on Linux – the nice way

Without any doubt twhirl is the greatest twitter client available. It’s an Air-based application – meaning you can even use it on Linux.

Now, as you may know KDE 4.1 comes with a handy little twitter client plasmoid itself but the functionality is really limited, the plasmoid is a little buggy and overall can’t compete with twhirl. So, let’s install twhirl then, eh?

First thing you have to do is installing the Adobe Air for Linux alpha. Since the installation is pretty straightforward and the package is an RPM I’ll skip the details.

After installing Air just navigate to the twirl website, look for the “manual installation” paragraph on the right handside and click “Download and install the latest twhirl release”. The installation will start and you’ll be able to start the application afterwards by executing (if you installed it to /opt) /opt/twhirl/twhirl.

You probably want to get rid of the pesky taskbar entry now: With KWin all you’ve to do is press ALT+F3, select Configure Window Behaviour and choose “Window Specific” in the dialog. Create a new rule by clicking New, click “Detect Window Properties” and select the twirl window. Just accept the settings in the upcoming dialog, and close it. Time to edit the rules a bit: Double click the new rule in the list, go to the Preferences tab and select “Keep below”, “Skip taskbar”, select “Force” for each item and don’t forget to enable the checkbox at the end. Apply the settings and voila – a nice, widget-like twirl on your Linux desktop.

The nice thing about twhirl is that it comes with different color schemes and the “Black Magic” colorset matches the dark Oxygen plasma theme almost perfectly.

Yeah, this post is pretty sketchy, I wish I could upload media to illustrate it – but that functionality is still broken.

Boring

Lupin thinks this blog needs more posts. Unfortunately there’s so much interesting stuff going on that the little time I have doesn’t suffice to satisfy err… bla.

Part of the reason I don’t post much is that

  • …this WordPress installation is somehow totally borked and doesn’t let me upload any more media.
  • …I don’t have that much time to spare to talk about every little bit that I’m working/interested on/in.

Posting something just for the sake of posting is bad. It’s not like there’s nothing to talk about, though.

If you want to know what I’m currently interested in you can check out the following things in Google:
kde 4.1, qyoto, pandas, koalas, pandas, koalas, pandas, koalas, pandas, koalas, ducks, powershell, nas, solaris, raptors, cmake, mono, kangaroos.

I think it says it all. There’s always action, explosions and much sex involved in my everyday life, so stop pestering me for more insight.

Did I mention I’ll be on vacation the next two weeks? No? That’s going to be great. Maybe it’ll be worth a post.