Website moved to new server

As of right now I have moved my website to new server out in town on a 100MBit line, so it should be fairly fast. This is the first step in shutting down my server at home entirely. Lets see how it works out.

crossing my fingers and praying to the internet gods

Update: Now debianart.dk have been moved as well.

Gaim: get back Ctrl + Enter to send message

Some time ago I think it was when I made the switch from Gaim 1.x to 2.x sending my instant messages with Ctrl + Enter stopped working. I have lived with it for along time but it kept annoying me… a good friend of mine found the solution on another website and today I took the time to actually do it.

The thing beneath is kinda ripoff / copy-paste :D

Create the file .gtkrc-2.0 in your home directory with the following content:

gtk-key-theme-name = "Emacs"
gtk-can-change-accels = 1
binding "gaim" {
    bind "Return" { "message_send" () }
    bind "Return" { "insert-at-cursor" ("\n") }
}
widget "*gaim_gtkconv_entry" binding "gaim"

Mono coding: Capturing right clicks in a Gtk.TreeView

I had a hard time figuring out how to capture a right click on a TreeView, which I needed to be able to make a context menu or popup menu or what ever you wanna call it. The way I expected it would work didn’t… I think it have something to do with a change in Mono some time ago (Why don’t I get ButtonPressEvents from my Button/Treeview?).

This example is based on the “Shortcuts - Writing Less Code” example from the www.mono-project.com website. The main difference is that the TreeView is no longer setup in the main class but is now a separate class with the function OnButtonPressEvent overwritten.

public class TreeViewExample {
	public static void Main ()
	{
		Gtk.Application.Init ();
		new TreeViewExample ();
		Gtk.Application.Run ();
	}

	public TreeViewExample ()
	{
		Gtk.Window window = new Gtk.Window ("TreeView Example");
		window.SetSizeRequest (500,200);

		MusicTreeView tree = new MusicTreeView ();
		window.Add (tree);
		window.ShowAll ();
	}
}

// Creating a new class MusicTreeView which is derived from the TreeView class
public class MusicTreeView : Gtk.TreeView {

        public MusicTreeView ()
        {
        		Gtk.ListStore musicListStore = new Gtk.ListStore (typeof (string), typeof (string));

        		this.AppendColumn ("Artist", new Gtk.CellRendererText (), "text", 0);
        		this.AppendColumn ("Title", new Gtk.CellRendererText (), "text", 1);

        		musicListStore.AppendValues ("Garbage", "Dog New Tricks");
        		this.Model = musicListStore;
        }

        // The TreeView has a build in function which is called upon a OnButtonPressEvent
        // We override the function to capture right clicks with the mouse
        protected override bool OnButtonPressEvent (Gdk.EventButton evnt)
        {
                if(evnt.Button == 3) {
                        System.Console.WriteLine ("Right click");
                        return true;
                }
                // Now if we would ever get this far
                // we run the TreeViews OnButtonPressEvent function
                // to make sure everything else works as normal
                return base.OnButtonPressEvent(evnt);
        }
}

Update: I wrote a new “right click in Gtk.TreeView” example.

Searching packages on RHEL CD's

Sometimes you have to get primitive … duh.

Today I got really annoyed about the “Package Management” tool on Red Hat EL 4 update 4. When I tried to install the “Development tools” I just got an error that krb5-libs could not be found which was a dependencie of krb5-workstation (1.3.4, 33). Both krb5-libs and krb5-workstation was installed…?!? I’m not Red Hat expert… and that is probably my biggest problem here :)

Back to the commandline… it always works. I had to search the CD’es (afterwards I found that all the packages I needed was on CD3). I made a little search script… dont think anyone can use it… just thought it was fun:

for i in 1 2 3 4 5
do
    mount -o loop /root/RHEL4-U4-i386-ES-disc$i.iso  /mnt/
    echo "Results on cd $i"
    find /mnt/RedHat/RPMS/ -iname $1\*
    umount /mnt/
done

Shuttle wireless not working with WPA in Ubuntu Edgy

Today I used my Ubuntu Linux workstation at home for several hours. I usually only use it for playing World of Warcraft (which until now have been on Windows). When even I need to do some Linux stuff I usually just fire up my trusty IBM x40 laptop, which only takes a few seconds since I always suspend to RAM.

Well while I was playing around with some different things (including getting “World of Warcraft - The Burning Crusade” to run with wine), I got the crazy idea to try use the wireless net instead of the wired. My workstation is a Shuttle and I bought the “special” Shuttle wireless (USB) card, which doesn’t take up the precious single free PCI slot.

The module the card is using is:

zd1211rw

When set up from the commandline WPA is working just nicely… but together with Network Manager I can only connect to WEP encryptet networks… this is a know bug :(