1 (edited by kokhba 2013-12-05 06:54:06)

Topic: placement and running of server_config file (Ubuntu)

I want a LAN server, but I can't run the server config file.
I tried different file permissions.  Currently, it is executable only (chmod ugoa+x-rw).  Upon clicking, it tells me:

Could not display "/home/mainuser/Desktop/teeworlds_srv -f srv.cfg".
file is of an unknown type

./teeworlds_srv -f srv.cfg, the command in this guide, means nothing to the terminal.  To ./teeworlds_srv it says "no such file or directory".

http://img34.imageshack.us/img34/2176/wypa.png
File placement might be relevant. It currently sits on ~/Desktop.
This guide says it belongs in the TeeWorlds main folder.  I found no such folder.
I installed TeeWorlds via Software Center.  I can access cd ~/.teeworlds. Also there's an executable file under ~/usr/games/.
I tried copying it to ~/.teeworlds and running it from there, but I got similar results.

This is the contents of the file when opened with gedit.

sv_name Test
sv_gametype DM
sv_warmup 1
sv_map pit
sv_maprotation pit
sv_max_clients 2
sv_scorelimit 25
rcon_password Remote Console Password Here
sv_port 8303
sv_register 1
masterserver master.teewars.com

help appreciated

2 (edited by ghost 2013-12-05 11:58:02)

Re: placement and running of server_config file (Ubuntu)

You also need to install teeworlds-server via your software center, they are 2 separated packages. Once this is done, you can start a server like this:

teeworlds-server -f /path/to/your/configfile.cfg

3

Re: placement and running of server_config file (Ubuntu)

ghost wrote:

You also need to install teeworlds-server via your software center, they are 2 separated packages. Once this is done, you can start a server like this:

teeworlds-server -f /path/to/your/configfile.cfg

I think it's

teeworlds_srv -f /path/to/your/configfile.cfg

4 (edited by kokhba 2013-12-05 18:59:26)

Re: placement and running of server_config file (Ubuntu)

via Software Center Server for Teeworlds; an online multi-player platform 2D shooter, which had the description "teeworlds-server".
The terminal is recognizing the command teeworlds-server.  Readers, note that it has a dash instead of an underscore.

I'm trying to get it running.  This was my last attempt.

mainuser@Venn:~$ cd ~/Desktop
mainuser@Venn:~/Desktop$ teeworlds-server -f "teeworlds_srv -f srv.cfg"
[52a0aeab][engine]: running on unix-linux-ia32
[52a0aeab][engine]: arch is little endian
[52a0aeab][storage]: couldn't open storage.cfg
[52a0aeab][storage]: using standard paths
[52a0aeab][storage]: added path '$USERDIR' ('/home/mainuser/.teeworlds')
[52a0aeab][storage]: added path '$DATADIR' ('/usr/share/games/teeworlds/data')
[52a0aeab][storage]: added path '$CURRENTDIR' ('/home/mainuser/Desktop')
[52a0aeab][console]: failed to open 'autoexec.cfg'
[52a0aeab][console]: executing 'teeworlds_srv -f srv.cfg'
[52a0aeab][Console]: No such command: rcon_password.
[52a0aeab][Console]: No such command: masterserver.
[52a0aeab][server]: starting...
[52a0aeab][datafile]: loading. filename='maps/pit.map'
[52a0aeab][datafile]: allocsize=1016
[52a0aeab][datafile]: readsize=900
[52a0aeab][datafile]: swaplen=920
[52a0aeab][datafile]: item_size=716
[52a0aeab][datafile]: loading done. datafile='maps/pit.map'
[52a0aeab][server]: maps/pit.map crc is ecd0f851
[52a0aeab][server]: server name is 'Test'
[52a0aeab][datafile]: loading data index=7 size=3228 uncompressed=129500
[52a0aeab][server]: version 0.6 626fce9a778df4d4
[52a0aeab][engine/mastersrv]: refreshing master server addresses
[52a0aeab][register]: refreshing ip addresses
[52a0aeab][engine/mastersrv]: saving addresses
[52a0aeab][register]: fetching server counts
[52a0aeab][register]: chose 'master2.teeworlds.com' as master, sending heartbeats
[52a0aeac][game]: start round type='DM' teamplay='0'
[52a0aead][register]: no firewall/nat problems detected
[52a0aead][register]: no firewall/nat problems detected
[52a0aead][register]: server registered

