Posts

OpenClock and Gentoo

Image
OpenClonk is an open source game that has been in development for some time. Its fun and free. I downloaded a binary some time ago and started using it, but the latest release just doesn't work on my Gentoo machine in binary form. After some digging I didn't found an ebuild for this release, just for the live version. So I wrote my own and added to Gentoo's bug database . I learned a few things along the way but didn't get it as clean as I wanted. If someone knows how to convince cmake to install to a different directory than the prefix used it would be great. I ended up doing a patch for the generated cmake_install.cmake . If anyone knows how to avoid that patch I would appreciate the help. Here is a preview of the game:

Hidden Features...

I bought a Samsung SyncMaster XL2370HD recently. It has more than what I needed but I couldn't find one without the features I didn't need (HDTV) for a cheaper price so I bought it. I honestly though about returning it because the colours and fonts were horrible when I first connected my laptop through HDMI. I played a LOT with the settings but didn't get anything good. I finally solved the issue by renaming the source. That's right: you go the options, rename the source HDMI to PC and everything should start to working perfectly. They should call this feature "Source Fixer" instead of "Name Editor" as it turns off many of the "default" processing features that I don't need. So, if you had a problem with weird colours or fonts in your monitor when using an HDMI cable try to rename the source HDMI. It is called "Edit Name" in my monitor and it will show you a list of devices (it won't allow you to input one). Just choose P

More on Jack...

Well, jack isn't working well with non jack applications. The jack-plug doesn't always work and I can't get it to be stable. I'll continue to look into it. If I find anything I'll post it here. For now I'll use jack with applications that support jack.

Enhanced security in Chromium

I moved away from Firefox to Chromium (the open source part of Google Chrome ). When I moved I search for all the extensions I used in Firefox. One of them was Flashblock . There is also a Flashblock for Google Chrome but I wanted to block all plugins until I say so. Luckily, Google Chrome has that option. Just got to about:flags and enable on the Click to Play flag (this is available in the latest beta of Google Chrome 9, I don't know about the stable Google Chrome 8). Restart the Browser so the flag comes into use. Then enable click to play for the plugins as follows: Open the Preferences, go to "Under the Hood", Right under the "Privacy" click the button "Content Settings...". Then select "Plug-ins" and choose the brand new "Click to play" option. When you open pages with plugins an icon will appear in the address bar indicating that plugins were blocked. You can use the icon and enable all the plugins for the page, but I pre

Using jack to record telcos and screen

Image
At my job we use VOIP regularly when making conferences or simply calling a colleague. We also have a screen sharing tool that we use to share the screen to remote participants. This is also used to make remote training sessions. What I've been missing is a way to record both the shared screen and sound for later viewing. I hacked jack a little in the past but didn't manage to get it working. I've been having some free time so I decided to hack it today and I finally got it working. So, from the start. Gentoo's JACK guide on the wiki is not bad but I honestly didn't pay much attention to it. I have the jack use flag enabled globally so it was time to get it going. First I emerged qjackctl . It is nice program that sits on the tray area (I have it default to hidden) that starts the jack daemon and that allows you to control what is connected to where. I also emerged alsa-plugins to get the alsa-jack plugin. Finally I emerge jamin . I need it just to be able to

Howto make your private VM Cluster, Part III

Continuing with my saga , next up is DRBD . I'm using DRBD because I also want to test it as a viable alternative for network raid . To use DRBD I first created a LVM volume to use: lvcreate -n drbd-demo -L 100M internal-hd Then I configured DRBD on both nodes, fortunately gentoo simplifies a great part of the process (you have to do this on both nodes): cd /etc cp /usr/share/doc/drbd-*/drbd.conf.bz2 . bunzip2 drbd.conf.bz2 Then I created a wwwdata resource by first configuring it (again on both nodes). This is done by creating a file /etc/drbd.d/wwwdata.res with the contents: resource wwwdata { meta-disk internal; device /dev/drbd1; syncer { verify-alg sha1; } net { allow-two-primaries; } on node1 { disk /dev/mapper/internalhd-drbd--demo; address 192.168.100.10:7789; } on node2 { disk /dev/mapper/internalhd-drbd--demo; address 192.168.100.11:7789; } } I added the drbd module

Howto make your private VM Cluster, Part II

In the previous entry I showed how to build the basic structure for your own private VM Cluster. Today I'm going to show you how to create a cluster with two VMs that provides High-Availability for a WebServer using DRBD to replicate the Web Site. First you need to create a virtual machine. I decided to create a VM with Gentoo . I will use LVM to keep the partition to use for drbd small since this is a simple test. I created a qemu-img for a base gentoo installation (my goal is to install gentoo on the VM and then reuse it as base for the other VMs). To create the image just run: qemu-img create -f qcow2 gentoo.qcow2 10G I started the VM using that image and followed Gentoo's installation guide . My partition scheme was 100Mb (boot), 512Mb (swap), 5Gb (root), rest for lvm. I used the gentoo-sources, configuring all virtio devices, drbd and the device-mapper. I configured genkernel to use lvm so it detects the lvm volumes at boot. I used grub and added all the genkern

Howto make your private VM Cluster, Part I

I wanted to make some experiments with DRBD , pacemaker and others. The goal is to test a few configurations for an high availability scenario. Since I don't want to make changes to my machine the solution is to use Virtual Machines. I decided to go all open source and use KVM . Since I want more that a single VM I decided to setup a private bridge to which all the VMs would connect. The bridge would provide DHCP and DNS services and NAT + Firewall to the internet. I use Gentoo . If you use another distribution or firewall tool you should adapt these instructions and scripts to fit your needs. First I created a script that sets up my bridge. The script is as follows (I called it setupBridge): # !/bin/ bash set -x # Setup the bridge sudo brctl addbr br0 sudo ifconfig br0 192.168.100.1 netmask 255.255.255.0 up # Launch DNS and DHCP Server on br0 sudo dnsmasq -q -a 192.168.100.1 --dhcp-range=192.168.100.50,192.168.100.150,forever --pid-file=/tmp/br0-dnsmasq.pid # Launch updated fire

Laptop Power Saving

Today I had an issue updating the kernel on my company's laptop. I ended up reconfiguring it from strach istead of doing the oldconfig option (make oldconfig didn't ask anything but the kernel hard locked on boot). I took the oportunity to try to get a more duration out of the battery. How? By consuming less power. PowerTop came in and lend a helping hand but it was not sufficient. When I enabled USB Suspend (CONFIG_USB_SUSPEND) the keyboard didn't work well. I have a keyboard, mouse and webcam connected to a hub that I use when I'm on my desk. Everything was working, power was being saving, even for the keyboard. The problem was that when the keyboard entered power saving mode and I pressed a key the first key that I pressed would be lost. The documentation talks about this issue but I didn't want to loose on the opportunity to increase my laptop's autonomy. Solution: udev to the rescue. I created a udev rule that detects the USB Keyboard (by vendor and produ