TribesNext

Welcome, Guest. Please login or register.
Did you miss your activation email?


TribesNext >  TribesNext.com Forums >  Support >  Server Support >  Linux Server Setup « previous next »
Pages: [1] Print
Author Topic: Linux Server Setup
ccfreak2k
Nugget³

Posts: 80

View Profile
March 04, 2009, 06:45:42 PM »
THE TRIBESNEXT PATCHES DO NOT SUPPORT THE NATIVE LINUX CLIENT/SERVER. THE ONLY WAY TO GET TRIBESNEXT TO WORK IN LINUX IS TO USE WINE OR USE A VIRTUAL MACHINE. This guide will tell you how to make a DEDICATED SERVER on a headless server using Wine.

This is a guide for setting up Tribes 2 to work in Linux and TribesNext without using a virtual machine. I made it because, apparently, I was the only person as of this writing to have gotten it to work (or even bothered trying, who knows). To do this, you'll need a few things:

  • A Linux box of some kind. The kernel should probably be fairly recent (any 2.6 without any glaring bugs should be fine), but that's usually not a problem. Alternatively, you could use something else like FreeBSD or even Solaris, but you need to be able to use Wine (explained below).
  • A decent shell. A good portion use Bash, but the actual shell matters not. It should preferrably have decent scripting support.
  • Wine. Since TribesNext is Windows only, you'll be using this to run it. Using a recent version is preferred, but any version is basically a roll of the dice as to if it'll run and to what extent.
  • An X client. Most shell servers don't have one, so I highly recommend Xvfb.
  • OPTIONAL: GNU Screen or equivalent. Useful to background the server and bring it back later (so you can log off and go to sleep or whatever).
  • OPTIONAL: taskset. This is useful for boxes with more than one CPU, as it allows you to specify which CPU(s) the program's threads will run on.
  • Some time. Useful because, without time, there is only space.

I will assume your shell server doesn't have a full X environment to use. Otherwise, why the hell would you be reading this guide?

The first thing I did was installed Tribes 2 on my box. This involves, of course, installing the game, patching the game (if you installed from CD instead of GSA) and installing the TribesNext patch. You may also wish to verify that it works on your box, but this doesn't matter a whole lot since it won't be running on your box for long, maybe. However, don't install any addons, especially client-side, as it doesn't make much sense.

Once the Tribes 2 install is squared away, compress it and upload it. The actual compression method obviously doesn't matter so long as you can extract it from your server. Hell, you can elect not to compress it, I don't care. Just make sure that GameData makes it to your server, as all of the required bits are inside that directory (outside of that are just shortcuts).

You might want to run the server using a different account than your normal one in case Tribes 2 gets compromised. That way, the damage is limited to that account (and not your own). Either way, extract the game files somewhere in your account. Now you'll want to spend time configuring your server. If you don't have an X server that isn't Xvfb, you won't be able to use the GUI to do this. You won't even be able to see the console window. However, the magic of Xvfb is the fact that it doesn't have any video requirements, and the framebuffer it creates is virtualized. The upside is that things that require GUIs (Wine command prompts, for one) will run on a headless server, but the downside is that it's not easy getting screenshots of what's actually going on inside the framebuffer. For Tribes 2, you probably won't care once the server is running.

Use your favorite text editor to edit the config scripts (vim is the most popular, I use nano). If you have multiple IP addresses, I highly recommend binding Tribes 2 to one of them (use $Host::BindAddress in ServerPrefs.cs). Look elsewhere for detailed server configuring.

Now it's time to tie it all together and stick a bow on it. I made a small shell script to automate the server process (having made one before for Garry's Mod, also in Wine). First I use a series of loops to find and delete DSOs. It's not pretty, but it works:

Code:
find /home/t2s/.wine/drive_c/Tribes2/GameData/base -name *.dso | while read line
do
rm $line
done

ScratchMonkey recommends this instead (it does basically the same thing in one line; see his post for the technical details):
Code:
find /home/t2s/.wine/drive_c/Tribes2/GameData/base -name \*.dso -execdir /bin/rm {} \+

Then a line to start the server itself:

Code:
env WINEPREFIX=/home/t2s/.wine \
xvfb-run -a -w 5 \
taskset 0x00000001 \
wine Tribes2.exe -online -dedicated -mission Katabatic CTF

The first "line" is for Wine (it works without it, but I put it in for good measure). The second launches a per-user Xvfb process. On a Debian box (or any other box, who knows), Xvfb runs like any other X client, so it would have to be started ahead of time (on Debian, this was done with sudo /etc/init.d/Xvfb start), but Ubuntu here uses seperate processes. The third line tells taskset (and, by extension, the kernel) to run the process on only the first CPU (it uses a bitmask, so 0x00000003 would let it run on the first two CPUs).

