Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Install Neverwinter Nights on any linux distribution

Neverwinter Nights Diamond GOG on linux


First make sure that you have the following tools and libraries installed on your system:

innoextract, unzip, 7z, tar, unrar (to extract the game files)

For the nwmovies, nwlogger, nwuser and nwmouse tools, you will need the 32-bit version of these libraries, including their development headers (-dev or -devel packages):


Use the package manager of your distribution to install them. On Ubuntu, development packages have the suffix -dev appended to their name, and you can install 32-bit versions of packages by appending :i386 to their name. For example, to install the 32-bit version of the sdl development libraries, you would have to type sudo apt-get install libsdl1.2-dev:i386.

In this guide, we will install the game in a folder named Neverwinter at the root of your home directory. Of course, you're free to put it wherever you want.

First, create some folders that we will need during installation:

mkdir ~/Neverwinter
mkdir ~/Neverwinter/nwn

Download these and puth them in the ~/Neverwinter folder you just created:

Note: There is a mirror of the bioware ftp site at:

Note: it seems like Bioware took down their FTP servers for good. Here are some actively maintained mirrors, courtesy of and

The files you need are:


Navigate to ~/Neverwinter and clone these repos:

cd ~/Neverwinter
git clone
git clone
git clone
git clone

You need the setup files from GOG, plus the Kingmaker expansion pack (the "premium module reinstaller" in the extras section in your GOG library):


Put them in the ~/Neverwinter folder.

To play movies, we need the BinkPlayer from RAD Game Tools. Download it here and extract it somewhere:

Finally, we need to write a custom patch file for the nwmovies tool. Open your favorite text editor and paste the following:

---	2017-06-18 00:59:03.297013302 +0200
+++	2017-06-18 00:59:43.553680961 +0200
@@ -59,7 +59,7 @@
 			 $gcc, $cflags, $x86_64, $ndir, $ndir, $ndir, $ndir );
