Jump to content
  • 0

Making SH file to Run 2 Servers


Radian

Question


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.05
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

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

Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  317
  • Reputation:   63
  • Joined:  11/13/11
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.05
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

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 ) 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  317
  • Reputation:   63
  • Joined:  11/13/11
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.05
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  317
  • Reputation:   63
  • Joined:  11/13/11
  • Last Seen:  

 

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)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.05
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

 

 

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"
Link to comment
Share on other sites

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.

×
×
  • Create New...