Stick the code in a shell script, mark it as executable and, optionally, run it in a screen session. That way, you can run it, detach and log out, and the server will keep running. You could also launch the script using & (./server.sh &) to automatically background it if you want too. Doesn't matter a whole lot.

Once you actually run the executable, the only way you'll know that it's working is if you can connect to it from your client. Even if it doesn't show up in the server listing, it might be taking connections anyway. If this is the case, and you're using the modified T2csri.vl2 that's made for Wine users, then REMOVE that one and restore the original. If it STILL doesn't work, I either missed something (doubtful) or there is something wrong with your config/box.

Addendum: Thyth had something to say about getting Ruby to work or something in his post further down.
« Last Edit: March 21, 2010, 01:57:06 PM by ccfreak2k »

I keep my spinfusor on a gun rack in my truck.
-Leviathan-
Nugget
Posts: 4

View Profile
1: March 07, 2009, 10:19:04 AM »
Addendum:
Works fine with wine 1.0.1 but when using current (1.1.6 as of now) it throws an error when trying to join the server.

Out of curiousity, was the TN support for wine improved? Last time i've checked it just didn't work.
MrSleep
Nugget
Posts: 8

View Profile
2: April 06, 2009, 08:37:23 PM »
Wasn't there a distribution of Tribes 2 server just for Linux - (i.e., without needing Wine to run)?
Turkeh
nil

Posts: 458

View Profile
3: April 07, 2009, 06:27:00 AM »
Wasn't there a distribution of Tribes 2 server just for Linux - (i.e., without needing Wine to run)?
Yes, but at current there is no TribesNext solution for the native Linux version of Tribes 2.

Read the FAQs!

Search before posting support requests.
morecool
Nugget
Posts: 3

View Profile
4: April 21, 2009, 10:34:59 AM »
Native Linux Tribes2 Client Installed version

LINK : http://koov.net/file/tribes2_resource/t2-linux.zip

maybe it can be run dedicated server... but need some mod or patches..

« Last Edit: April 21, 2009, 05:12:07 PM by morecool »
morecool
Nugget
Posts: 3

View Profile
5: April 21, 2009, 10:47:24 AM »
I was try to run on Debian linux...

below...
-------------------
devel:~/t2-linux# ./tribes2d -dedicated
Dedicated server by:
   Loki Software, Inc.
   http://www.lokigames.com
Binding server port to default IP
UDP initialized on port 28000
exporting server prefs...
Loading compiled script scripts/commanderMapIcons.cs.
Loading compiled script scripts/markers.cs.
Loading compiled script scripts/serverAudio.cs.
Loading compiled script scripts/damageTypes.cs.
Loading compiled script scripts/deathMessages.cs.
Loading compiled script scripts/inventory.cs.
Loading compiled script scripts/camera.cs.
Loading compiled script scripts/particleEmitter.cs.
Loading compiled script scripts/particleDummies.cs.
Loading compiled script scripts/projectiles.cs.
Loading compiled script scripts/player.cs.
Loading compiled script scripts/light_male.cs.
Loading compiled script scripts/medium_male.cs.
Loading compiled script scripts/heavy_male.cs.
Loading compiled script scripts/light_female.cs.
Loading compiled script scripts/medium_female.cs.
Loading compiled script scripts/bioderm_light.cs.
Loading compiled script scripts/bioderm_medium.cs.
Loading compiled script scripts/bioderm_heavy.cs.
Validation required for shape: light_male.dts
Validation required for shape: medium_male.dts
Validation required for shape: heavy_male.dts
Validation required for shape: light_female.dts
Validation required for shape: medium_female.dts
Validation required for shape: heavy_male.dts
Validation required for shape: bioderm_light.dts
Validation required for shape: bioderm_medium.dts
Validation required for shape: bioderm_heavy.dts
Loading compiled script scripts/gameBase.cs.
Loading compiled script scripts/staticShape.cs.
Warning: shape int_flagstand.dts collision detail 0 (Collision-5) bounds exceed that of shape.
Loading compiled script scripts/weapons.cs.
Loading compiled script scripts/weapons/blaster.cs.
Loading compiled script scripts/weapons/plasma.cs.
Loading compiled script scripts/weapons/chaingun.cs.
Validation required for shape: ammo_chaingun.dts
Validation required for shape: weapon_chaingun.dts
Loading compiled script scripts/weapons/disc.cs.


