Author Topic: Linux Headless Server  (Read 1120 times)

I created a script to launch a headless server:

Code: (init0.sh) [Select]
echo mypasswordhere | sudo -u game-servers -S screen -dm -S blockland0 -X "GAMEMODE=\"trench_ctf\"; xvfb-run --auto-servernum --server-num=1 xterm -e 'wine ~/servers/blockland/server0/Blockland.exe ptlaaxobimwroe -dedicated -gamemode $GAMEMODE'"
I get this error: (evidently from screen)
Quote
No screen session found.

Any ideas on what's wrong?

Solved!

Code: [Select]
echo mypassword | sudo -u game-servers -S screen -dmS blockland0
echo mypassword | sudo -u game-servers -S screen -S blockland0 -X "GAMEMODE=\"trench_ctf\"; xvfb-run --auto-servernum --server-num=1 xterm -e 'wine ~/servers/blockland/server0/Blockland.exe ptlaaxobimwroe -dedicated -gamemode $GAMEMODE'"

It works now. I still need to configure sudo properly so I don't have to echo passwords.

Is there any way to do a secure pipe or is the pipe already secure?

Is there any way to do a secure pipe or is the pipe already secure?
what?
oh, his sudo bit? no, the commands are either logged somewhere thanks to your shell or visible through ps aux

I changed things since yesterday. It no longer echoes the passwords like that. Everything works except for the most important part, sending input to the server.

The server has no GUI and I access it via SSL. I can view the console using a combination of Wine and Screen but input doesn't work.

(click for full size)


Here's my bash scripts:

Code: (init.sh) [Select]
#!/bin/bash

echo \-\-\-INITIALIZING BLOCKLAND DEDICATED SERVER\-\-\-
screen -dm -S blockland0 -L ./launch.sh

Code: (launch.sh) [Select]
#!/bin/bash

echo \-\-\-LAUNCHING BLOCKLAND DEDICATED SERVER\-\-\-

GAMEMODE="Custom"

#It seems like I can actually start the server without using Xvfb
#Wine just whines about the GUI being missing

#export DISPLAY=:1
#Xvfb :1 -screen 1 1024x768x24 &
#x11vnc &

wineconsole server0/Blockland.exe ptlaaxobimwroe -dedicated -gamemode $GAMEMODE | tee test.txt