LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-31-2004, 09:48 PM   #1
sdouble
LQ Newbie
 
Registered: Sep 2003
Distribution: Fedora Core 3
Posts: 23

Rep: Reputation: 15
Help with Screen?


I have a game server that I want to start and be able to go back to later. I understand I can do this with the screen command. Well, screen didn't come installed and I got around to installing it but now I can't figure out how to actually create a screen to come back to later on.

I've tried and tried by looking at the man page and even looked on google for an example and even copied the example and used it with the appropriate file but still no go.

Can anyone give me a hand here? The game server is a half life server.

to run it, I use ./hlds_run -game dod +maxplayers 6 +map dod_switch

Thanks a bunch!
 
Old 06-01-2004, 03:06 PM   #2
huibert.alblas
Member
 
Registered: Jan 2004
Location: Duesseldorf /Germany
Distribution: Gentoo amd64 / Debian
Posts: 226

Rep: Reputation: 30
Hi,

screen uses a lot of cryptic keycombination to run,
you will get the hang of them quiet quickly.

"Simple Screen session:"

type "screen" to start a screen,

You can issue commands from here.
Think of screen as a kind of console windowmanager.

to get another screen (so you have to simultanious screens)
Hold the "CRTL" key and type "a" then "c", then release the "ctrl"- key.
To hop between the various screens use:
"ctrl" then "a" then "n",

Think of the "ctrl" "a" kombination as a sort of screen-command.
To read the online help:
"ctrl" then "a" then "?"

To leave your runing screen (but to leave any programms inside your screen running, and to be able to connect to it later)
issue a "ctrl" - "a" - "d".

To enter your screen again:

"screen -x", and your back again.

I hope you get the picture,
this should get you started.
 
Old 06-01-2004, 08:11 PM   #3
sdouble
LQ Newbie
 
Registered: Sep 2003
Distribution: Fedora Core 3
Posts: 23

Original Poster
Rep: Reputation: 15
Hahaha, it doesn't get much easier than that. I was all trying to figure out the arguments to send to it while opening files etc. Well, how do I disconnect the sessions? Is there a way to make them "dead" so I can use -wipe on them? Thanks for the help man! =D
 
Old 06-02-2004, 04:19 AM   #4
huibert.alblas
Member
 
Registered: Jan 2004
Location: Duesseldorf /Germany
Distribution: Gentoo amd64 / Debian
Posts: 226

Rep: Reputation: 30
Hi,

nice to see someone having fun with screen :-)
I don't know exactly what you mean by dissconnect the session...

If you want to kill the running gameserver,
you can use "ps ax" or "pgrep" stuff to find the pid,
and kill them from inside or outside a runnig screen.

so to start the gameserver in a screen:

"screen ./hlds_run -game dod +maxplayers 6 +map dod_switch"

and to kill the running server:

"kill `pgrep hlds_run`"
(note the backticks in the last command)
 
Old 06-02-2004, 05:23 PM   #5
sdouble
LQ Newbie
 
Registered: Sep 2003
Distribution: Fedora Core 3
Posts: 23

Original Poster
Rep: Reputation: 15
Ah, I figured out what I want to do. Basically I just wanted to find a way to close the screen session and in the man pages it showed C-a C-k to kill (whish didn't work) and also C-a \ or something similar to that (which also didn't work). I found out just typing "exit" in the screen will kill it. I just didn't want to have to do go to the screen I want to close and do screen -ls to find the attached one, then deattach it, then kill screenpidhere to close them. I ran across it by accidentally trying to logout by typing "logout" while in a screen and it said it was an invalid command. So I tried "exit" and it closed the screen session. =D It's even more fun when you accidentally stumble across your answer. heheh

Thanks again for all of your help. It's sad that I'm finding so much enjoyment in this... =P
 
Old 06-07-2004, 02:41 PM   #6
Fame
LQ Newbie
 
Registered: Jun 2004
Posts: 2

Rep: Reputation: 0
try opening the screen (screen -r). To stop the process hold ctrl and press c

Many gameservers merely restart when you type exit .. make sure you did in fact kill the process rather than just restart it.
 
Old 06-07-2004, 03:53 PM   #7
DropSig
Member
 
Registered: Apr 2004
Location: East of Quebec
Distribution: Ubuntu, Centos
Posts: 208

Rep: Reputation: 30
I found that pretty interresting, as i did'nt know about "screen". But is'nt it like opening more than one terrminal emulator in one konsole (Ctrl alt n on my cpu...)
 
Old 06-08-2004, 07:18 AM   #8
Fame
LQ Newbie
 
Registered: Jun 2004
Posts: 2

Rep: Reputation: 0
Pretty much, yes. You attach and detach the window (screen -r & ctrl+a+d respectively)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I messed with the screen resolution and now Redhat will boot into a black screen! Mr. Hill Linux - Newbie 29 05-04-2009 11:52 AM
Startx results in a black screen with VGA and screen errors kwosource Linux - Newbie 4 03-11-2005 02:58 PM
How to turn off screen blanking screen saver in run level 3? Arodef Linux - Software 1 01-04-2005 12:50 PM
Unable to configure screen resolution for 15.2" LCD screen in Fedore Core 1 schu Linux - Newbie 3 01-02-2004 05:39 PM
add screen / screen init not found for device 0 jamaso Slackware 5 12-29-2002 05:46 PM


All times are GMT -5. The time now is 05:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration