Tag: hacks
Google Earth trip video capture in GNU/Linux with Yukon/Seom
by plouj on Jul.15, 2009, under GNU/Linux, HOWTO, hacks, tools, video
This is documentation of how I used Yukon and Seom to video capture a Google Earth trip for a recent video project in Fedora 10. I used the official installation guide as a starting point.
Compile the Seom library
I choose to install both Seom and Yukon in a custom prefix /home/plouj/yukon, rather than the system wide /usr or /usr/local.
$ svn co https://devel.neopsis.com/svn/seom/branches/packetized-stream seom $ cd seom $ ./configure --prefix=/home/plouj/yukon --arch="x86" --cflags="-W -Wall" && \ make CC="gcc -m32" && make install LIBDIR="lib"
Note that “–arch=”x86″ and “-m32″ are only necessary for me because my operating system is 64bit and I need 32bit versions of seom and yukon (to work with 32bit Google Earth).
Compile and install Yukon
$ svn co https://devel.neopsis.com/svn/yukon/branches/rewrite yukon $ cd yukon $ ./configure --prefix=/home/plouj/yukon/ --libdir="lib" --arch="x86" && \ make CC="gcc -L/home/plouj/yukon/lib -I/home/plouj/yukon/include -m32" && \ make install
Install Google Earth for Linux
Obviously get it here: http://earth.google.com/
Modify the Google Earth startup script
Since I chose /home/plouj/bin/ as the “Binary path” for Google Earth I was editing /home/plouj/bin/googleearth. All I had to do was to add yukon/seom library and executable paths at the end of the script:
...
cd "${GOOGLEEARTH_DATA_PATH}/"
LD_LIBRARY_PATH=/home/plouj/yukon/lib/:$LD_LIBRARY_PATH \
PATH=/home/plouj/yukon/bin:$PATH exec yukon "./googleearth-bin" "$@"
instead of the original:
cd "${GOOGLEEARTH_DATA_PATH}/"
exec "./googleearth-bin" "$@"
Capture
Finally, the capture process is well documented on the Yukon website.
Quake1 demo recorded on the Wii
by plouj on Aug.19, 2008, under fun
I wastedspent today’s evening playing around with Quake1 which I installed on my brother’s Wii through the Homebrew channel. One cool thing that I managed to get working relatively painlessly was demo recording.
Since there is no keyboard support in Quake1 yet, I had to add the following bind to the /id1/config.cfg file on the SD card using a desktop computer:
bind "UPARROW" "disconnect; skill 3; record wii; map e1m1"
This allowed me to simply press the up arrow button on the Wii remote and Quake1 would start recording a demo of me playing the first level of the first episode on Nightmare difficulty.
So far, I haven’t been able to play the game as quickly and as precisely as I can on a computer with a mouse. Not that I’m a great Quake player to begin with. However, I still had a lot of fun, especially after I started using the Wii Zapper. It gave me a nice sensation of holding boom stick, but didn’t improve my aim.
Here is the actual demo bzip2 archive for those who really want to watch me get owned by zombies from another dimension for a few minutes. This demo should be playable with most Quake1 engines and original (full version or demo) game data from ID. I used my personal favourite – Darkplaces:

.
These screenshots sort-of show that I’m shooting at stuff which is not directly under my cross-hair because of the way Wii remote look works. In the actual Wii Quake, the gun model also moves around the screen.
TAP that DHCP bridge for some Qemu TUN in Fedora
by plouj on Jul.29, 2008, under HOWTO
The other day I needed to setup bridged networking for a Qemu virtual machine. Although I found a rather well written generic TAP interfaces guide on Wikibooks. It only explained how to configure a network bridge on a host machine with a static IP. I wanted to do this on a host that used DHCP. Plus I wanted to keep all configuration in Fedora specific places. Having discovered a good way to do this through experimentation after a few fruitless Google searches I thought it would be useful for myself and others to have the configuration documented here.
ifcfg-eth0
First, I changed the host’s (auto-generated) /etc/sysconfig/network-scripts/ifcfg-eth0 script from this:
# Attansic Technology Corp. L1 Gigabit Ethernet Adapter DEVICE=eth0 BOOTPROTO=dhcp HWADDR=00:1D:60:35:A7:64 ONBOOT=yes
to this:
# Attansic Technology Corp. L1 Gigabit Ethernet Adapter DEVICE=eth0 TYPE=Ethernet BRIDGE=br0 ONBOOT=yes
This turns off DHCP on the physical Ethernet device and just specifies that it will be connected to or a part of a bridge.
ifcfg-br0
Second, I created /etc/sysconfig/network-scripts/ifcfg-br0, which will be called to setup a bridge device:
DEVICE=br0 TYPE=Bridge BOOTPROTO=dhcp HWADDR=00:1D:60:35:A7:64 ONBOOT=yes DELAY=0 STP=off
As you can see, most of this configuration is copied from eth0 plus the bridge configuration as per the Qemu Wikibook.
qemu-ifup/down
Third, I shortened the /etc/qemu-ifup and /etc/qemu-ifdown from Wikibooks to get this:
/etc/qemu-ifup:
#!/bin/sh USER=$(id -un) sudo /usr/sbin/openvpn --mktun --dev $1 --user "$USER" sudo /sbin/ifconfig $1 0.0.0.0 promisc up sudo /usr/sbin/brctl addif br0 $1
/etc/qemu-ifdown:
#!/bin/sh sudo /sbin/ifconfig $1 down sudo /usr/sbin/brctl delif br0 $1 sudo /usr/sbin/openvpn --rmtun --dev $1
Here I basically removed all of the configuration that is taken care of in the sysconfig scripts. I also made explicit use of sudo simply because that is my preference.
Final steps
Now I can simply run /etc/qemu-ifup tap0 once to create a TAP device, and use something like: qemu-kvm -hda /virtual-machines/fedora9.disk -m 512 -net nic -net tap,ifname=tap0,script=no to start a virtual machine. When I’m done running the virtual machine, I can run /etc/qemu-ifdown tap0 to remove the TAP device.
All this sounds simple now that it’s working, but initially it took a lot of guessing on my part so I’m documenting it here for the future.
I would appreciate it if someone can point me to the official Redhat/Fedora documentation on editing /etc/sysconfig/network-scripts/ scripts.