-$command = sprintf("%s %s %s -Wall -shared -g -I/usr/include/libelf -I%s/libdis -o %s/ %s/nwmovies.c %s/nwmovies_lookup.c %s/nwmovies_cookie.c %s/nwmovies_player.c %s/nwmovies_link.S %s -ldl -Wl,-static -lelf -Wl,-Bdynamic", 
+$command = sprintf("%s %s %s -Wall -shared -g -I/usr/include/libelf -I%s/libdis -o %s/ %s/nwmovies.c %s/nwmovies_lookup.c %s/nwmovies_cookie.c %s/nwmovies_player.c %s/nwmovies_link.S %s -ldl -Wl,-static -lelf -Wl,-Bdynamic -lz", 
 			$gcc, $cflags, $x86_64,  $ndir, $ndir, $ndir, $ndir, $ndir, $ndir, $ndir, $ldflags ); 

Save it as libz.patch in the ~/Neverwinter folder.

To verify, make sure your ~/Neverwinter folder looks like this (type ls -1):



Unless specified otherwise, all commands are executed from the ~/Neverwinter folder you created before.

  1. Extract the game's data from the GOG installer:
innoextract -e setup_nwn_diamond_2.1.0.21.exe --gog

This will create a bunch of folders in your ~/Neverwinter directory.

  1. Extract King Maker data files into kingmakertemp (excluding the $PLUGINSDIR folder, as well as exe and dat files):
7z x KingmakerSetup.exe -xr'!$PLUGINSDIR' -xr'!*.exe' -xr'!*.dat' -okingmakertemp
  1. Move game files from the game subfolder into nwn, as well as your cdkey:
cd game
mv -t ~/Neverwinter/nwn ambient data dmvault hak localvault modules movies music nwm texturepacks premium chitin.key dialog.tlk xp1.key xp2.key
cp ~/Neverwinter/support/app/nwncdkey.ini ~/Neverwinter/nwn
  1. Move over the contents of the nwlogger, nwmovies, nwuser and nwmouse folders into the nwn subfolder:
cd ~/Neverwinter
mv nwmouse/* nwn/
-mv nwlogger/* nwn/
mv nwuser/* nwn/
mv nwmovies/* nwn
  1. Extract the Linux client files in this order and move over the King Maker game files:
tar xfv nwclientgold.tar.gz --directory nwn 
tar xvf nwclienthotu.tar.gz --directory nwn

mv -n kingmakertemp/\$0/* nwn/

tar xvf English_linuxclient169_xp2.tar.gz --directory nwn
  1. Compile and install nwmouse, nwuser, nwlogger and nwmovies. You need to patch nwlogger_cookie.c so that gcc finds the sys/user.h header file. We will also apply the libz.patch patch that we created before:
cp libz.patch nwn/nwmovies/
cd nwn
/bin/sed -i 's|linux/user.h|sys/user.h|1' nwlogger/nwlogger_cookie.c
cd nwmovies
patch < libz.patch
cd ..

./ build

cp nwmovies/libdis/ lib/ 
  1. Create the launcher script. Open your favorite text editor and paste the following:

# Create user directory if it doesn't exist
if [ ! -d "$HOME/.nwn/"  ]; then
    mkdir $HOME/.nwn/

# Uncomment to make SDL sound work on software mixers

# Hardware mouse cursor
export XCURSOR_PATH=/opt/nwn
export XCURSOR_THEME=nwmouse

# Enable AA on NVidia cards
# 3 = 1.5 x 1.5 super sampling
# 4 = 2x2 super sampling
export __GL_FSAA_MODE=4

export LD_PRELOAD=./

#run the game, allowing for executable flags
./nwmain $@

Save it as inside the nwn directory and make it executable, like so:

cd ~/Neverwinter/nwn
chmod +x
  1. Run the fixinstall script. It will rename a bunch of files and check file permissions. Look carefully at the output and make sure that all tests pass.
cd ~/Neverwinter/nwn
  1. If you want to play movies, you need to put the BinkPlayer executables you downloaded into the nwmovies folder:
mv BinkPlayer ~/Neverwinter/nwn/nwmovies/
mv BinkPlayer64 ~/Neverwinter/nwn/nwmovies/
chmod +x ~/Neverwinter/nwn/nwmovies/BinkPlayer*
  1. Test the game by running ./ You will have to run it several times in order for the various nwlinux tools to intialize their configuration files.

You can now run the game with ./

Optional: .desktop entry and icons

In this part we will create a .desktop entry so that you can run the game from your applications menu.

[Desktop Entry]
Comment=A Forgotten Realms CRPG
Name=Neverwinter Nights

Save it as nwn.desktop and move it to /usr/share/applications/:

sudo mv nwn.desktop /usr/share/applications/

Next we'll create icons to go with your shiny new desktop entry.

First we will convert the .ico provided by the GOG installer into the more usable png format:

cd ~/Neverwinter
mkdir icons
icotool -x -p 0 game/goggame-1207658890.ico -o icons

Then we'll install them into the system's icon folder:

sudo mv icons/goggame-1207658890_6_256x256x32.png /usr/share/icons/hicolor/256x256/apps/nwn.png
sudo mv icons/goggame-1207658890_7_48x48x32.png /usr/share/icons/hicolor/48x48/apps/nwn.png
sudo mv icons/goggame-1207658890_8_32x32x32.png /usr/share/icons/hicolor/32x32/apps/nwn.png
sudo mv icons/goggame-1207658890_9_16x16x32.png /usr/share/icons/hicolor/16x16/apps/nwn.png

Finally, we update the icon cache:

xdg-icon-resource forceupdate --theme hicolor


From the AUR:

Stephen Baker Slash <demodevil5[at]yahoo[dot]com> Adam Griffiths <>


Pedro Mateus:


This comment has been minimized.

Copy link

commented Mar 5, 2018

Download links from and seem dead.
Alternative downloads for the NWN Linux client can be found there:
These are lightweight alternatives that will only work on 1.68 or 1.69 version of the game.


This comment has been minimized.

Copy link

commented Mar 27, 2018

bioware's cdn has been weird since 2010 or so, I remember having to poke around their FTP server back then to get the files - still have them around somewhere, was a right pain to collect all of 'em.

Don't think they allow public FTP now either so that door's closed for the better part of half a decade.


This comment has been minimized.

Copy link

commented Jul 7, 2019

Thanks so much for these instructions! The only things I had to change were:

  • It should be kingmakertemp in mv -n kingmakertmp/\$0/* nwn/ (step
  • I had to set export SDL_AUDIODRIVER=pulse in
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.