Loading compiled script scripts/weapons/grenadeLauncher.cs.
Validation required for shape: ammo_grenade.dts
Validation required for shape: weapon_grenade_launcher.dts
Loading compiled script scripts/weapons/sniperRifle.cs.
Validation required for shape: weapon_sniper.dts
Loading compiled script scripts/weapons/ELFGun.cs.
Validation required for shape: weapon_elf.dts
Loading compiled script scripts/weapons/mortar.cs.
Validation required for shape: ammo_mortar.dts
Validation required for shape: weapon_mortar.dts
Loading compiled script scripts/weapons/missileLauncher.cs.
Validation required for shape: ammo_missile.dts
Validation required for shape: weapon_missile.dts
Loading compiled script scripts/weapons/targetingLaser.cs.
Validation required for shape: weapon_targeting.dts
Loading compiled script scripts/weapons/shockLance.cs.
Validation required for shape: weapon_shocklance.dts
Loading compiled script scripts/weapons/mine.cs.
Validation required for shape: mine.dts
Validation required for shape: ammo_mine.dts
Loading compiled script scripts/weapons/grenade.cs.
Validation required for shape: grenade.dts
Validation required for shape: grenade.dts
Loading compiled script scripts/weapons/flashGrenade.cs.
Validation required for shape: grenade.dts
Validation required for shape: grenade.dts
Loading compiled script scripts/weapons/flareGrenade.cs.
Validation required for shape: grenade.dts
Validation required for shape: grenade.dts
Loading compiled script scripts/weapons/concussionGrenade.cs.
Validation required for shape: grenade.dts
Loading compiled script scripts/weapons/cameraGrenade.cs.
Validation required for shape: camera.dts
Loading compiled script scripts/turret.cs.
Loading compiled script scripts/turrets/mortarBarrelLarge.cs.
Loading compiled script scripts/turrets/aaBarrelLarge.cs.
Loading compiled script scripts/turrets/missileBarrelLarge.cs.
Loading compiled script scripts/turrets/plasmaBarrelLarge.cs.
Loading compiled script scripts/turrets/ELFBarrelLarge.cs.
Loading compiled script scripts/turrets/outdoorDeployableBarrel.cs.
Loading compiled script scripts/turrets/indoorDeployableBarrel.cs.
Loading compiled script scripts/turrets/sentryTurret.cs.
Loading compiled script scripts/weapTurretCode.cs.
Loading compiled script scripts/pack.cs.
Loading compiled script scripts/packs/ammopack.cs.
Validation required for shape: pack_upgrade_ammo.dts
Loading compiled script scripts/packs/cloakingpack.cs.
Validation required for shape: pack_upgrade_cloaking.dts
Loading compiled script scripts/packs/energypack.cs.
Validation required for shape: pack_upgrade_energy.dts
Loading compiled script scripts/packs/repairpack.cs.
Validation required for shape: pack_upgrade_repair.dts
Loading compiled script scripts/packs/shieldpack.cs.
Validation required for shape: pack_upgrade_shield.dts
Loading compiled script scripts/packs/satchelCharge.cs.
Validation required for shape: pack_upgrade_satchel.dts
Validation required for shape: pack_upgrade_satchel.dts
Loading compiled script scripts/packs/sensorjammerpack.cs.
Validation required for shape: pack_upgrade_sensorjammer.dts
Loading compiled script scripts/packs/aabarrelpack.cs.
Validation required for shape: pack_barrel_aa.dts
Loading compiled script scripts/packs/missilebarrelpack.cs.
Validation required for shape: pack_barrel_missile.dts
Loading compiled script scripts/packs/mortarbarrelpack.cs.
Validation required for shape: pack_barrel_mortar.dts
Loading compiled script scripts/packs/plasmabarrelpack.cs.
Validation required for shape: pack_barrel_fusion.dts
Loading compiled script scripts/packs/ELFbarrelpack.cs.
Validation required for shape: pack_barrel_elf.dts
Loading compiled script scripts/vehicles/vehicle_spec_fx.cs.
Loading compiled script scripts/vehicles/serverVehicleHud.cs.
Loading compiled script scripts/vehicles/vehicle_shrike.cs.
Validation required for shape: vehicle_air_scout.dts
Loading compiled script scripts/vehicles/vehicle_bomber.cs.
Validation required for shape: vehicle_air_bomber.dts
Validation required for shape: repair_kit.dts
Loading compiled script scripts/vehicles/vehicle_havoc.cs.
Validation required for shape: vehicle_air_hapc.dts
Loading compiled script scripts/vehicles/vehicle_wildcat.cs.
Validation required for shape: vehicle_grav_scout.dts
Loading compiled script scripts/vehicles/vehicle_tank.cs.
Validation required for shape: vehicle_grav_tank.dts
Validation required for shape: repair_kit.dts
Loading compiled script scripts/vehicles/vehicle_mpb.cs.
Validation required for shape: vehicle_land_mpbase.dts
Loading compiled script scripts/vehicles/vehicle.cs.
Loading compiled script scripts/ai.cs.
Loading compiled script scripts/aiDebug.cs.
scripts/aiDebug.cs (340): Unable to find object: 'Canvas' attempting to call function 'popDialog'
Loading compiled script scripts/aiDefaultTasks.cs.
Loading compiled script scripts/aiObjectives.cs.
Loading compiled script scripts/aiInventory.cs.
Loading compiled script scripts/aiChat.cs.
Loading compiled script scripts/aiHumanTasks.cs.
Loading compiled script scripts/aiObjectiveBuilder.cs.
Loading compiled script scripts/aiBotProfiles.cs.
Loading compiled script scripts/item.cs.
Validation required for shape: repair_kit.dts
Validation required for shape: repair_patch.dts
Validation required for shape: flag.dts
Validation required for shape: Huntersflag.dts
Validation required for shape: Huntersflag.dts
Validation required for shape: Huntersflag.dts
Validation required for shape: Huntersflag.dts
Validation required for shape: nexus_effect.dts
Validation required for shape: beacon.dts
Loading compiled script scripts/station.cs.
Loading compiled script scripts/simGroup.cs.
Loading compiled script scripts/trigger.cs.
Loading compiled script scripts/forceField.cs.
Loading compiled script scripts/lightning.cs.
Loading compiled script scripts/weather.cs.
Loading compiled script scripts/deployables.cs.
Validation required for shape: pack_deploy_inventory.dts
Validation required for shape: pack_deploy_sensor_motion.dts
Validation required for shape: pack_deploy_sensor_pulse.dts
Validation required for shape: pack_deploy_turreto.dts
Validation required for shape: pack_deploy_turreti.dts
Loading compiled script scripts/stationSetInv.cs.
Loading compiled script scripts/navGraph.cs.
Loading compiled script scripts/targetManager.cs.
Loading compiled script scripts/serverCommanderMap.cs.
Loading compiled script scripts/environmentals.cs.
Loading compiled script scripts/power.cs.
Loading compiled script scripts/serverTasks.cs.
Loading compiled script scripts/admin.cs.
Missing file: prefs/banlist.cs!
Loading compiled script scripts/aiBountyGame.cs.
Loading compiled script scripts/TeamHuntersGame.cs.
Loading compiled script scripts/aiTeamHunters.cs.
Loading compiled script scripts/aiHunters.cs.
Loading compiled script scripts/SinglePlayerGame.cs.
Loading compiled script scripts/spDialog.cs.
Loading compiled script scripts/SiegeGame.cs.
Loading compiled script scripts/aiSiege.cs.
Loading compiled script scripts/RabbitGame.cs.
Loading compiled script scripts/aiRabbit.cs.
Loading compiled script scripts/HuntersGame.cs.
Loading compiled script scripts/aiHunters.cs.
Loading compiled script scripts/DnDGame.cs.
Loading compiled script scripts/aiDnD.cs.
Loading compiled script scripts/DMGame.cs.
Loading compiled script scripts/aiDeathMatch.cs.
Loading compiled script scripts/CnHGame.cs.
Loading compiled script scripts/aiCnH.cs.
Loading compiled script scripts/CTFGame.cs.
Loading compiled script scripts/aiCTF.cs.
Loading compiled script scripts/BountyGame.cs.
Loading compiled script scripts/aiBountyGame.cs.
Loading compiled script scripts/defaultGame.cs.
Loading compiled script scripts/TR2Game.cs.
Loading compiled script scripts/TR2Packages.cs.
Loading compiled script scripts/TR2Particles.cs.
Loading compiled script scripts/TR2Physics.cs.
Loading compiled script scripts/TR2light_male.cs.
Loading compiled script scripts/TR2light_female.cs.
Loading compiled script scripts/TR2medium_male.cs.
Loading compiled script scripts/TR2medium_female.cs.
Loading compiled script scripts/TR2heavy_male.cs.
Loading compiled script scripts/TR2Items.cs.
Loading compiled script scripts/weapons/TR2disc.cs.
Validation required for shape: TR2weapon_disc.dts
Loading compiled script scripts/weapons/TR2grenadeLauncher.cs.
Validation required for shape: TR2weapon_grenade_launcher.dts
Loading compiled script scripts/weapons/TR2chaingun.cs.
Validation required for shape: TR2weapon_chaingun.dts
Loading compiled script scripts/weapons/TR2grenade.cs.
Loading compiled script scripts/weapons/TR2targetingLaser.cs.
Loading compiled script scripts/packs/TR2energypack.cs.
Loading compiled script scripts/weapons/TR2shocklance.cs.
Validation required for shape: TR2weapon_shocklance.dts
Loading compiled script scripts/weapons/TR2mortar.cs.
Validation required for shape: TR2weapon_mortar.dts
Attempting to re-link namespace Launcher from StaticShapeData to Launcher with non-zero refcount.
Attempting to re-link namespace Goal from StaticShapeData to Goal with non-zero refcount.
Warning: shape goal_panel.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Attempting to re-link namespace GoalPost from StaticShapeData to GoalPost with non-zero refcount.
Attempting to re-link namespace GoalCrossbar from StaticShapeData to GoalCrossbar with non-zero refcount.
Attempting to re-link namespace GoalBack from StaticShapeData to GoalBack with non-zero refcount.
Attempting to re-link namespace GoldPole from StaticShapeData to GoldPole with non-zero refcount.
Warning: shape golden_pole.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Attempting to re-link namespace SilverPole from StaticShapeData to SilverPole with non-zero refcount.
Warning: shape silver_pole.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Loading compiled script scripts/TR2Bonuses.cs.
Loading compiled script scripts/TR2BonusSounds.cs.
Loading compiled script scripts/TR2BonusCategories.cs.
Loading compiled script scripts/TR2Prefixes.cs.
Loading compiled script scripts/TR2Nouns.cs.
Loading compiled script scripts/TR2Qualifiers.cs.
Loading compiled script scripts/TR2Descriptions.cs.
Loading compiled script scripts/TR2WeaponBonuses.cs.
Loading compiled script scripts/TR2OtherBonuses.cs.
Loading compiled script scripts/TR2ObserverQueue.cs.
Loading compiled script scripts/TR2Roles.cs.
Validation required for shape: TR2Flag.dts
Validation required for shape: TR2Flag.dts
Validation required for shape: TR2Flag.dts
Validation required for shape: TR2Flag.dts
Validation required for shape: TR2Flag.dts
Loading compiled script t2csri/serverGlue.cs.
Loading compiled script t2csri/rubyUtils.cs.
Loading Ruby script t2csri/crypto.rb.
t2csri/rubyUtils.cs (20): Unable to find function rubyEval
Loading compiled script t2csri/serverSide.cs.
Loading compiled script t2csri/serverSideClans.cs.
Loading compiled script t2csri/bans.cs.
Loading compiled script t2csri/ipv4.cs.
Loading compiled script t2csri/base64.cs.
Loading compiled script t2csri/serverGlue.cs.
Loading compiled script t2csri/rubyUtils.cs.

