GRAV
[Tutorial]Running GRAV Dedicated on Linux
It is highly adviced to use Ubuntu 12.04.1 LTS! Debian especially suffers from outdated Software and Libraries!

I am not responsible for ANY damage caused to your Linux machine or any data loss, nuclear detonation, or any other possible bad outcome!

The Tutorial has been updated based on Update 10 and any changes/updates introduced with Update 10!

VNC and a Desktop on the Server are now a requirement!

Heyo to all of those, who'd like to run a Dedicated Server for GRAV on a Linux machine, but maybe haven't figured it out so far, since there are no Linux Binaries.

This tutorial is based on Debian 14.04.1 LTS! Some knowledge with Linux Distros is required!

So, you would like to host a GRAV Server on your own, but do not have the required money for a Windows Server, but for a Linux Server?

Let's get rolling.

First, we log in to our Dedicated Server via SSH as Root (or if you have it at home, boot it up and log in. In this case you can skip the VNC stuff).

Type in the following to add a new user just for GRAV:

adduser gravds

This will add the user gravds and the process will ask you for a password for the user. Enter any password your heart desires, but let it be a secure password.

Now re-connect to your Server and log in with gravds.

If you want to continue with using the SUDO commands, you have to add gravds to the sudoers. Otherwise complete those steps as root and without sudo in the command.

This is where the tricky parts begin.

1) Install WINE with:

sudo apt-get install wine

2) Now we need X Windows. It is very fast and lightweight. Highly recommended.

sudo apt-get install xorg

3) Next is XFCE. Faster and more efficient than GNOME etc. Highly recommended.

sudo apt-get install xfce4

4) Now install a VNC Server, I recommend VNC4Server.

sudo apt-get install vnc4server

(TightVNC is NOT RECOMMENDED anymore!)

We will launch it a bit later, we are not done yet.

5) Let's grab SteamCMD:

If you did the above SUDO commands without using SUDO but as Root instead, switch to gravds now!


and unpack it with:

tar -zxvf steamcmd_linux.tar.gz

6) Start SteamCMD with:

6A)
./steamcmd.sh

WARNING! YOU NOW NEED YOUR STEAM ACCOUNT WHERE GRAV IS REGISTERED ON!

The entire procedure for SteamCMD is, including enforcing the Windows Platform:

6B)
login *username*
(then enter password and your steamguard code, if you have steamguard enabled)

6C) Set the install directory with:
force_install_dir ./grav_ds

6D) The tricky part. By default, SteamCMD will deny the download now, but this fixes it:
@sSteamCmdForcePlatformType "windows"

This forces SteamCMD to download Windows Binaries, no matter on which platform you are.

6E) Forward to downloading:
app_update 332500 validate

Now it downloads.

If you want to install the Experimental Branch, you have to execute the following command after 6E:

app_update 332500 -beta experimental -betapassword iacceptmyfate validate

When it is done, exit SteamCMD with
quit

Let's continue with Wine, the VNC Server and getting this beast running.

7) With the user gravds still logged in, do the following steps:

winetricks d3dx9_42 xact

This will install the required DLLs and register them, since GRAV still needs X3DAudio1_7.dll even in Server Mode.

8A) Create a VNC Password with:
vnc4passwd
(It can only be 8 characters long)

8B) Launch the VNC Server with:
vnc4server -geometry 950x700 -depth 24 -name "MyServer"

-geometry 950x700 is used for the resolution. Check your Server Hardware before going above the default resolution used here. Be sure, that the Server's APU supports a higher resolution or that you have a dedicated GPU installed.

-depth 24 is the color depth. Leave it as it is. 24 is enough.

-name can be anything you want.

9) Now download RealVNC from this location: http://www.realvnc.com/

Launch RealVNC and connect to *ServerIP*:5901. Also, enter your password when prompted.

You might get a popup about the desktop setup...you can choose the default setup or the clean one. I chose the default one.

10) This is recommended while still also being connected with your SSH Client:

