CAPTCHA
Image CAPTCHA
Enter the characters shown in the image.
This question is for testing whether or not you are human.
  • Create new account
  • Reset your password

User account menu

Home
The Hyperlogos
Read Everything

Main navigation

  • Home
  • My Resumé
  • blog
  • Howtos
  • Pages
  • Contact
  • Search

Installing Neverwinter Nights on Ubuntu Gutsy

Breadcrumb

  • Home
  • Installing Neverwinter Nights on Ubuntu Gutsy

I wanted to play Neverwinter Nights on Linux, and didn't have it installed anywhere. Today, the easiest way to install NWN for linux (by far) is to use the current installer from Bioware; you can even download the game content from them, although you will need your own registration code. The code from the Windows version works fine. However, I'm on a modem and downloading that much data is out of the question. It could take me days to download the patch, alone (I get 26.4kbps on average - life in the country is swell.)

I therefore noodled around and found http://icculus.org/~dolson/mdkxp/ which led me to the actual proper linux client page. Then I noodled around on my system and figured out how to get the wine install to work (not too hard, will probably only get easier) because my Loki installer seemed to have "problems". Might as well just go with the real live bioware install steps. I prefer them because there is no installer (although if you want to use the original CDs as a source, you will need to use wine to run the InstallShield installer.) This is also definitely the choice for dual-booters (who should install in Windows) but I'm taking this option as well just to avoid having to go somewhere and perform the download, or run the installer in vmware server. These instructions currently do not cover movies or expansion packs, because I have neither working yet. (Shadows of Undrentide and Movies add-ons coming soon, I hope.)

As usual, do yourself a favor and read all the instructions before proceeding in case I forgot to tell you something important in the proper order.

Overview

Here's a broad overview of the process so that if you know everything you can just start, and if you don't you can have some idea of where we're going before we get there.

  1. Install the Neverwinter Nights data files
  2. Install the Linux Client and Patch
  3. Install nwuser to work around the game's single-user nature

 

Requirements

  • Your very own Neverwinter Nights CD Key. Get this by buying the game for Windows.
  • The original Neverwinter Nights CDs or the 1.12 GB client file download
  • A fully-updated Ubuntu Gutsy Gnu (7.10) system (or, hopefully, a later one) with wine and accelerated opengl with at least 16MB texture memory (nvidia, fglrx, intel, whichever)
  • The NWN linux client files, which can be downloaded from bioware (requires free registration.) At the time of writing you want nwclient129.tar.gz and the latest patch from the patch download page.
  • nwuser, David Holland's multi-user support script/library.

Instructions

