Posted October 28, 2018
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.
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 Gydion