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
  Server does not start saddesad 2 219 11-25-2020, 04:39 AM
Last Post: saddesad
  [NEED HELP] Server failed to open socket on address... Hexactinal 2 226 11-21-2020, 04:28 PM
Last Post: Hexactinal
  Server Hosting Issue Saevus 3 849 11-11-2020, 02:53 PM
Last Post: :[:{b_e*r^f}:]:
  Docker Xonotic Dedicated Server ich777 15 3,157 10-08-2020, 11:15 AM
Last Post: BuddyFriendGuy
  BuddyFriendGuy Fun Server BuddyFriendGuy 22 8,546 10-08-2020, 11:14 AM
Last Post: BuddyFriendGuy
Rainbow Kotangєns' independent server Kotangens 2 579 10-07-2020, 05:08 AM
Last Post: L497
  RaspberryPi4 Server ablyveiled 2 939 08-19-2020, 10:36 PM
Last Post: ballerburg9005
Question [NEED HELP] Server uses 40% CPU whereas Nexuiz server runs with max 10% e-pig 6 2,428 08-19-2020, 10:17 PM
Last Post: ballerburg9005
  [SOLVED] I can't create my server. Kotangens 11 1,481 07-22-2020, 04:42 AM
Last Post: Kotangens
Information [SOLVED] Server stops when I close command prompt on my PC Jewel 2 681 06-01-2020, 07:11 AM
Last Post: Jewel

Forum Jump:


Users browsing this thread:
1 Guest(s)

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