The International Simutrans Forum

 

Author Topic: Trying to run a server on a headless server  (Read 176 times)

0 Members and 1 Guest are viewing this topic.

Offline MarisaG us

  • *
  • Posts: 2
    • GamePlayer Club
Trying to run a server on a headless server
« on: October 21, 2018, 12:46:05 PM »
Im trying to run a headless (no video) server. If I connect using X from my desktop I can run the server, but trying to run it headless it reports a error about not having a X server.
How do I run it headless?

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9282
  • Languages: De,EN,JP
Re: Trying to run a server on a headless server
« Reply #1 on: November 08, 2018, 12:34:08 PM »
Compile it with backend=posix

Offline MarisaG us

  • *
  • Posts: 2
    • GamePlayer Club
Re: Trying to run a server on a headless server
« Reply #2 on: November 09, 2018, 02:32:08 AM »
I put that in my config.default file, but now I see this error:
===
Use work dir /root/simutrans/build/default/
Reading low level config data ...
FATAL ERROR: simmain() - No GUI themes found! Please re-install!
Aborting program execution ...

For help with this error or to file a bug report please see the Simutrans forum at
http://forum.simutrans.com
===

Any ideas?

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9282
  • Languages: De,EN,JP
Re: Trying to run a server on a headless server
« Reply #3 on: November 09, 2018, 12:27:42 PM »
you need to install the normal simutrans somewhere. "/home/sim/server" Then unpack the source somewhere else "/home/sim/src" compile simutrans for posix.

Code: [Select]
cd /home/sim/server
../src/build/sim -use_workdir -server ... -load savexzy.sve&

Simutrans expect the pak files, translations etc. in the current directory. If nothing is given, it will assume the program directory. To use the current directory, use the commandline option "-use_workdir"

You do not need to specify a pak when starting the server from a file. Once started, you can even reload the last saved game after a crash by just specifying "-server" on the commandline.

If you run more than one server (using different ports) then you need to specify announcement name etc. un the commandline, otherwise you can also edit the simuconf.tab in the directory with the pak files.