Here is how to do the install, with specifics.

  1. Open a terminal and keep it open throughout the following, you'll need it.
  2. Set up a place to install nwn. Throughout this guide I will use the example of /opt/nwn because that's where I install unmanaged binaries. You could put it anywhere, but please don't put it in $HOME/.nwn if you plan to use this guide. That works, but it doesn't provide for multiple users to run the game.
    sudo mkdir /opt/nwn
  3. Install the Client Files

    Either:

    • Download the Client Files

      Visit the bioware linux client downloads page and follow the instructions ("Installing Using Downloaded Linux Client Resources") to download the Linux Client Resources (no kidding.) Then:

      sudo tar -C /opt/nwn xzvf nwresources129.tar.gz This is not what I did; I will thus offer no guarantees for this method, although it ought to be considerable easier.
    OR
    • Install from the original CDs

      You can use wine to run the InstallShield installer, which will unpack the files for you. It's possible to do this manually (with unshield) but this is easier, if not faster.

      1. Install wine if you haven't already. sudo aptitude install wine If you had to install wine you will have to use it to set up the .wine directory: $ wine cmd.exe CMD Version 0.9.47 Z:\home\myusername>exit
      2. Mount the NWN Installation Disc 1 on /mnt/cdrom:
        sudo mkdir /mnt/cdrom sudo mount -o ro /dev/sr0 /mnt/cdrom This will not work if the cdrom is already mounted. You can either disable automount before inserting it or you can manually unmount the automounted cdrom and then mount it in the proper location each time. Your choice :) In Ubuntu, open System -> Preferences -> Removable Drives and Media; the first tab "Storage" has the option you want. Uncheck "Mount removable media when inserted" and close the window. You can come back when this is all done and re-enable it.
      3. look in $HOME/.wine/dosdevices and make sure that you have the mount point of your cdrom linked to a drive letter; if not, it is easily done.
        $ cd $HOME/.wine/dosdevices
        $ ls -l
        lrwxrwxrwx 1 drink drink 10 2007-10-04 11:44 c: -> ../drive_c
        lrwxrwxrwx 1 drink drink 10 2007-10-04 11:44 COM1 -> /dev/ttyS0
        lrwxrwxrwx 1 drink drink 10 2007-10-04 11:44 COM2 -> /dev/ttyS1
        lrwxrwxrwx 1 drink drink 10 2008-02-20 14:47 d: -> /mnt/cdrom
        lrwxrwxrwx 1 drink drink  1 2007-10-04 11:44 z: -> /
      4. I have one set up already of course, as you can see above. If you don't, though, you can do the following: ln -sf /mnt/cdrom d: The -f flag causes overwriting of other symbolic links, so if you need d: to be something else and it already is, use another letter! I will use d: throughout as my example. If you don't care about whatever d: is now, then just use the above ln command and it will change it. It's probably not a good idea to do that while any wine programs are running.
      5. Link /opt/nwn to someplace in which you can install nwn. The easiest way is to just use the default install path, like so:
        mkdir -p $HOME/.wine/drive_c/NeverwinterNights ln -s /opt/nwn $HOME/.wine/drive_c/NeverwinterNights/NWN Now all you have to do to specify the install location is click 'next' when it comes up, which happens in the near future.
      6. In the terminal, run wine 'd:\setup.exe' (assuming your cdrom is linked to $HOME/.wine/dosdevices/d:) and follow the directions to install the game. Enter your CD-KEY when prompted (if you don't have one, you can't install this way. You can't play without one, regardless. It is suggested that you install all the texture packs.
      7. When the installer asks you to swap CDs, just run sudo eject and then mount the next cd the same way you mounted the first one. If you're using automount in spite of my instructions to the contrary, you may have to make a new link into $HOME/.wine/dosdevices - don't be afraid to make a new drive letter for each CD! You can always delete the links later.
        If you have problems with the installer recognizing that you've specified a valid path from which to load the files for disc 2 and/or 3 (I did) just browse to the drive and select it with the mouse. This worked for me when typing the path didn't (even though it put what appeared to be exactly the same thing into the input field.)
  4. Unpack the Linux Client files:
    cd /opt/nwn
    sudo tar xvfz /path/to/nwclient129.tar.gz
    sudo tar xvfz /path/to/English_linuxclient168_orig.tar.gz
    sudo ./fixinstall

    The current patch version is 1.68. The fixinstall script makes sure that filenames have the proper case. But there is still more fixing to do.
  5. Install nwuser, so that user files are stored in $HOME/.nwn instead of having them all stored in the nwn directory, which does not reasonably permit multiuser support. No one expects multiple users on the same system to be able to play nwn at the same time (although it's a feasible idea what with multiple-display-card, multiple-head X systems) but this lets each user have their own settings without being able to mangle the install.
    cd /opt/nwn
    sudo tar xvfz /path/to/nwuser-latest.tar.gz
    sudo ./nwuser-install.pl
  6. Change the launching script nwn to use the system-installed SDL libraries rather than the ones which shipped with nwn, and to load nwuser, and to support launching from any directory... In fact, just replace it with my file:
    #!/bin/bash
    pushd /opt/nwn
    export SDL_MOUSE_RELATIVE=0
    export SDL_VIDEO_X11_DGAMOUSE=0
    export LD_LIBRARY_PATH=/opt/nwn/miles:$LD_LIBRARY_PATH
    export LD_PRELOAD=/opt/nwn/nwuser.so
    /opt/nwn/nwmain $@
    popd
  7. If you are using GNOME2 with system sound mixing (the esd daemon, or the pulseaudio replacementFor information on how to make all audio on your Ubuntu system play nice, see my guide Untangling Audio on Ubuntu., you can make sure that sound works properly by specifying the esd sound driver to SDL. You can prefix the 'nwn' command with this, or you can add it to the nwn script:
    SDL_AUDIODRIVER="esd" Ideally the above line should be added to the /etc/environment file. If you put it in the nwn launcher script, prefix it with the word 'export' (like the other variable definitions.)
  8. Fix file permissions. The Linux game engine basically expects you to own all the game files. That problem is solved with nwuser, but we'll need to set some permissions that make the whole thing work kind of sensibly in an Ubuntu context. That means that we're going to make the user and group "games" own all the files, and users not in the games group will have no access to the files at all. They won't have write access anyway; nwuser takes care of that, railroading the Linux client into keeping files it needs to write in your home directory.
  9. sudo chown -R games:games /opt/nwn
    sudo find /opt/nwn -type d -exec chmod 750 '{}' \;
    sudo find /opt/nwn -type f -exec chmod 640 '{}' \;
    sudo chmod ug+x /opt/nwn/{nwn,nwmain,nwserver,*.exe,*.dll,*.so,*/*.so}

    In a nutshell, we make sure the owner (games) can read/write everything, that the group (games) can read everything, and that other users can do nothing.

Conclusion

There are other ways to install; this is the easiest. This procedure will produce an install with all features working except videos. In theory, this procedure should work (with slight variations) for either the original Neverwinter Nights or the Gold edition.

video game
Ubuntu
howto
  • Log in or register to post comments

Footer menu

  • Contact
Powered by Drupal

Copyright © 2026 Martin Espinoza - All rights reserved