It stalls after giving that last output line, but it hasn't completed the operation.

In the servers selection screen, I have turned off all the requirements for standard map, standard game type, etc.  I will look for it one more time, but I saw no server with my map "pit".

5

Re: placement and running of server_config file (Ubuntu)

the server is registered and everything should be fine. It is sometimes the case, that people are not able to see the server hosted on their pc in the internet tab. Try looking for it in the lan tab. Other peoplel should see your server in the internet tab just fine.

@heinrich5991: In the debian/ubuntu package, the teeworlds server binary is called "teeworlds-server", I looked it up wink

6 (edited by kokhba 2013-12-05 19:31:48)

Re: placement and running of server_config file (Ubuntu)

Yeah, I was entering the command as teeworlds_server, then I noticed my error and edited the post.

It was in the LAN tab.  Thank you very much!   I don't know how long I would have spent looking for it under the internet tab before realizing.

7

Re: placement and running of server_config file (Ubuntu)

Didn't you want a LAN server? If so, you should write sv_register 0 in your configuration.

Need a tool to manage your servers? teeman
<3

8

Re: placement and running of server_config file (Ubuntu)

I didn't know that.  thanks

I also learned that I have to put read permissions (chmod +r) on the config file or else the server won't use the custom settings.

9

Re: placement and running of server_config file (Ubuntu)

Well it needs the read permission at least to the user starting the binary (i.e teeworlds_srv), else how could it load the settings? wink

Need a tool to manage your servers? teeman
<3

10

Re: placement and running of server_config file (Ubuntu)

Maybe it's a problem that it always starts two identical LAN servers instead of just one.

sv_name Kokhba MapTest Kokhba MapTest
sv_gametype DM
sv_warmup 0
sv_map pitofspikes
sv_maprotation pitofspikes
sv_max_clients 1
sv_scorelimit 25
rcon_password Remote Console Password Here
sv_port 8303
sv_register 0
masterserver master.teewars.com

11

Re: placement and running of server_config file (Ubuntu)

I don't know how 2 identical servers should be starting. There seems nothing wrong in your config, but you do not nee to specify the masterserver. Just remove that line. If you use sv_register 0, the server will not be registered with the master server anyways (this means others cant see it in the server browser!)

12 (edited by floyd 2013-12-06 19:26:46)

Re: placement and running of server_config file (Ubuntu)

Can you check if you really have two servers running?

You can check the number of servers running with this command:

bli@bla:~# ps aux | grep "teeworlds_srv" | grep -v "grep"
test     26787  0.7  1.7  35272  2352 ?        Sl   Dec01  50:32 ./teeworlds_srv -f  ctf5.conf

If you have only one row, you have only one server running.

Need a tool to manage your servers? teeman
<3

13

Re: placement and running of server_config file (Ubuntu)

thank for all the help

@ floyd, it only gave me one line
I don't know why it shows up twice under the LAN tab.

14

Re: placement and running of server_config file (Ubuntu)

That's odd. In the LAN tab, can you click on each server and check what's the ip and port for both, do they have the exact same name too?

Need a tool to manage your servers? teeman
<3

15

Re: placement and running of server_config file (Ubuntu)

It shows in the LAN tab twice because teeworlds finds the server once by IPv6 and once by IPv4.

16

Re: placement and running of server_config file (Ubuntu)

thanks for the answer heinrich5991, I never noticed it before. smile

Need a tool to manage your servers? teeman
<3

17 (edited by kokhba 2013-12-11 01:25:56)

Re: placement and running of server_config file (Ubuntu)

EDIT, I got the server up! Thanks you guys!