Loading Ruby script t2csri/crypto.rb.
t2csri/rubyUtils.cs (20): Unable to find function rubyEval

Loading compiled script t2csri/serverSide.cs.
ActivatePackage called for a currently active package!
Loading compiled script t2csri/serverSideClans.cs.
Loading compiled script t2csri/bans.cs.
Loading compiled script t2csri/ipv4.cs.
Loading compiled script t2csri/base64.cs.
-- Sent heartbeat to TN Master. (master.tribesnext.com:80)
LOADING MISSION: Katabatic
Stage 2 load
Executing missions/Katabatic.mis.
Memory consumed = 0
team 1 objectives load...
team 2 objectives load...
navGraph(): register permanent (static object) threat on the graph
navGraph(): register permanent (static object) threat on the graph
navGraph(): register permanent (static object) threat on the graph
navGraph(): register permanent (static object) threat on the graph
navGraph(): register permanent (static object) threat on the graph
navGraph(): register permanent (static object) threat on the graph
Default game mission load done.
starting camp thread...
starting mission countdown...
%

devel:~/t2-linux# find ./ -name rubyUtils.cs
devel:~/t2-linux# grep -R rubyUtils *
Binary file base/T2csri.vl2 matches
devel:~/t2-linux# grep -R rubyEval *
Binary file base/T2csri.vl2 matches
Binary file t2dll.dll matches

