SiLT: simple Linux tools

•August 9, 2011 • Leave a Comment

I’ve started a new open source project called SiLT. You can find it at It is a collection of Linux tools that I find useful. For example, it contains:

  • runcmd: A tool to run other commands with many useful options. runcmd is particularly useful for running experiments. Supported options include
    • Setting a timeout value for the spawned command.
    • Setting the cpu affinity.
    • Recording the spawned command’s exit value and resource usage to a file.
  • grep-recursive: A tool that combines grep and find to perform a recursive grep. It allows options such as only searching in files with specific file types. For example, a developer may only want to search in .h, .c, and .cpp files.
  • replace: A tool that performs global replacements in files, for those that don’t know sed/awk.
  • getctypeinfo: A program that prints out the number of bits in and the min and max values of many common C types.

Getting Neverwinter Nights 2 to Install and Run on Windows 7

•January 23, 2010 • 3 Comments

In this post, I detail my experiences getting Neverwinter Nights 2 (NWN2) to install and run correctly on Windows 7.

  • When I first installed NWN2 on Windows 7, I received a warning toward the end of the installation giving me an ERROR_DX_INSTALL message; however, the installation seamed to finish.  When I launched the game, Windows complained that the game had stopped working.  So, after searching on the internet, I did the following to get it working.  I am not sure if the first step needs to be performed, but I will list it in case it is needed.
  1. The first thing I did was install the DirectX 9 redistributable package, located at I realize that Windows 7 is being bundled with DirectX 11, but the above package will not conflict with it.
  2. The next thing I did was manually patch NWN2 as far as I could, as the game’s automatic updater would not patch the game until the game had been run once, and as you know, I could not run the game.  You can find NWN2 manual patches at  If you know how to manually patch NWN2 you can skip the following details.
    1. Obtain and run the NWN2 manual patcher.
    2. Note the version of NWN2 that you have installed, located in the bottom right had corner of the manual patcher, when it is launched.
    3. Assuming you don’t have any expansions installed yet, you need patches with the following naming convention: nwn2_pc_<language>_from<starting version>_to<ending version>.zip.  You need to download and install consecutive patches starting with the version you noted above.  Install up to the highest version you can get to, but make sure that each patch is an nwn2_pc patch, you install patches consecutively, and there are no gaps between patches.  There is a gap between patches if you install patches A and B, one right after another, and the ending version number of patch A does not match the starting version number of patch B.
      • At the advice of a friend, I unzipped each patch into my NWN2’s installation directory before installing them.  However, I’m not sure if that is necessary.
      • I was able to install patches from version 104870 to version 1111115.
  • After performing the steps above I was able to launch NWN2.  So, I tried to install the Mask of the Betrayer expansion.  After doing so, I tried to launch the game and again Windows complained that the game had stopped working.  So, as before, I manually patched NWN2 as far as I could.  This time, patches should be of the form  nwn2_pcx1_<language>_from<starting version>_to<ending version>.zip. pcx1 stands for expansion 1.  You will have to check the version of NWN2 as you did before to know which patch to begin with.  I installed patches starting with version 1101115 and ending with version 1211549.
  • At this point, NWN2 with Mask of the Betrayer patches launched and played.  However, roughly 15-20 minutes into creating a character in multiplayer mode, it crashed.  So, I launched NWN2 in administrator mode, made it through character creation, saved, and relaunched without being in administrator mode.  That seamed to fix all of the problems.  I’m not sure why administrator mode fixed the problems, but I will hazard two guesses as to why.
  1. There was some save file to which NWN2 was trying to write, and it did not have permissions to create the file.  After having run the game in administrator mode, the file was successfully created.
  2. There is a bug in NWN2 character creation that administrator mode somehow overcomes.

Using ATI Tray Tools in Windows 7

•January 23, 2010 • Leave a Comment

ATI Tray Tools (ATT) is a fantastic tool maintained by Ray Adams for configuring ATI graphics cards.  The amount of configuration options that it provides compared to the standard ATI Catalyst Control Center (CCC) is quite remarkable.  If you do any serious Windows pc gaming with an ATI graphics cards, then ATT is a must have.  In order to use ATT with Windows 7, there are two things you need to know.

  1. Drivers must be signed to use them in Windows 7.  ATT uses unsigned drivers, most likely because driver signing costs money, and Ray Adams is giving ATT away for free!  So, if you want to use ATT, then you need to disable the driver signing requirement in Windows 7.  You can find instructions for doing so at
  2. In my experience, you need to use the latest beta of ATT if you’re using it with Windows 7.  You can download the latest beta from:  Being a security guy, if some posted an odd link like the one I just posted, I’d be a little leery that it was valid.  So I’ll post a link to the thread where Ray states the location of the latest ATT beta:

Using Unsigned Drivers in Windows 7

•January 23, 2010 • 1 Comment

A new feature of recent versions of Windows is that they will not allow the use of unsigned drivers.  Unfortunately, driver signing costs money that not every software project can afford.  Fortunately, there is a way to disable the driver signing requirement in Windows 7.  Please keep in mind that disabling the enforcement of driver signing is a security risk, and I am not responsible for any problems it may cause.

To disable the driver signing requirement, open a dos prompt as administrator and enter the following commands:

bcdedit.exe /set loadoptions DDISABLE_INTEGRITY_CHECKS
bcdedit.exe /set TESTSIGNING ON

To check the values of these settings, open a dos prompt as administrator and run:

bcdedit.exe /enum

To undo these settings, open a dos prompt as administrator and run:

bcdedit.exe /deletevalue loadoptions
bcdedit.exe -set TESTSIGNING OFF

Using Putty SSH Aliases with TortoiseSVN

•January 23, 2010 • Leave a Comment

TortoiseSVN is a Windows shell extension for SVN. A problem that can arise is when using subversion is that you may need to access a repository through SSH, but on a non-standard port. Unfortunately, you cannot specify the port using the following notation svn+ssh://<user>@<host>:<port>/repo/path. The typical way to overcome that issue is to create SSH configuration aliases. However, in my experience with TortoiseSVN, it does not utilize SSH aliases defined in C:\Users\<user>\.ssh\config. An alternative way to define aliases that TortoiseSVN will respect is to define them with the Putty windows SSH client. All you need to do is download Putty, launch it, and create a “Saved Session” with with the same name as the alias, and using the correct host name, and port number.

Using Laptop Multimedia Keys with Amarok 2.0 in Gnome

•January 23, 2010 • Leave a Comment

If you’re using Amarok 2.0 in a Gnome windowing environment, you can use the following Amarok script to enable laptop multimedia keys such as pause/play:

Audacious, an XMMS Replacement

•May 21, 2008 • Leave a Comment

In light of the fact that XMMS has been dropped from from Ubuntu in version 8.04, I wanted to post about audacious, a media player that is very similar to XMMS.  In fact, it was forked from the beep-media-player, which was forked from XMMS.  Audacious is a lightweight, stand-alone media player.  If you want a Linux media player that is similar to itunes, I recommend trying amarok.