CD to your GRAV Directory, example:

cd /home/gravds/grav_ds/Binaries/Win32

Create a shell script with your favourite editor, in my case the basic VI. Nano works as well :)

vi StartServer.sh

Paste the following into the sh file:

wine CAGGameServer-Win32-Shipping.exe cag_p?steamsockets?Port=7785?PeerPort=7786?QueryPort=27019?MaxPlayers=64?allowpvp=0?ServerName="MyGRAVDedicatedServer"?gamepassword=yourpassword -seekfreeloadingserver

If you want to have Moons and Exoplanets:

wine CAGGameServer-Win32-Shipping.exe cag_p?adminpassword=yourpassword?steamsockets?Port=7785?PeerPort=7786?QueryPort=27019?MaxPlayers=64?gamepassword=yourpassword?PlanetManagerName="FUNTOWN" ?CloudDir="Cloud" ?ServerName="MyGRAVDedicatedServer" -seekfreeloadingserver -multihome=*IP* -localaddress

The space before the question marks is required! Otherwise the parsing won't work properly and you only get a Server, which spits out errors!

and edit it to your liking. Save the file and exit the text editor. CHMod it to make it executeable:
chmod +x StartServer.sh

11) Go back to your RealVNC Window, press the "Start" Button and run a Terminal Emulator. Then from there CD to your GRAV Binaries Win32 directory again (look at step 10) and do the following:

./StartServer.sh

Voila! Your GRAV Dedicated Server should launch.

It will take a couple of minutes and also a buch of other windows should show up. 1 for the Moon, and 1 for each of the 3 Exoplanets.

FAQ:

Q: Why all those steps and why Wine, XORG etc?
A: Because of technical reasons like WINE etc. A Linux Shell is completely different compared to the Windows DOS Prompt. Correct me, if I am wrong. And I like to make it fool proof...

Q: Why has ServerName no Spaces in it? or My Server Name is cut off after the first Space! Why?
A: Sadly a Space within the shell script is required, so that the Server Software properly parses the command line and seperates each command line parameter properly and interprets it. If you want to have spaces in your Server Name, either "simulate" them with an underscore, like this: My_GRAV_Dedicated_Server or you open DefaultGame.ini under CAGGame\Config and edit the line:

ServerName="Unidentified Universe"

and save DefaultGame.ini.

If you maybe play around with escaping characters properly and find a way to enable Spaces in the Command Line Parameter, then please tell me.

Q: *Your question here*?
A: *I try to answer it here*
最近の変更はMaxunitが行いました; 2015年2月23日 20時15分
< >
31-45 / 92 のコメントを表示
Now you have to run the winetricks command
winetricks d3dx9_42 xact

In any case, I would advice to follow one or another step from the Tutorial again, just in case. Mostly those, which needed SUDO (or Root directly). If you had to do apt-get update, then other packages might be outdated as well.
Thanks for the advice. I did it all again, and it worked, but now after starting the StartServer.sh I get:

Application tried to create a window, but no driver could be loaded.
Make sure that your X server is running and that $DISPLAY is set correctly.
err:systray:initialize_systray Could not create tray window
err:module:import_dll Library X3DAudio1_7.dll (which is needed by L"Z:\\home\\server\\Steam\\grav_ds\\Binaries\\Win32\\CAGGameServer-Win32-Shipping.exe") not found
err:module:LdrInitializeThunk Main exe initialization for L"Z:\\home\\server\\Steam\\grav_ds\\Binaries\\Win32\\CAGGameServer-Win32-Shipping.exe" failed, status c0000135

(And yes i did chmod and i have the VNC Viewer and can connect to the server, but what do I need this for exactly?)
Somehow the d3dx9_42 and xact stuff is still missing for the user you are using to start the server. The only real error is the message about Library X3DAudio1_7.dll and this DLL is covered by installing d3dx9_42 and xact with:

winetricks d3dx9_42 xact
I still cant get this to work...
I did it all as root. It always says the files are already up to date and so on.

