Fs2 open on Linux/Dedicated X Display

From FreeSpace Wiki
Jump to: navigation, search
« I18n and Key mapping problems The fs2_open on Linux Guide
Dedicated X Display
Joystick Errors »

A good way of running games on Linux is having them run on a separate X display. The display you are most likely using now when reading this is 0:0. This display is normally used for whatever Window Manager/Desktop Environment(KDE,Gnome,*box,E) you've chosen. Sometimes fs2_open freezes and locks your X. This is of course very annoying as you have to CTRL+ALT+BACKSPACE to kill the X server, and in that, killing whatever program you had running besides fs2_open. The solution to this is to tell X to start fs2_open on another display. To to this we first need to tell X that you,the user on localhost, holds the permission to run on another display. In a terminal, enter (NOT as root):

$ xauth list

A list that looks something like this should appear.

[email protected] ~ $ xauth list
localhost/unix:0  MIT-MAGIC-COOKIE-1  14ec70e7c8cc835def61a04c92bbd50d

Let's look at that line, first up is your localhost, then unix, and last the display number,:0 (in bold). The rest is not really of interest. Copy the whole line, but change the display value to 1 and paste it after the command xauth add, like this:

$ xauth add localhost/unix:1  MIT-MAGIC-COOKIE-1  14ec70e7c8cc835def61a04c92bbd50d

Run xauth list again. You should see a new entry.

[email protected] ~ $ xauth list
localhost/unix:0  MIT-MAGIC-COOKIE-1  14ec70e7c8cc835def61a04c92bbd50d
localhost/unix:1  MIT-MAGIC-COOKIE-1  14ec70e7c8cc835def61a04c92bbd50d

You now have permission to use display 1:0. To start fs2_open in that display, use xinit.

$ xinit /path/to/fs2_open_r -foo -bar -- :1

The -- :1 tells X that we want to start fs2_open on display 1.
You can switch between display 0 and 1 with CTRL+ALT+F7 and CTRL+ALT+F8 respectively.
If you try this from an virtual terminal from within X11 and obtain the error:

X: user not authorized to run the X server, aborting.

It has been reported that on Ubuntu systems, the file /etc/X11/Xwrapper.config contains this line:


This setting specifies that the X server(s) can only be started from console(TTY).

Warning: This solution will undermine X security.

A possible solution is to change the allowed_users in the Xwrapper.config file to:


See man Xwrapper.config for more details.