The Linux Thread

Since no one's started a Linux thread yet... I'll begin.

So I tested the installation on an up to date Debian Sid/Experimental with wine version wine-1.1.11-206-gad432bf (latest experimental package) and I was able to play Tribes 2 normally using the -nologin option but using the -online option the game will freeze upon the Garage Games logo.

If any developers want me to do further testing just reply to this thread, hopefully others will join in :)
«13

Comments

  • im on Ubuntu,

    i already had a working tribes install.

    i tried to install the patch w/ cxgames, but it wouldnt go..

    i opened the patch exe w/ the archive manager and unzipped it into the /gamedata folder.

    i can still run tribes 2 from my launcher but i dont see anything differnt.

    this is just as the Known issues thread says...
  • I heard that Turkeh got T2 working under wine by altering some of the game's networking capabilities, but it's still a bit unstable.
  • ThythThyth Apotheosis Incarnate
    This is a known issue.

    The T2 script system networking objects, for some reason have problems running under Wine. It's very likely a problem with an imperfect reimplementation of the WinSock API.

    In the process of running the game online in client mode, the game almost immediately connects to this website to find the location of the authentication server. Account creation requires several network transfers with the authentication server. Once you log in, the listing code, and the old game IRC code initialize.

    All of these are points of failure in Wine.

    Turkeh is working on shifting those networking operations to the Ruby interpreter, thus avoiding the game specific networking glitches. Until that's complete, there isn't very much you can do, short of stripping out all of the networking enabled scripts.
  • Couldn't you make a patch that works with the existing version of Tribes 2 from Loki?
  • KrashKrash Neptune Sleeps
    Not in the same fashion, and not while we're occupied with bringing the core up to spec, but it may come up in time once it's better established. :)
  • ThythThyth Apotheosis Incarnate
    Loki's port provides a much worse experience than running the Windows version under Wine.

    If we can get these crashes resolved by moving network operations to the Ruby interpreter, we will go that route.
  • I am also very interested in running this in Linux. I am running Debian sid as well as Ubuntu 8.10. Please make it work, please please please.... it always freezes for me when it reaches the login screen. I even tried compiling the latest SVN of wine... same problem.
  • I would also be very interested in playing on linux. I just tested the patch using wine-1.1.12 on amd64. With the -online option the game froze during the GarageGames splash screen just as others had reported.
  • I've been told that T2 will work on Ubuntu 8.04, but some libraries in 8.10 'broke' the game.

    I wish I knew what to fix, I'd like to run a server off my linux box.
  • I've been told that T2 will work on Ubuntu 8.04, but some libraries in 8.10 'broke' the game.

    I wish I knew what to fix, I'd like to run a server off my linux box.
    I don't know the specifics of Ubuntu releases, but on my gentoo system I can run T2 just fine. Except when using the modified Tribes Next executable. I keep my system fairly up to date, so I imagine if you update to a recent ubuntu release you should be able to get T2 running. However a solution is found for online mode freezing with the Tribes Next executable you'll be stuck with offline mode.
  • Sorry, my bad. The person who told me it stopped working said "It stopped working on Ubuntu 8.04." My server is 8.10... :/
  • To get Tribes 2 working Ubuntu and Fedora and I would say most other modern distro's. You need to download the Loki compat libraries. Go here http://www.swanson.ukfsn.org/loki/ . Currently http://www.swanson.ukfsn.org/loki/loki_compat_libs-1.3.tar.bz2 seems to be the latest.

    #!/bin/sh
    export COMPAT=home/user/Download/Loki_Compat
    export LD_PRELOAD=/$COMPAT/libstdc++-3-libc6.2-2-2.10.0.so:/$COMPAT/libSDL-1.2.so.0
    cd /home/user/.loki/tribes2/base
    for foo in `find . -name "*.dso"`; do rm -f $foo; done
    /usr/local/games/tribes2/tribes2.dynamic -nologin


    Here's my script I was using to load it up. I hope this helps. I think. I had to install smpeg and SDL. Post back here if the game fires up for you.
  • Thanks to those libraries up there and a little bit of hacking around, I managed to get a T2 Linux Server installed from the Windows CD (as soon as I make sure everythings working 100% I'll write up my notes).

    The only problem I have now is that when I started the server (./tribes2d -dedicated) it starts...then exits out a little bit later with no other messages. According to the FAQ this means it can't reach the authentication servers. I made sure the port was open (28000), but it still errors out.

    I'm assuming this is all because the official auth servers are down then. Anyone have suggestions for how to bypass this?

    (Remember, it's a Linux Dedicated server, not a client or a windows server:) )

    Thanks
  • Yeah have the same problem. Got it installed and working in LAN mode. But can't get it to work in online dedicated mode for TribesNext... guess it's the authentication (as win uses the ruby dll for tcp auth)
  • I did some digging and I'm not sure its a problem with WINE's implementation of winsock2. First of all I did a packet log when starting Tribes in online mode. Both starting on windows and on linux under wine had the exact same internet traffic as viewed by the ethernet device. They both managed to fetch the auth servers from tirbesnext.com and determine my internet ip address.

    Doing a program trace of system calls on linux I found that the program got trapped in some sort of infinite loop. It kept calling the recv() function winsock over and over again with the exact same parameters. This may indicate that its a problem with WINE's winsock code, but I'm hesitant to jump to that conclusion that when all sorts of other network programs I use on WINE function just fine. Including network intensive programs like firefox, uTorrent and other multiplayer games.

    I'll keep digging and see what I can find out.
  • All the more reason to make a patch for the old Loki version..

    imho, but i'm putting in another vote for this, since; yay, native, known good, working, client. =)

    -m
  • ThythThyth Apotheosis Incarnate
    I won't be porting to the Loki version any time soon. I don't have the time, or inclination to maintain two branches of code. Wine will be supported with release candidate 3, as discussed in the development roadmap.
  • I won't be porting to the Loki version any time soon. I don't have the time, or inclination to maintain two branches of code. Wine will be supported with release candidate 3, as discussed in the development roadmap.

    It's great the client will work at least under wine. Not that desireable but I guess it's better than nothing. How are you supposed to run a dedicated server like this?
  • edited February 2009
    I won't be porting to the Loki version any time soon. I don't have the time, or inclination to maintain two branches of code. Wine will be supported with release candidate 3, as discussed in the development roadmap.
    It's great the client will work at least under wine. Not that desireable but I guess it's better than nothing. How are you supposed to run a dedicated server like this?
    Use Wine again, like I do on my shell server (Glasnost :: Tribes 2).

    Speaking of which, with some tinkering, I got the client to work in Wine. Unfortunately, the client tends to lock up my box occasionally while playing, so I can't test it extensively. What I DID test, however, was server listing and in-game IRC, both of which work.
  • any updates on this front?
  • at current, you can (manually) nerf the T2CSRI scripts that use any TCP/HTTP objects and that should fix most instabilities... You'll have to use another means of viewing the server list though (i.e. MaxOGC web list) and manually set $IPv4::InetAddress to your external IP (via game console, or script).

    Otherwise, see The Development Roadmap
  • I've tried what Turkeh has said above hoping to get a temporary solution to stop
    me having to reboot all the time, and found that now I've got past the freezing
    intro screen, the local account details are not being found.
    The log in screen doesn't recognise that any local accounts exist: in the
    dropdown thing where my account should be it's just "retrieve account" greyed
    out. If I enter my details manually it prompts me to download the account
    details from the server (which obviously we're trying to avoid as Wine doesn't
    like it)

    I tried hard coding my account name into the return value of
    certstore_listAccounts in t2csri/certstore.rb, which had no effect at all. That
    function seems to be called from LoginEditMenu::populate (in loginScreen.cs), so
    I tried setting the $accountList variable manually in that function to my
    accountname, and that *did* make it show up. But it wouldn't let me log in
    presumably as it hadn't loaded in the keys and certificates.
    My guess is the Ruby interpretor isn't being invoked correctly, but I'm not
    receiving any errors about it.

    I should also mention that I'm using the copy I installed on Windows and play
    through Windows, and on Windows this exact setup does work as expected (ie it
    lets me log in but doesn't retrieve the server list).

    I'm using wine-1.1.14 on OpenSuse 11.1 x64.

    if anyone else wants to test it and see if you have more luck, I've (hopefully)
    attached T2csri.vl2 which needs to go under GameData/base (but make sure to
    back up the one already there first ;p)
  • ThythThyth Apotheosis Incarnate
    You can copy the public.store and private.store files from your Windows installation to your Linux install. If you can't download the certificate and key for your account in the Linux install, you'll need to copy that data over via those store files.

    Setting the account name won't magically permit login, since the login process just does some processing on the certificates locally.
  • edited February 2009
    Hi Thyth, thanks for your response but as I said it's exactly the same install.

    To make it clearer: I'm just mounting the NTFS drive and Wine-ing the t2 executable. The public.store and private.store are there and are perfectly recognised and parsed and allow login under Windows but when running under Wine, Tribes is oblivious to their existence it seems.

    My point about setting account names was that... well, as far as I can tell, Tribes (the cs login screen script) asks Ruby for the list of accounts. Hard coding an account name within the Ruby has no effect, but hard coding it within the cs script does. That seems pretty significant...



    ** EDIT: Ah, interestingly I've just tried on a fresh install on a Ubuntu VM and there does not seem to be the same issue :-\ but it does UE right after logging in.
    I'll keep investigating.
  • ThythThyth Apotheosis Incarnate
    Sounds like the Ruby interpreter is failing for some reason. If you add enableWinConsole(1); to the top of one of the script files (clientSide.cs in the VL2 works fine), that should enable a console window for the game. Check if the Ruby interpreter is working properly.

    Try:
    rubyEval("puts 2+2");
    
    It should put out 4.

    Oh... and if any advanced Linux C/C++ programmer wants to help me out with a Loki port, I'm sure something could be hacked together for dedicated server support (It just needs SHA1, big integer base conversion, and big integer modular exponentiation). I'm just not sufficiently familiar with shared library injection in Linux.
  • It seems to be a quirk of the Wine version I was using, I went back a few versions (to whatever's in the OpenSUSE repos, can't remember) and Ruby kicked in no problems.

    For what it's worth: it looks like the Wine freezing issue is caused by trying to pull the whatismyipaddress.php page. I went back to a clean T2csri.vl2, the only change I made was to set $IPv4::InetAddress = "xxx.xxx.xxx.xxx"; [obviously replaced with my ip address] at the top of the ipv4_getInetAddress function (in t2csri/ipv4.cs)... and the freezing stopped, but there's a bunch of other networking activity which seems to complete fine.

    Unfortunately it UEs (twice) right after logging in. Which is probably a Wine thing as it's working under Windows.
  • If you're getting a UE immediately after login (under Wine), the likely culprit may be the T2 IRC client.
    Just do a
    touch /path/to/base/scripts/ChatGui.cs
    
    and remove any ChatGui.cs.dso files
  • Can't contribute anything technically but I do appreciate the work being done on a linux patch for tribes. Thanks ;D
  • Thanks Turkeh, that got the UE sorted.

    I did actually get it working but it's not elegant and I did have to disable the server browser. I found that the server fetching/querying did cause the Wine infinite loop thing, but not every time. And something related happens in the background periodically while in game which was causing random looking infinite loop freezes. I just disabled the autoexec/t2csri_list.cs file in the end.

    I also ran into a problem with the account certificate being thought to be invalid when I tried joining a server. I didn't test this thoroughly but it looked like when T2 got hold of the cert it had been cut to the first 1000 characters (mine is roughly 1200 or 1300). I just hard coded the line from my public.store in the script, and it was happy with that.

    if anyone is interested in exactly what needs doing to get a playable copy running leave a message here and I'll post step by step instructions.
  • ThythThyth Apotheosis Incarnate
    That certificate truncation issue should be sorted in RC2.
Sign In or Register to comment.