So I have some Questions about things I'm not entirely sure:

1. Do I stadt the shell script in VNC or in PuTTY?
2. I used filezilla and created a txt file on windows in which i parsed the second string for the StartServer.sh, then renamed it to .sh and put it up my server with Filezilla. The server can read the .sh so I guess that worked out. Or can that cause problems?
3. Is there a way to start this server via the -screen funktion in Debian?
4. My grav Folder is within my Steam folder, can that cause Problems?
1. You start the shell script in VNC using a Terminal Emulator (A shell inside the VNC)
2. Maybe the formating isn't right. Edit the file with nano or vi or another native Linux Text Editor.
3. As long as you do not kill the VNC Server, it acts as a Screen session, so to say. You can close RealVNC VNC Viewer or any other VNC Viewer you are using and the X Server still runs.
4. Shouldn't be a problem, it is the same on my machine.
I deleted everything and redid it all.
I created the file with vi and it actually worked this time.
I started the server via VNC and he returns this:

server@v22014121956722047:~/Steam/grav_ds/Binaries/Win32$ ./StartServer.sh
err:module:import_dll Library X3DAudio1_7.dll (which is needed by L"Z:\\home\\server\\Steam\\grav_ds\\Binaries\\Win32\\CAGGameServer-Win32-Shipping.exe") not found
err:module:LdrInitializeThunk Main exe initialization for L"Z:\\home\\server\\Steam\\grav_ds\\Binaries\\Win32\\CAGGameServer-Win32-Shipping.exe" failed, status c0000135

---

I executed the following string as the grav user, as root and in VNC: "winetricks d3dx9_42 xact"

and it always returned:

root@v22014121956722047:~# winetricks d3dx9_42 xact
Executing w_do_call d3dx9_42
d3dx9_42 already installed, skipping
Executing w_do_call xact
xact already installed, skipping

So that should mean it is installed correctly.

I am pretty frustrated right now and have no idea what else to try.
Is there any alternative in creating a server for GRAV in linux?
I am not really sure, why your Debian installation fails to recognize the installed D3DX9 and XACT Binaries. This is really strange. The problem is, these DLLs are required for a GRAV Server and if this won't work on your current Debian installation, for some reason, then I cannot tell you another way to host a GRAV Server, except renting a Windows Server.

I am still investigating into this, but on my end I only installed WINE as root, logged out of my Server, logged back in as gravds, ran the winetricks command and it installed all the binaries and it worked.

What Debian Distro are you using? Debian 6? Debian 7? 32Bit or 64Bit?
If you log in as root, what does this command return?
find / -iname X3DAudio1_7.dll

What does
wine --version
say?

If you want, you can add me on Steam, so that I can help you in real-time.
最近の変更はMaxunitが行いました; 2015年2月17日 8時36分
If you have a 64Bit Linux and if x3daudio1_7.dll is not located in:


then something went wrong.
I have some trouble too i hope someone can help.

[gravds@server Win64]$ ./StartServer.sh
wine: cannot find L"C:\\windows\\system32\\CAGGameServer-Win64-Shipping.exe"
Find Out the problem i was in /home/gravds/grav_ds/Binaries/Win64
and the exe server doesn't exit in Win64...
Logic 2015年2月21日 17時24分 
No_cL manpapper の投稿を引用:
Find Out the problem i was in /home/gravds/grav_ds/Binaries/Win64
and the exe server doesn't exit in Win64...

