Posts Tagged ‘linux’

Running TeamSpeak on Gentoo

Thursday, April 23rd, 2009

Running a TeamSpeak client on Gentoo is quite easy. But there is only a binary available. Installing it is as easy running “emerge media-sound/teamspeak2-client-bin“.

The only problem I had, was that it was blocking the sound-card when it was running. Teamspeak worked fine with alsa, but no other program could use the sound-card at the same time. This makes it completely useless for using during games… This happens because teamspeak uses the old oss sound system, which only allows multiple programs using the sound-card if it has a hardware mixer. And my sound card has none. Alsa emulates it, but this apparently doesn’t work right.

To fix this do “emerge media-libs/alsa-oss” and then run “aoss teamspeak” instead. I found the solution here.

Drop Linux Disc Cache

Saturday, March 14th, 2009

On this page I found a handy tip to drop the disc cache that Linux keeps in the main memory. I use this to reduce the amount of information written to disc when hibernating using TuxOnIce.

Linux has the tendency to keep all kinds of information cached in the memory. This is very handy when opening programs, but it can be a nousence when you have 2GB memory. Most of the times the disc cache is as large are even twice as large as the actual data in the memory.

When hibernating this results in writing up to 2GB to disk and this can take a while. And TuxOnIce seems not completely stable and crashes during resuming when the disc image is somewhere over 1GB.

So if my memory is filled I run the following commands as root and then I hibernate.
sync; echo 3 > /proc/sys/vm/drop_caches.
The sync command is also very handy for detaching USB drives, because it flushes the caches.

Installing Gentoo

Wednesday, February 18th, 2009

To continue last post,

After upgrading the drive of my laptop I wanted to install Linux on it. Because I am already familiar with Gentoo I choose to install this distribution. And it is quite easy to keep up to date, but more important it is very easy to update to a new version. I know it is a lot of work to install Gentoo! But hey you do learn a lot about the workings of Linux and the kernel. ;)

Installing of Gentoo is best done with the Live CD they provide on there website. It provides a complete Linux environment from which you can install/manage/repair you system. They give you the option to install Gentoo really manually from the shell and have the latest portage tree installed right away or use their (GUI or shell) installer which copies part of the system installed on the live CD to the disk drive.

I installed Gentoo manually, because your install will be quite up-to-date and you do not have to update the complete system again once you have it running on its own. Their manual is very helpful and quite easy to use. With Gentoo you can choose with patch set use use for the kernel, I choose to use the vanilla kernel 2.6.27.12, because I heard that the patches of the Gentoo developers aren’t always up to standard… And the this is a newer kernel :D The sources can easily be downloaded via emerge the install system of Gentoo. And did “cd /usr/src/linux” and “make menuconfig”. The result was hours of reading and deciding how to set up the kernel…

The kernel compiled with a warning for which I applied the following patch and it seems to be running smoothly:
— arch/x86/kernel/head_32.S.orig 2008-10-14 17:04:39.000000000 -0500
+++ arch/x86/kernel/head_32.S 2008-10-14 17:03:12.000000000 -0500
@@ -600,6 +600,7 @@

.section .cpuinit.data,”wa”
.align 4
+__REFDATA
ENTRY(initial_code)
.long i386_start_kernel

Once you are done, the system is completely bare. So after this I decided to install KDE. I tried Xfce2 also present on the Live CD before, but it was not mature enough for me. Because with Gentoo everything is build from the sources it took me a wooping 5 hours to build. :o This with the kdeenablefinal USE key enable, which should make compiling faster by using enormous amounts of ram.

When it was done I still needed to find out how to get it running. I tried running xorgconfig, but X kept complaining it could not find a window port. After some trial and error I figured out I needed to load the intel-agp and i915 modules, because I forgot to build them directly into the kernel. After this the X would happily start. And I had a GUI for the first time on my system!

The only thing they don’t tell in the manual is that you can only have 4 primary partitions in your MBR. So I needed to fiddle around a bit with partitions when I wanted to add some more partitions afterwards. But for this I found a very handy tutorial. But it is not for the faint hearted, because it involves deleting and recreating partitions with data on them :P

To be continued once again

Managing hamachi

Monday, November 17th, 2008

Today I managed to migrate my Hamachi identity from a Linux client to a windows client, for the sole purpose to add it to my my.hamachi.cc account. The pre 1 clients can not handle te request to join the account. And for linux 0.9.9.9-20 is the latest version.

For this I copied “client.pub” and “client.pri” from the configuration folder on my Linux box to C:\Documents and Settings\[USER]\Application Data\Hamachi\ and copied to contents from the “state” file under Linux file to a new file called “client.id” in the same folder under windows. After this I could just start-up Hamachi and accept the request.

For migrating in the other direction you need to copy the client.pri and client.pub and create a state file with the following lines that apply for you:
Identity [HAMACHI IP]
Nickname [NAME]
OnlineNet [JOINED NETWORK]

I haven’t tested the other way around yet, but it should work.