devel:~/t2-linux#
-------------------------------------------------------------------

It's not working Sad

maybe it cause YELLOW CONTENT.

who can help?

Thyth
Apotheosis Incarnate

Posts: 797

View Profile
6: April 21, 2009, 12:05:07 PM »
Maybe it's because there's a Ruby interpreter embedded in the t2dll.dll which is loaded by the Windows version of the executable that wasn't present in the stock version of T2.

Maybe that's what Turkeh meant when he said there is no TribesNext support for the Linux native version of T2.

Sarcastic, narcissistic, genius, resurrecting the game with brilliant strokes of wizardry.
Ssential
Nugget³

Posts: 75

View Profile WWW
7: May 26, 2009, 02:21:31 AM »
As mentioned in the quote, this doesn't make Linux work with TribesNext, but your linux server will be seen on the TribesNext masterserver list. Better than nothing but I don't know if this has been known before. I'll post it anyway:

Quote
How to run a Tribes 2 Linux server with TribesNext · 18 Mai 2009 von Dæn

This is not the ‘official’ way to run a Tribes 2 server with TribesNext (that would be using ‘wine’ with the Windows-EXEs, but I found this to run rather poorly!).
So here’s a way I found out to be working well, therefore I’d like to share how to do that.
What’s different with my approach is that it does not make use of TribesNext’s authentication system, therefore all players appear as ‘Smurfs’ on the server. This also means no admins/kicks/bans etc.!