Yeah, it's in Win32
an another problem when i run sh file the cmd show this:
fixme:heap:HeapSetInformation (nil) 1 (nil) 0 fixme:advapi:RegisterEventSourceW ((null),L"CAG-PID67"): stub fixme:advapi:EventRegister {47a9201e-73b0-42ce-9821-7e134361bc6f}, 0x3f005ab0, 0x3f03ab30, 0x3f03ab28 fixme:advapi:EventRegister {58a9201e-73b0-42ce-9821-7e134361bc70}, 0x3f005ab0, 0x3f03ab68, 0x3f03ab60 fixme:advapi:EventRegister {3fa9201e-73b0-43fe-9821-7e145359bc6f}, 0x3f005ab0, 0x3f03aaf8, 0x3f03aaf0 fixme:advapi:EventRegister {1432afee-73b0-42ce-9821-7e134361b433}, 0x3f005ab0, 0x3f03aba0, 0x3f03ab98 fixme:advapi:EventRegister {4372afee-73b0-42ce-9821-7e134361b519}, 0x3f005ab0, 0x3f03abd8, 0x3f03abd0 Setting breakpad minidump AppID = 332500 Application tried to create a window, but no driver could be loaded. Make sure that your X server is running and that $DISPLAY is set correctly. err:systray:initialize_systray Could not create tray window fixme:gameux:GameExplorerImpl_VerifyAccess (0x156e50, L"Z:\\home\\gravds\\grav_ds\\Binaries\\Win32\\CAGGameServer-Win32-Shipping.exe", 0x19b72d8) *** WARNING - PATHS MAY NOT BE VALID *** fixme:advapi:ReportEventW (0xcafe4242,0x0002,0x0000,0x80000002,(nil),0x0001,0x00000000,0x19b6870,(nil)): stub Warning (BitMonReplacementPylon_2) just tried to register itself with the navmesh, but it already was! You must first unregister before re-registering an object Warning (BitMonReplacementPylon_2) just tried to register itself with the navmesh, but it already was! You must first unregister before re-registering an object Warning (BitMonReplacementPylon_0) just tried to register itself with the navmesh, but it already was! You must first unregister before re-registering an object Warning (BitMonReplacementPylon_1) just tried to register itself with the navmesh, but it already was! You must first unregister before re-registering an object Layer (Biome A Fog) on (CAG_Quadrant_H1N1.TheWorld:PersistentLevel.BitMonLandScapeLayerSpawnVolume_1) is disabled! no processing of this layer will take place. Layer (Biome A Mountain Trees) on (CAG_Quadrant_A.TheWorld:PersistentLevel.BitMonLandScapeLayerSpawnVolume_0) is disabled! no processing of this layer will take place. fixme:winhttp:WinHttpDetectAutoProxyConfigUrl discovery via DHCP not supported

so i start the game and connect to my server but it's still say connecting/loading and the linux terminal add those lines:
fixme:winsock:WS_setsockopt IP_DONTFRAGMENT is silently ignored! err:ole:CoCreateInstance apartment not initialised fixme:winsock:WS_setsockopt IP_DONTFRAGMENT is silently ignored! fixme:winsock:WS_setsockopt IP_DONTFRAGMENT is silently ignored! err:ole:CoCreateInstance apartment not initialised fixme:winsock:WS_setsockopt IP_DONTFRAGMENT is silently ignored! fixme:winsock:WS_setsockopt IP_DONTFRAGMENT is silently ignored!
最近の変更はManpapperが行いました; 2015年2月21日 18時48分
The Server starts properly (most of those "errors" also appear in native windows machines) but the connection can't be made because of the winsock issue. It has something to do with WINBIND, but I am still not sure, what the problem is. I had the issue as well, google'd for hours and found no fix.

In the end, I upgraded from Ubuntu 12.04 LTS to 14.04.1 LTS and installed the WINE Version available for it, which should be 1.6, I think.

This fixed it.

Are you maybe using WINE 1.7? It might be a problem with WINE 1.7 and the packages installed alongside with WINE 1.7 (like the WINBIND Package).
最近の変更はMaxunitが行いました; 2015年2月21日 18時59分
you are right i have installed wine 1.7.36
So if my game is stuck at the connexion the problem is maybe port
For ports the only one things you might have to do is to add rules to iptables?
Maybe adding the ports to IPTABLES might fix it. I haven't tried that back then. Give it a go.
< >
31-45 / 92 のコメントを表示
ページ毎: 1530 50