It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
I've been trying to figure out how to launch the dedicated server headless (batchmode) in Linux for a week or so now, and would like to ask if anyone knows how to do so. It's the only reason I'm still dual booting Windows on my laptop! I apologize for the long post, but I'm hoping someone can make something out of my efforts.

I am much more experienced with Windows than Linux, so perhaps I'm overlooking something obvious due to my lack of Linux expertise.

Distro: Kubuntu 18.04 LTS

Here's what I've done so far.

Per the the developer I should be able to run a command line server by running the multiplayer executable directly from the command line as detailed here on their website article "How to set up a multiplayer game of SYABH"

This works fine in Windows by launching the command line and navigating to the install folder: Sir You Are Being Hunted\win64\multiplayer\sir.exe

One can then run the .exe with the expected arguments in place to launch the server in headless mode, or create a desktop shortcut with the arguments added to the Target so one can avoid going into the command line each time.

"sir.exe -batchmode -server -port 1234"

or in the shortcut Target field:

"Sir You are Being Hunted\win64\multiplayer\sir.exe" -batchmode -server

This all works great, but the GOG Linux release appears to work differently (from what I've found) due to the /start.sh executable GOG uses.

First, the multiplayer sir.exe doesn't launch on its own. One must use start.sh

The multiplayer desktop shortcut installed with the GOG installer reveals running the multiplayer sir.exe itself requires an argument be used for start.sh

Command the shortcut uses to launch multiplayer:
"/home/userprofile/installfolder/Sir You Are Being Hunted/start.sh" "--multiplayer"

Removing the "--multiplayer" argument launches singler player.

After discovering this, I tried simply adding the --batchmode arguments after multiplayer in this shortcut. Tried a few different formatting variants after the "--multiplayer" argument such as "--batchmode" -"batchmode" with and without quotes, etc.

No luck with the shortcut. Didn't have luck with sir.exe in the terminal either, so I turned to the ./start.sh file.

In the terminal, I ran "./start.sh --help" from the installation directory.
Results:
Sir, You Are Being Hunted [ 2.3.0.6 ] (GOG.com)

usage: [command] [argument]

Arguments:
-s, --start - start Sir, You Are Being Hunted
-m, --multiplayer - start Sir, You Are Being Hunted multiplayer
-v, --version - show version of this package
-p, --sysrep - generate a system report
-h, --help - display this help

I came to the conclusion that a headless server cannot be launched, and this is an overlooked shortcoming in the GOG Linux release. Hopefully a GOG rep or someone with more expertise in the world of Linux can verify this, or (hopefully) correct me and provide further insight. Thank you! My friends and I still have a great time with this game.
This question / problem has been solved by Gydionimage
avatar
bx: No luck with the shortcut. Didn't have luck with sir.exe in the terminal either, so I turned to the ./start.sh file.

In the terminal, I ran "./start.sh --help" from the installation directory.
For a GOG rep you need to use one of the assorted Support links and create a ticket.

I don't actually own this one. The start.sh file is just a shell script. Open it in an editor of your choice (less, vi?) and you should be able to see what the commands are to launch the game. The other thing start.sh does is setup the environment if the game bundles any libraries with it.
Post edited October 29, 2018 by Gydion
avatar
bx: No luck with the shortcut. Didn't have luck with sir.exe in the terminal either, so I turned to the ./start.sh file.

In the terminal, I ran "./start.sh --help" from the installation directory.
avatar
Gydion: For a GOG rep you need to use one of the assorted Support links and create a ticket.

I don't actually own this one. The start.sh file is just a shell script. Open it in an editor of your choice (less, vi?) and you should be able to see what the commands are to launch the game. The other thing start.sh does is setup the environment if the game bundles any libraries with it.
Thanks for the feedback Gydion! I opened the shell script in Nano and came to the same conclusion, so I will reach out to a GOG rep via a Support ticket and see if they can assist further.
I came back to this issue today with fresh eyes and another month of Linux familiarity. Figured out the problem in about 15 minutes! Details on the issue below:

In my OP I mentioned I was unable to run the multiplayer shortcut directly, so I assumed ./start.sh was the only launch method, perhaps due to GOG modifications. This is incorrect.

The error message being generated when I tried running the multiplayer executable was telling me the problem.

"./sir: error while loading shared libraries: libGLU.so.1: cannot open shared object file: No such file or directory"

This is, in fact, a dependency error and I now recognized it as such.

I found this odd as I remember copying the dependency list on the game store page and installing the proper packages before installing the game. Regardless, I verified the error with the command: "ldd ./sir"

Results confirmed a single package missing: "libGLU.so.1 => not found"
I installed it "sudo apt-get install libglu1-mesa:i386"

I could now run the multiplayer executable directly! I verified the command line arguments provided by the developers work just the same on the Linux version as they do in Windows. Started a headless server from the multiplayer executable with the following command:

"./sir -batchmode - server - port #### -servername TEST

Friends are able to join! Cheers.

Appears I can't mark my own reply as a solution, so Gydion gets it! Thanks for your assistance!
Post edited November 21, 2018 by bx