First I’m using the method of patching the LAN version of the game to make it usable for the internet, outlined here:
http://t2.plugh.us/
Second we have to upload our IP & port number to the TribesNext Master Server every 4 minutes.
That’s all!

So, it’s just these two steps:
1. Patch the ‘tribes2d.dynamic’ binary (subnet restriction patch), as described at http://t2.plugh.us/ (scroll down one page; you have to download LAN fix for Linux servers and apply the patch). Now the LAN mode accepts connections from the internet, instead of only from the LAN.
Alternatively, I have the patched binary here for download:
tribes2d-lan.dynamic.tar.gz
Download it and unpack with “tar xfz tribes2d-lan.dynamic.tar.gz” (as user ‘root’)

From now, instead of the old binary, you need to run the patched one, so either replace your ‘tribes2d.dynamic’ binary or change your startup scripts accordingly.

2. Send a heartbeat to master.tribesnext.com every 4 minutes. This can be done in a lot of ways, here I give you one example (you need ‘curl’ and ‘cron’ for this. If you don’t have it, get it from your distro’s repository):

Add the following line to your crontab (command: crontab -e):

*/4 * * * * curl http://master.tribesnext.com/add/28000 > /dev/null 2>&1

The number 28000 in the line above needs to be the same port number as your Tribes 2 server.

Instead of the cron-job, you could also run a deamon like this:

#!/bin/sh
while [ ‘1’ ] ; do
curl http://master.tribesnext.com/add/28000 > /dev/null 2>&1
sleep 240
done

Credit goes to P!nkP?nther.

ScratchMonkey
Nugget
Posts: 32

View Profile
8: June 20, 2009, 02:43:41 AM »
First I use a series of loops to find and delete DSOs. It's not pretty, but it works:

Code:
find /home/t2s/.wine/drive_c/Tribes2/GameData/base -name *.dso | while read line
do
rm $line
done

Try this, instead:

Code:
find /home/t2s/.wine/drive_c/Tribes2/GameData/base -name \*.dso -execdir /bin/rm {} \+

Note the need for a backslash to escape the shell's special characters, asterisk and plus.

