Archive for the ‘Linux’ Category

KVM ‘Quick’ (n dirty) howto.

Friday, February 12th, 2010

Introduction (off-topic)

Recently, I found myself a new job with http://inuits.be. A company that ONLY deals with open source and related stuff. Yes, I’m quite ecstatic about it myself! The first meeting went very well and after a small ‘test’ of my capabilities, I was asked to find out how KVM works and write a howto about it. So that is exactly what I have done… Below, you will find the results of my endeavors.

Introduction

What is KVM?

KVM (for Kernel-based Virtual Machine) is a full virtualization solution for Linux on x86 hardware containing virtualization extensions (Intel VT or AMD-V). It consists of a loadable kernel module, kvm.ko, that provides the core virtualization infrastructure and a processor specific module, kvm-intel.ko or kvm-amd.ko. KVM also requires a modified QEMU although work is underway to get the required changes upstream.

Using KVM, one can run multiple virtual machines running unmodified Linux or Windows images. Each virtual machine has private virtualized hardware: a network card, disk, graphics adapter, etc.

The kernel component of KVM is included in mainline Linux, as of 2.6.20.

KVM is open source software.

Source: http://linux-kvm.org.

So what does this mean? We don’t have to software emulate the system to run our virtual machines in and speed up virtualization dramatically. As you can read, we need a kernel module to get things working so we will start off with inspecting and adjusting our kernel.

(more…)

Disabling xscreensaver when using xfce + vnc

Thursday, April 16th, 2009

Have you ever run into the problem that your xfce starts xscreensaver automatically whenever you start up your favorite vnc server? I have. My previous solutions were to kill it manually each time or to remove it from my system all together. But that is hardly a solution but more of a work around.

Yesterday I started to look around where I could adjust the xfce global startup file (/etc/xdg/xfce4/xinitrc) and I noticed that the part responsible for the xscreensaver has a check for a VNCSESSION variable.

# Launch xscreensaver (if available), but only as non-root user
if test $UID -gt 0 -a -z "$VNCSESSION"; then
    if test x"`which xscreensaver 2>/dev/null`" != x""; then
        xscreensaver -no-splash &
    elif test x"`which gnome-screensaver 2>/dev/null`" != x""; then
        gnome-screensaver &
    fi
fi

So the solution would be to make sure this variable is exported before starting xfce4 and we can do this in the xstartup script located in the ~/.vnc/ folder. I simply added export VNCSESSION=”tightvnc”. You can put whatever you want in VNCSESSION afaik. It wasn’t set by default so my best guess is it doesn’t matter. I’ll make sure to remember updating this when I run into a problem because of this solution.

My xstartup script now looks like this:

#!/bin/sh
export VNCSESSION="tightvnc"
xrdb $HOME/.Xresources
source $HOME/.xinitrc

As you can see, I made it so that my regular .xinitrc file gets run too. This is where I order xfce4 to launch too.

Hope you find this quick fix helpful and don’t have to kill or remove xscreensaver anymore from now on.

Hal and auto-mounting external (e-)sata devices

Tuesday, April 14th, 2009

I came up with some trouble to enable auto mounting on all my external esata devices. I have 2 of them on e-sata and one on a sata port with extension.
Most documentation online stats you should create a fdi file for each disk or disable not mounting fixed disks all together. The 2nd option isn’t really an option so I decided to go for the fdi file.

(more…)

Red Alert 3 + wine = magic

Friday, October 31st, 2008

Update:  Since the latest wine version 1.1.9 (and newer of course), it’s no longer needed to use the hacks repository. The main wine repo now has the animated cursor patch included. Mind you, only the first frame of a animated cursor is displayed.

I’m glad to inform you all I managed to get red alert 3 started using the wine version hosted at http://repo.or.cz/w/wine/hacks.git. You can easily use this repository using my adjusted wine ebuild for the wine git version.

The ebuild is packaged here: wine.tar.bz2

NB-ImportLib v0.2

Wednesday, October 1st, 2008

Today, I uploaded the second version of my tiny “import java libraries into netbeans” script. All information has moved to it’s own page too. Even more, netbeans-importlib related stuff will be published in it’s own category. So filtering tags is not needed anymore.

RapidShare BASH Download Script

Saturday, June 28th, 2008

Since my BashDL project is kinda on hold till I finish kickstart bash, I’m posting the script I’m currently using to download from rapidshare. I fixed a small bug since rapidshare changed some of the site’s inner workings. The script can currently be found until improved here:
RapidShare Basic Download Script

It’s possible there are still bugs present, in which case you just respond here with what the problem is. If you are going to attach output, check /tmp/ for files looking like LINKS???????.rs, PAGE???????.rs and WGET??????.rs.

IMPORTANT!
Make sure you remove your rapidshare password and user from ALL files you send me. I don’t need to know.
You can do this by using ’sed’ (replace 000000 by your user name / password).
See the manual for information on how to use sed. A example can be found here:

sed -i s/000000/=LOGIN=/ [filename]
sed -i s/000000/=PASSWORD=/ [filename]

If you run into any trouble loading a file with links in it, make sure it has unix line endings. You can use the tool dos2unix to convert a file before using it.

Importing Java libraries in Netbeans on Linux

Tuesday, April 1st, 2008

When I found myself re-adding libraries in Netbeans again, I felt that I needed a quicker way to so. I have plenty of java libraries installed on my machine and it’s turning into a real hassle to set them up each time I clean out my Netbeans configuration folder.

So, that is why I created this script.

It is somewhat meant to be used on Gentoo. But it can be used on other distros too.

(more…)