Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Send Text To A Detached Screen Session, ...without reattaching it, possible?
Xayd
post Oct 29 2003, 03:44 AM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 3
Joined: 29-October 03
Member No.: 1,717



Thanks in advance for what's probably a simple yes/no answer wink.gif.

The situation is...

I have a Debian box, runs a game server.

Said game server stays active in the terminal session that launches it.

There's no easy and bug free remote management utility for said game server, so my idea is to set up some custom commands in usermin to let other users of the server change the map, change the mod the game runs, etc.

So, running these commands from usermin, it's necessary to start the server in a detached screen session, since the server needs a terminal session to run in and since it's started from a webpage it has no terminal session otherwise and goes defunct. This works to start the server just fine, and it can be stopped by doing a killall on the screen process, so that's also fine.

The next step, though, is being able to send commands to the game terminal with usermin/webmin custom commands.

Is it possible to send text and/or commands to a detached screen session without re-attaching it? The screen man page seems to hint that this is possible with the -X switch, but the documentation is a bit sketchy on that option, I'm not sure whether it'll take any text or system command or only screen commands, and all tinkering i've done with the -X switch has failed.

Can this be done or not?
Go to the top of the page
 
+Quote Post
garskoci
post Oct 29 2003, 01:40 PM
Post #2


Whats this Lie-nix Thing?
*

Group: Members
Posts: 10
Joined: 29-May 03
Member No.: 903



Which game are you running? I run a SOF2 server. To send commands, I send messages to the TCP/IP port. This is done through a small Perl script that I started and continually improve. What type of commands are you trying to use?
Go to the top of the page
 
+Quote Post
Corey
post Oct 29 2003, 02:25 PM
Post #3


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 1,254
Joined: 21-September 02
From: St John's, Newfoundland, Canada
Member No.: 3



I run a Quake3 Urban Terror server, so I wrote an eggdrop module that accepts rcon (remote console) commands on irc (password protected of course) and executes them on the game server.

It would help more if we knew what said game was.


--------------------
Corey Quilliam
(former) Linuxhelp.ca Administrator
cquilliam-AT-gmail-dot-com

Want to help out Linuxhelp.net? Check out our Linuxhelp Wiki and see if there are some articles you would like to submit!!

--
Ubuntu 8.04 64-bit - Work Laptop (HP-Compaq NC6400 Core2)
Kubuntu 8.04 64-bit - Desktop (HP m8120n QuadCore)
Ubuntu 6.04 - Server (I'm not upgrading this baby until support runs out in 2012) (Some old POS dell)
Go to the top of the page
 
+Quote Post
Xayd
post Oct 29 2003, 06:45 PM
Post #4


Whats this Lie-nix Thing?
*

Group: Members
Posts: 3
Joined: 29-October 03
Member No.: 1,717



The game is battlefield 1942, it's not system commands that need to be sent to it, just some stuff specific to the server (for instance admin.kickplayer, admin.changemap (mapname), etc.).
Go to the top of the page
 
+Quote Post
garskoci
post Oct 30 2003, 02:16 PM
Post #5


Whats this Lie-nix Thing?
*

Group: Members
Posts: 10
Joined: 29-May 03
Member No.: 903



Are the commands rcon commands?
Go to the top of the page
 
+Quote Post
Xayd
post Nov 1 2003, 08:59 AM
Post #6


Whats this Lie-nix Thing?
*

Group: Members
Posts: 3
Joined: 29-October 03
Member No.: 1,717



Yeah, they would be, and remote console on the server is enabled on a specific port.

After further testing it seems that the screen -X switch does in fact only accept commands recognized by screen, so an external method of sending commands is gonna have to be the answer it seems.
Go to the top of the page
 
+Quote Post
Corey
post Nov 1 2003, 01:36 PM
Post #7


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 1,254
Joined: 21-September 02
From: St John's, Newfoundland, Canada
Member No.: 3



Well, i'll be happy to share with you what I did to use remote console commands through an IRC bot, i'm sure without too much effort, you should be able to port that to php or something.


--------------------
Corey Quilliam
(former) Linuxhelp.ca Administrator
cquilliam-AT-gmail-dot-com

Want to help out Linuxhelp.net? Check out our Linuxhelp Wiki and see if there are some articles you would like to submit!!

--
Ubuntu 8.04 64-bit - Work Laptop (HP-Compaq NC6400 Core2)
Kubuntu 8.04 64-bit - Desktop (HP m8120n QuadCore)
Ubuntu 6.04 - Server (I'm not upgrading this baby until support runs out in 2012) (Some old POS dell)
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 12th December 2017 - 01:13 PM