Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Running a Xonotic server on FreeBSD 8.2

#1
EDIT: I have now resolved the issue. I will post a brief summary below.

If you install the Xonotic server from FreeBSD ports it places a binary called "xonotic-dedicated" in /usr/local/bin/. You have to point any startup script you use at this binary.

I wrote a short script to make running the server easier which can be found here

/EDIT

I am trying to run a Xonotic server on FreeBSD 8.2. I have installed the Xonotic port. I have correctly configured server.cfg and moved it to the data folder. There server no .sh script for FreeBSD so I tried the Linux one. It gave me this error.

This script is not properly set up yet.
Please refer to the instructions in readme.txt.
In short:
- copy server.cfg to the data directory and adjust its settings
- move this file to the main directory of your Xonotic installation

I also installed the linux compatibility layer in case it was a requirement. This did not change the result.

Thanks.

Pricetx.
Reply

#2
First of all, thank you for reading the readme!

server_linux.sh is fairly simple, in your case it only checks if there's an executable file called xonotic-linux32-dedicated (or linux64 if uname -m returns x86_64) in the script's directory.
I don't know about BSD so I can't tell for sure where the point of failure might be. Perhaps dirname? I have no idea. Try perhaps to add pwd after the cd dirname line and see where the script brings you.

Here's something you can do if you think everything is set up alright: run the server directly using ./xonotic-linux32-dedicated +serverconfig server.cfg
The working directory matters; that's mostly why you normally have to use the .sh to start the server.
Reply

#3
(03-25-2012, 11:41 PM)Mr. Bougo Wrote: First of all, thank you for reading the readme!

server_linux.sh is fairly simple, in your case it only checks if there's an executable file called xonotic-linux32-dedicated (or linux64 if uname -m returns x86_64) in the script's directory.
I don't know about BSD so I can't tell for sure where the point of failure might be. Perhaps dirname? I have no idea. Try perhaps to add pwd after the cd dirname line and see where the script brings you.

Here's something you can do if you think everything is set up alright: run the server directly using ./xonotic-linux32-dedicated +serverconfig server.cfg
The working directory matters; that's mostly why you normally have to use the .sh to start the server.

Hi, and thanks for the support!

EDIT: It turns out that I need to use the "xonotic-dedicated" binary in /usr/bin/

I placed a pwd command along with the usual echo error messages. The directory it outputs is "/usr/local/share/xonotic" which is the "root" xonotic folder.

I ran the server and got the following text:

http://pastie.org/pastes/3670774/text?ke...ispa6pdeww

I'm not sure what the FS_OpenVirtualFile errors are but it appears to work okay.

I tried installing the full version of Xonotic from ports but that did not remove these errors.

Thanks.

Pricetx.
Reply

#4
Here is what the xonotic server launcher and xonotic itself expect as far as filesystem goes:

- A xonotic-linux32-dedicated binary in the same directory or in the parent directory
- A server.cfg file in the data directory*
- Data files in the data directory* (maps, models, etc.)

The data directory can be two different locations, which each serve a different purpose in some cases: it can be a directory called "data" which is a subdirectory of the working directory, or it can be a directory called "data" found in $HOME/.xonotic/. In a multi-user system, this allows users to each have their own settings in their home directory while the core data files sit in a root-owned directory somewhere in the system hierarchy. In any system, it is always nice to separate default files from personal files, usually you should not touch the "main" data directory, so as to not lose any data with an update for example.

The working directory is set by the launcher to be either its own directory or its parent, depending on where the server binary is found. Your server failed to launch because the launcher set a working directory which did not contain data files. You will have to sort that out, or explicitly tell the engine where it should find its data files. That can be done at runtime or at compile time.

At compile time, you can use the DP_FS_BASEDIR make variable to make the engine look for the data files in a data subdirectory. For example, the Arch Linux packager did it like that:
Code:
    make -C Xonotic/source/darkplaces CPUOPTIMIZATIONS="${CFLAGS}" DP_FS_BASEDIR=/usr/share/xonotic/ DP_LINK_TO_LIBJPEG=1 cl-release
    make -C Xonotic/source/darkplaces CPUOPTIMIZATIONS="${CFLAGS}" DP_FS_BASEDIR=/usr/share/xonotic/ DP_LINK_TO_LIBJPEG=1 sdl-release
    make -C Xonotic/source/darkplaces CPUOPTIMIZATIONS="${CFLAGS}" DP_FS_BASEDIR=/usr/share/xonotic/ DP_LINK_TO_LIBJPEG=1 sv-release