While researching this post, I discovered the -execdir option (I've always used -exec) and the plus option to -exec and -execdir. The terminating plus causes the rm command to be issued with multiple filenames, so there will be far fewer invocations of the rm command. (Spawning a subprocess is expensive, so this can be quite a bit more efficient.)

To test the result, substitute echo for /bin/rm, and it will show you what files would be deleted.
« Last Edit: June 20, 2009, 02:46:23 AM by ScratchMonkey »
ScratchMonkey
Nugget
Posts: 32

View Profile
9: June 20, 2009, 02:50:33 AM »
To get a native Linux server working, we need a native Linux DLL that includes the Ruby interpreter. (Ruby is readily available for Linux.) The implementer will need to be able to reverse engineer the Linux native server binary to know what to hook.

I don't know what's in the Windows DLL so I don't know how extensive this work would be.
Thyth
Apotheosis Incarnate

Posts: 797

View Profile
10: January 26, 2010, 03:50:01 PM »
I thought I should add a few notes to people running dedicated servers in Wine on Linux. RC2/RC2a can function as a dedicated server (but not as a client mode), if you replace the Ruby DLL with a 1.9.1 version, instead of the 1.9.0 distributed with the patch.

These are the commands I ran just recently to set up a T2 server on one of my x86_64 Linux servers.
Code:
$ wget http://download834.filefront.com/0fcwi53e3hwg/12893724/tribes2_gsi.exe
--2010-01-26 17:21:36--  http://download834.filefront.com/0fcwi53e3hwg/12893724/tribes2_gsi.exe
Resolving download834.filefront.com... 205.196.121.29
Connecting to download834.filefront.com|205.196.121.29|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 564721416 (539M) [application/octet-stream]
Saving to: `tribes2_gsi.exe'

100%[==========================================================>] 564,721,416 1.93M/s   in 6m 0s

2010-01-26 17:27:37 (1.49 MB/s) - `tribes2_gsi.exe' saved [564721416/564721416]

$ md5sum tribes2_gsi.exe
93460541ddd3bdff9b30829ba04f2186  tribes2_gsi.exe
$ wine tribes2_gsi.exe
$ wine TribesNext_rc2a.exe
$ wget ftp://ftp.ruby-lang.org//pub/ruby/binaries/mswin32/ruby-1.9.1-p376-i386-mswin32.zip
--2010-01-26 17:45:30--  ftp://ftp.ruby-lang.org//pub/ruby/binaries/mswin32/ruby-1.9.1-p376-i386-mswin32.zip
           => `ruby-1.9.1-p376-i386-mswin32.zip'
Resolving ftp.ruby-lang.org... 221.186.184.68
Connecting to ftp.ruby-lang.org|221.186.184.68|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD (1) /pub/ruby/binaries/mswin32 ... done.
==> SIZE ruby-1.9.1-p376-i386-mswin32.zip ... 14564509
==> PASV ... done.    ==> RETR ruby-1.9.1-p376-i386-mswin32.zip ... done.
Length: 14564509 (14M) (unauthoritative)

100%[==========================================================>] 14,564,509  1.19M/s   in 18s

2010-01-26 17:45:52 (783 KB/s) - `ruby-1.9.1-p376-i386-mswin32.zip' saved [14564509]

$ mkdir ruby-1.9.1-p376-i386-mswin32
$ mv ruby-1.9.1-p376-i386-mswin32.zip ruby-1.9.1-p376-i386-mswin32/
$ cd ruby-1.9.1-p376-i386-mswin32
$ unzip ruby-1.9.1-p376-i386-mswin32
$ cp bin/msvcrt-ruby191.dll ~/.wine/drive_c/Dynamix/Tribes2/GameData/msvcrt-ruby190.dll
$ cd ~/.wine/drive_c/Dynamix/Tribes2/GameData/
$ wineconsole --backend=curses Tribes2.exe -dedicated

The game installer and TN patch will need to connect to an X server if you install the game via Wine (remote X servers work, obviously), but you can use wineconsole as above to run the server itself without X (like in a screen).

Wine version is 1.1.29 on this system. Those commands are exactly what I ran to make it work.

Sarcastic, narcissistic, genius, resurrecting the game with brilliant strokes of wizardry.
lpbbear
Nugget
Posts: 33

View Profile
11: February 14, 2011, 07:20:11 AM »
Just to add the this thread a bit of info that might help those interested in running a server with Linux.

I have a TribesNext server up in the masterlist now that is running on Linux using Wine. It is called BearTown Tribes2.

The version of Linux being used is Debian Squeeze and the version of Wine being used is the latest available for this distro at this time direct from WineHQ. (1.1.42)

The initial method used to install TribesNext was based on Thyth's method described in this thread. Other than pre-downloading the needed files everything else was done exactly as he described.

This got me to a mostly working server that would generate errors upon client connect requests. At this point I decided to go a bit farther and see if I could resolve some of the issues I was seeing.

I downloaded a copy of "Winetricks" from http://wiki.winehq.org/winetricks and also http://code.google.com/p/winetricks/

Winetricks is a handy little script that downloads and installs various applications and libraries one might need in the the Wine environment

Using Winetricks I installed a number of the usual dll libraries one might see in a copy of Windows.

After doing this the server began to perform more or less the way it is supposed to. It does crash once in a while but within acceptable limits. I'm sorry to say I did not take notes during this part of the process. I should have. If its of any assistance to those wanting to try this I did download the obvious suspects, all the visual basic vcr related crap I could find in Winetricks. Wink

While this is working I look forward to seeing what Thyth has in mind for the future TribesNext version that hopefully has better out of the box Linux support.

As to the server itself.

It is running only CTF maps and mostly client side maps. I am gradually adding in more of the better quality ones as I find them. Since there are already plenty of servers running server side maps I have little interest in adding mine to that list. There are some really nice client side maps available so my goal for this server is to highlight some of that talent.

Eventually, after I have had time to sift through the various maps I might like to add I will release a mappack specifically tailored to the server so that players who might like to visit will have an easier time of it. For those interested in playing now, most of the maps are coming from TribalOutpost ( http://www.tribaloutpost.com/tribes2 )

Hope that helps my fellow "Penguins" out there. BTW, I am also running TribesNext on my Linux gaming system using Wine with no problems as well.
Plexor
Nugget
Posts: 7

View Profile
12: January 17, 2013, 09:15:18 PM »
Recently, I successfully set up a TribesNext server on Arch Linux (x86_64) with wine 1.5.21.

I followed Thyth's procedure to install and replace msvcrt-ruby190.dll with the 191 version.  At this point, clients were unable to connect.  I figured out there was some issue with msvcrt and then decided to try creating an override so that the tribes2 MSVCRT.dll would be used instead of the internal wine version.  The override was the key in solving the problem.  It appears that winetricks is not needed.

Steps to install:
Note: you will need to have an active X session running for the setup wizards (you can use vnc if you are unable to use a monitor on the system.)  It is assumed you have wine installed.

1. Acquire tribes2_gsi.exe and TribesNext_rc2a.exe from www.tribesnext.com.
2. (Optional) Verify the integrity of the files with md5sum (should match what is shown here):

Code:
$ md5sum tribes2_gsi.exe
93460541ddd3bdff9b30829ba04f2186  tribes2_gsi.exe
$ md5sum TribesNext_rc2a.exe
3bec757215cd29b37d85b567edf8d693  TribesNext_rc2a.exe

3. In a terminal, run the following command to install Tribes 2:

Code:
$ wine tribes2_gsi.exe
Follow the setup wizard.

4. Do the same for the TribesNext patch:

Code:
$ wine TribesNext_rc2a.exe
Follow the setup wizard.

5. Download ruby-1.9.0-2 i386 mswin32: ftp://ftp.ruby-lang.org/pub/ruby/binaries/mswin32/unstable/ruby-1.9.0-2-i386-mswin32.zip.  The latest 1.9.1 i386 mswin32 version found at ftp.ruby-lang.org/pub/ruby/binaries/mswin32/ also works, but only for running a dedicated server.
6. Extract the ruby archive and copy bin/msvcrt-ruby190.dll (or whatever version you are trying) over the original Tribes2 GameData/msvcrt-ruby190.dll created by the tribesnext patch. (you may want to first backup the original msvcrt-ruby190.dll.)
7. Run 'winecfg' and click the Libraries tab.  In the 'New override for library:' box, type 'msvcrt' and click 'Add.'  'native' should be first.
8. Add a command to fix server stuttering; create a *.cs file such as GameData/base/scripts/autoexec/auto.cs with the following line:

Code:
SetPerfCounterEnable(0); //server stutter fix

9. Make sure to open/forward the server port (default: UDP 28000)
10. Test that the server works at this point:

Code:
$ wine Tribes2.exe -dedicated

You should see:

Code:
-- Sent heartbeat to TN Master. (master.tribesnext.com:80)
 - Heartbeat confirmed.
If you don't see 'Heartbeat confirmed.', verify the port is really open from step 9.

11. Quit the server:

Code:
% quit();

12. Modify your ServerPrefs.cs to how you want them.
13. Make sure to delete the *.dso files whenever you make changes to the *.cs files.

Run server in a terminal without wine graphics:
1. Install xvfb
2. Run the server like this:
Code:
$ xvfb-run -a -w 5 wineconsole --backend=curses Tribes2.exe -dedicated

Note: If the curses option is unavailable, wine will need to be rebuilt.

Also, from my testing, if you attempt to run the server without an active X session and without xvfb:

Code:
$ wineconsole --backend=curses Tribes2.exe -dedicated

The Tribes2/wine processes will use around 100% cpu and you won't see '- Heartbeat confirmed.', meaning your server won't show up on the server list.
« Last Edit: January 20, 2013, 05:00:47 PM by Plexor »
Omnutia
Nugget
Posts: 7

View Profile
13: January 01, 2014, 07:23:15 PM »
Big thanks to Plexor. I'm using the Digital Ocean $5 droplet and the server has been running fine for several hours.
Using: Ubuntu 13.10 32bit, Wine 1.4.
Instead of VNC, if you're using putty to SSH into your server. Look up how to use Xming to render the X session on your computer while setting up. Then use xvfb to run the server program itself.

My current bash file is:

Code:
#! /bin/bash
pkill Tribes2.exe;
find /home/tribes/.wine/drive_c/Dynamix/Tribes2/ -name '*.dso' -delete;
cd /home/tribes/.wine/drive_c/Dynamix/Tribes2/GameData/;
xvfb-run -a -w 5 wineconsole --backend=curses Tribes2.exe -dedicated;

Run from inside Screen this works but not when run using "&" to separate it into a different instance.
« Last Edit: January 01, 2014, 07:27:11 PM by Omnutia »
_Unknown _
Nugget
Posts: 5

View Profile
14: October 07, 2017, 11:30:09 PM »
hello

with wine hosted server on ubuntu 17.04

after a few hours, server sets itself off
Pages: [1] Print 
« previous next »
Jump to:  

irc.quakenet.org / #TribesNext Powered by SMF  © Simple Machines