Jump to content
  • 0

Making SH file to Run 2 Servers


Question

Posted

I've test this script

#!/bin/bash
xterm -fg white -bg black -e "/root/login.sh"&
xterm -fg white -bg black -e "/root/map.sh"&
xterm -fg white -bg black -e "/root/char.sh"&
xterm -fg white -bg black -e "/root/map2.sh"&
xterm -fg white -bg black -e "/root/char2.sh"

but this happens everytime i use ./start.sh

./start.sh: line 5: xterm: command not found
./start.sh: line 4: xterm: command not found
./start.sh: line 3: xterm: command not found
./start.sh: line 6: xterm: command not found
[root@planet ~]# ./start.sh: line 2: xterm: command not found

can anyone tell me how to work this one out?

 

I managed to install xterm : and now i got this warning

Warning: This program is an suid-root program or is being run by the root user.
The full text of the error or warning message cannot be safely formatted
in this environment. You may get a more descriptive message by running the
program as a non-root user or by removing the suid bit on the executable.
xterm Xt error: Can't open display: %s
xterm:  DISPLAY is not set


@bump

6 answers to this question

Recommended Posts

Posted

What are you using xterm for?

I remember seeing this from AsuraHosting, did you copy it from there? Lol.

Anyway, as the warning suggests, this isn't meant to be run on root user. And it also requires a display, which I'm guessing is something like XFCE.

I'm not familiar with multi-server setups using 1 login server, but I think you only need to alter the ports on map2 / char2, so that it doesn't collide with your map1 / char1.

Posted

What are you using xterm for?

I remember seeing this from AsuraHosting, did you copy it from there? Lol.

Anyway, as the warning suggests, this isn't meant to be run on root user. And it also requires a display, which I'm guessing is something like XFCE.

I'm not familiar with multi-server setups using 1 login server, but I think you only need to alter the ports on map2 / char2, so that it doesn't collide with your map1 / char1.

 

No I didn't copy this on AsuraHosting. I got this from someone ( I already put different type of ports for map & char server ) 

Posted

Try and start each server manually;

cd /path/to/your/server

./login-server

./char-server

./map-server

./char-server2 (?)

./map-server2 (?)

 

Now if that works for you, then putting them on a shell script should be the easier part.

(?) - cause I really have no idea what your second char / map server are called.

Posted

Try and start each server manually;

cd /path/to/your/server

./login-server

./char-server

./map-server

./char-server2 (?)

./map-server2 (?)

 

Now if that works for you, then putting them on a shell script should be the easier part.

(?) - cause I really have no idea what your second char / map server are called.

 

It has the same name with char-server & map-server with the first server.

Posted

 

Try and start each server manually;

cd /path/to/your/server

./login-server

./char-server

./map-server

./char-server2 (?)

./map-server2 (?)

 

Now if that works for you, then putting them on a shell script should be the easier part.

(?) - cause I really have no idea what your second char / map server are called.

 

It has the same name with char-server & map-server with the first server.

 

That's a really unhelpful feedback. Anyway, this Wiki article explains it best.

It even tells you what to do with your athena-start so you can start both servers at once. (Which solves your first problem)

Posted

 

 

Try and start each server manually;

cd /path/to/your/server

./login-server

./char-server

./map-server

./char-server2 (?)

./map-server2 (?)

 

Now if that works for you, then putting them on a shell script should be the easier part.

(?) - cause I really have no idea what your second char / map server are called.

 

It has the same name with char-server & map-server with the first server.

 

That's a really unhelpful feedback. Anyway, this Wiki article explains it best.

It even tells you what to do with your athena-start so you can start both servers at once. (Which solves your first problem)

 

 

Yep I even followed that guide. it seems outdated guide. 

 

the reason why im trying to use this is to run both server1 & server2 using this.

#!/bin/bash
xterm -fg white -bg black -e "/root/login.sh"&
xterm -fg white -bg black -e "/root/map.sh"&
xterm -fg white -bg black -e "/root/char.sh"&
xterm -fg white -bg black -e "/root/map2.sh"&
xterm -fg white -bg black -e "/root/char2.sh"

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...