The data files are located in /usr/share/xonotic/data/

At run time, you just need to use the -basedir flag, which takes as argument exactly what you would set DP_FS_BASEDIR as. You can add that to your server_linux.sh file in the exec line.


I'm guessing your server_linux.sh was in /usr/local/share/xonotic/. Where are the binaries? How did you install Xonotic?
Reply

#5
(03-26-2012, 01:10 PM)Mr. Bougo Wrote: Here is what the xonotic server launcher and xonotic itself expect as far as filesystem goes:

- A xonotic-linux32-dedicated binary in the same directory or in the parent directory
- A server.cfg file in the data directory*
- Data files in the data directory* (maps, models, etc.)

The data directory can be two different locations, which each serve a different purpose in some cases: it can be a directory called "data" which is a subdirectory of the working directory, or it can be a directory called "data" found in $HOME/.xonotic/. In a multi-user system, this allows users to each have their own settings in their home directory while the core data files sit in a root-owned directory somewhere in the system hierarchy. In any system, it is always nice to separate default files from personal files, usually you should not touch the "main" data directory, so as to not lose any data with an update for example.

The working directory is set by the launcher to be either its own directory or its parent, depending on where the server binary is found. Your server failed to launch because the launcher set a working directory which did not contain data files. You will have to sort that out, or explicitly tell the engine where it should find its data files. That can be done at runtime or at compile time.

At compile time, you can use the DP_FS_BASEDIR make variable to make the engine look for the data files in a data subdirectory. For example, the Arch Linux packager did it like that:
Code:
    make -C Xonotic/source/darkplaces CPUOPTIMIZATIONS="${CFLAGS}" DP_FS_BASEDIR=/usr/share/xonotic/ DP_LINK_TO_LIBJPEG=1 cl-release
    make -C Xonotic/source/darkplaces CPUOPTIMIZATIONS="${CFLAGS}" DP_FS_BASEDIR=/usr/share/xonotic/ DP_LINK_TO_LIBJPEG=1 sdl-release
    make -C Xonotic/source/darkplaces CPUOPTIMIZATIONS="${CFLAGS}" DP_FS_BASEDIR=/usr/share/xonotic/ DP_LINK_TO_LIBJPEG=1 sv-release
The data files are located in /usr/share/xonotic/data/

At run time, you just need to use the -basedir flag, which takes as argument exactly what you would set DP_FS_BASEDIR as. You can add that to your server_linux.sh file in the exec line.


I'm guessing your server_linux.sh was in /usr/local/share/xonotic/. Where are the binaries? How did you install Xonotic?

Hi. Fortunately I did manage to resolve the issue in the end, it's explained in my original post.

Thanks.

Pricetx.
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  I can't see my listen server on server list fnmain 1 673 10-07-2023, 07:28 AM
Last Post: Grimnack
  Server not visible on the server browser for others or me DankoLord 1 1,821 02-21-2023, 08:02 PM
Last Post: ballerburg9005
  Xonotic server running behind UDP proxy not working doombringeroperator 3 4,058 11-21-2022, 11:00 AM
Last Post: Zaphod
  BaI server | South American Xonotic server (located in Chile) z411 0 2,755 01-02-2022, 11:36 PM
Last Post: z411
  Full server tutorial start-2-finish with maps & config from live server xonotic.us.to ballerburg9005 0 8,051 09-03-2021, 10:21 AM
Last Post: ballerburg9005
  Noob needs help running server. CORDUROY 3 6,843 07-01-2021, 02:31 PM
Last Post: CORDUROY
Question [NEED HELP] Server uses 40% CPU whereas Nexuiz server runs with max 10% e-pig 6 4,966 08-19-2020, 10:17 PM
Last Post: ballerburg9005
  [NEED HELP] Server dont appear in server browser abslimit 0 2,578 03-15-2020, 04:13 AM
Last Post: abslimit
  How to change server cfg on modified server veecho 4 4,319 04-24-2019, 08:15 PM
Last Post: BuddyFriendGuy
  Running a config script when the server becomes empty? Notavi 3 2,683 08-18-2018, 12:10 AM
Last Post: BuddyFriendGuy

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-