Author Archive

OANDA

by plouj on Dec.09, 2009, under career, job

Well, after about 3 months of almost full-time job searching I’ve finally gotten a new permanent job. Today is my first day as a Developer at OANDA.

Leave a Comment :, , , , , more...

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.

Leave a Comment :, , , , , , , , , , , more...

HOWTO increase Blender’s memory cache limit for command line renders

by plouj on Jun.08, 2009, under GNU/Linux, HOWTO, hacks

Blender sequencer gives the ability to optimize rendering of repeated frames by keeping the first result in memory cache and re-using it. Depending on the project, it might be necessary to increase this limit beyond the default 32MB. If the limit is surpassed while rendering a single frame, Blender clears the cache before proceeding to the next frame and the re-renders everything from scratch.

Increasing the cache limit is easy to do in the UI:
blender-cache-limit
This setting is stored in the user’s preference file (~/.B.blend on Linux systems) and, therefore, applies to all projects. However, rendering from the command line requires using the -b argument, which explicitly ignores the user’s preference file. Apart from editing and re-compiling the Blender source code, I found only one way to increase the memory cache limit.

The trick is to use a Python script, like below, to change the user preferences before rendering the scene:

import sys
import bpy

def main():
	bpy.config.sequenceMemCacheLimit=4096

if __name__ == '__main__':
	main()

Add the script to the command line like this:

./bin/blender -b sample-static-text.blend -P render_settings.py -a

Note that the order of arguments matters because first we need to load the scene (with -b), then change settings through Pythons (using the -P option) and finally render the animation (with -a). Also, you need at least version 2.49a of Blender for this to work.

For reference, here’s is the the source file which hardcodes the 32MB limit:

intern/memutil/intern/MEM_CacheLimiterC-Api.cpp:

...
static intptr_t & get_max()
{
        static intptr_t m = 32*1024*1024;
        return m;
}
...
Leave a Comment :, , , , , , , , , , , , , , , more...

OpenDNS in Fedora with corporate DHCP and DNS with NetworkManager

by plouj on Apr.20, 2009, under GNU/Linux, HOWTO, hacks

Here is how to configure a Fedora workstation to use OpenDNS nameservers in a network with corporate DNS and DHCP servers without loosing access to their services.
This was done on a Fedora 9 machine with dnsmasq being the local DNS server. It should also work on newer Fedora versions and even other GNU/Linux distributions.

The setup is actually very simple and unobtrusive. It is only necessary to properly configure a local DNS server and then force 127.0.0.1 to be used as the only nameserver instead of the corporate DNS servers.

First you need to configure dnsmasq as follows:

/etc/dnsmasq.conf

# don't use the /etc/resolv.conf file anymore
no-resolv

# OpenDNS nameservers:
server=208.67.222.222
server=208.67.220.220

# Force corporate nameservers for corporate.domain.com lookups
# OpenDNS wouldn't be able to answer such queries correctly
# adjust to suit your network
server=/corporate.domain.com/10.1.1.1
server=/corporate.domain.com/10.1.1.2

# only respond to queries from the local machine
listen-address=127.0.0.1
bind-interfaces

conf-dir=/etc/dnsmasq.d

Then you need to go into NetworkManager and set 127.0.0.1 as the DNS server to be used:
nm-localhost-dns-server

This will result in the following important settings added to your network scripts:

DNS1=127.0.0.1
PEERDNS=no

I’ve noticed two minor problems with this setup:

  1. the corporate DNS server names are hardcoded in the configuration. Usually they are determined automatically by the DHCP client.
  2. restarting the dnsmasq service sometimes shows this error:
    dnsdomainname: Host name lookup failure
Leave a Comment :, , , , , more...

HOWTO build DXX-Rebirth for Windows with MSYS/MinGW

by plouj on Mar.07, 2009, under HOWTO, games

Introduction

In this post I’ll document the steps I had to take to build DXX-Rebirth (a modernized Descent game engine) for Windows using MSYS and MinGW.

MinGW, MSYS

From  Pantokrator’s blog:

  • install MinGW
    • choose a lowercase install path: c:\mingw
    • choose to download and install current version
    • enable g++ (for physfs)
  • install MSYS
  • install msysDTK

SDL and SDL_mixer

Also from  Pantokrator’s blog:

  • download the SDL source
  • in the MSYS shell, compile it with
./configure --prefix=/mingw && make && make install
  • download the SDL_mixer source and in a MSYS shell, build it with the same command:
./configure --prefix=/mingw && make && make install

PhysicsFS

  • Compile with the same command again:
./configure --prefix=/mingw && make && make install

SCons and Python

From Globulation2 MinGW instructions:

PATH=$PATH:/c/Python26:/c/Python26/Scripts
  • to the end of /etc/profile in MSYS so that SCons can run from the MSYS shell.

Subversion

DXX-Rebirth

  • checkout DXX-Rebirth from https://dxx-rebirth.svn.sourceforge.net/svnroot/dxx-rebirth
  • change the SConstruct script to call sdl-config as ’sh sdl-config ‘:
...
Flags and stuff for all platforms...
env.ParseConfig('sh sdl-config --cflags')
env.ParseConfig('sh sdl-config --libs')
env.Append(CPPFLAGS = ['-Wall', '-funsigned-char'])
...
  • finally, in the MSYS shell, built with:
scons sdlmixer=1

Final Remarks

I had trouble with the latest version of PhysicsFS (1.1.1) because it uses cmake. For some reason it failing to find some prerequisites in MSYS. I also had trouble with version 1.0.1 of PhysicsFS (this is the version the official d1x-rebirth_v0.55.1-win.zip is built with) because the built failed with the following error:

warning: cannot find entry symbol _DllMainCRTStartup@12; defaulting to 00401000
...
undefined reference to WinMain@16

If you notice any problems or mistakes in this post, please mention them in the comments.

1 Comment :, , , , , , , , , , , , , , , , more...

Quick Picasa evaluation

by plouj on Dec.02, 2008, under review

This is a quick, biased, un-authoritative and incomplete evaluation of Google’s photo manager Picasa. In total, I’ve spent no more than a couple of hours using Picasa. I’ve already chosen to use Digikam as my photo manager so I was going to blatantly ignore its many faults and ruthlessly criticise Picasa. Don’t read this post to learn about Picasa. Download it yourself or look for more comprehensive reviews elsewhere on the ‘net. I’m writing this because I promised a friend at work to look at Picasa and later I decided to put my observations in writing. You’ve been warned.

What I liked

  • importing images into the gallery using a separate and (seemingly) lower priority thread makes  the UI usable right from the start.
  • it hasn’t crashed on me while importing 11,000+ pictures into the gallery
  • cute, but useless timeline display application:
  • Google provided an RPM repository which makes installing, upgrading and un-installing very easy for me

What I disliked

  • simplified colour tuning controls. They might be OK for beginners, but they don’t appeal to someone like me who has used colour curves before.
  • at first launch, Picasa started to import images from my whole home directory, which is huge and has tonnes of pictures. This only made me realize just how many images I have (mostly application icons and game project textures) that really don’t belong in a photo catalogue. I also couldn’t find a way to tell Picasa to stop and only look in certain directories.
  • Picasa froze when I first tried the “tools > folder manager”. It worked on the second attempt, and I realized that this is the tool used to tell Picasa exactly what directories to include when searching for images.
  • the “Tools > Experimental > show duplicate pictures” function was indeed experimental. It seemed to just give me a list of images without indicating what the duplicate pairs (or groups) were.
  • the search results for the “show duplicate pictures” also showed a strange status bar at the top of the main window. I never figured out the meaning of the constantly changing seconds value or what GPixel was referring to.
  • the “importing indicator”, although neat (it showed what picture was being imported in real time), was rather useless. Most importantly, it did not show the total progress percentage. When I tried to close it, it seemed to just re-appear in a different location along the side of the main Picasa window. Then it simply started sliding up and down without explanation.
  • after a lot of clicking, I managed to loose the album list view in the left pane and had to re-start Picasa
  • ugly dithered splash screen image – c’mon, we’re not in the 1990’s anymore!
  • the scrollbar in the main view controls the view scroll speed, not the actual movement of the view – annoying and misleading. It didn’t let me get near the bottom right away, and I got dizzy every time I scrolled. However, I think the search result view actually changed the scroll bar function to the usual scroll bar for reasons beyond me. [Edit: after more use I realized that the way the scroll bar behaves in Picasa (combined with really smooth scrolling) helps with showing many photographs to other people looking at your screen. You can just drag the scrollbar just a bit to achieve a nice steady scroll speed and discuss the pictures instead of having to continually "pull" the images up or down with the mouse.]
  • I somehow totally failed to find the familiar timeline/calendar view of my photos. Does Picasa really not have a way to organize photos in this manner?
  • this is proprietary software from Google. I actually like a lot of stuff that comes from Google, but when it comes to software licensing, I don’t play favourites. I simply try to avoid non-Free Software as much as I can.

What I ignored

  • uploading to and syncing with various web services
  • ordering prints
  • printing to a local/personal printer
  • picture backup feature – rsync is fine for me
  • passport photo function – This made me realize that I’m definitely not the intended audience of Picasa
  • the ability to store video flies, which I consider to be outside of the scope of this program
  • anything else I haven’t mentioned, obviously

Final thoughts

In conclusion, I’ve used my experience with Picasa to re-inforced my decision to stick with Digikam – a Free/OpenSource Software photo manager.

2 Comments :, , , , , , , , , more...

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.

Leave a Comment :, , , , , , , , , more...

Michael Phelps – New Chuck Norris

by plouj on Aug.19, 2008, under fun

What a great way to start the morning: http://ianweller.org/2008/08/19/michael-phelps-is-the-new-chuck-norris/
I wonder if this is the kind of stuff/legends/myths/tales we’ll be telling our grand kids about.

2 Comments :, , , more...

War Photographs from South Ossetia

by plouj on Aug.15, 2008, under activism

I’ve put up a mirror of a forum post full of photographs from South Ossetia:

http://plouj.com/war-in-south-ossetia-almanac-art-of-war-www.navoine.ru/

Note:The photographs contain real blood and gore and therefore are definitely not recommended for children.

The photos were taken by Аркадий Бабченко and now belong to the “Art of War” Almanac.

Leave a Comment :, , , , , , , , more...

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.

5 Comments :, , , , , , , , , , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...