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
> Programs Closed After Ssh Logout
borg2of7
post Apr 18 2005, 11:36 AM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 2
Joined: 18-April 05
Member No.: 4,887



Hello guys!

I've got an SSH access to Slackware Linux Server and I've got a Gameserver running on it.
The Servertool is started from the root account and it works fine. I can also run it without problems via my SSH account but when I close the SSH connection the Server terminates the process. How can I logout and keep the programs running? I and my friend, who owns the server, haven't got any ideas anymore.

Hope someone in here can help me.


Borg
Go to the top of the page
 
+Quote Post
Corey
post Apr 18 2005, 12:45 PM
Post #2


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

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



Well, you have two options that i know of:

a)
You can send the processes to the background and then bring them to the foreground when you want to work on it. You can do this like the following:

./binaryfile &

The & sign sends the process to the background, which you can later retrieve with:

fg

For further info on this, check out the man pages.

B)
The second, and probably best way of doing this is to install the "screen" utility. Chances are, this is installed by default, and if it isn't, it should be easily available for your distro. So, after installing, go ahead and open your shell, and type in:

screen

Depending on your install, you'll either be greeted with a screen asking you to "Press Space or Return to end" (just hit space), or it will dump you right back to the shell again. When you are back at the shell, you are actually still inside the screen program. So, go ahead and run your server program:

./binaryfile

And you'll see that starting up. From here, you can go ahead and type:

Ctrl+A and then press D

The "Ctrl+A" is the command prefix, and "D" tells the program to "detach". When you do this, you're dumped right back to the shell again. From here, you can log off, or whatever. The next time you login, do:

screen -r

Which will "re-attach" you're screen.

This is a pretty simple explanation of screen, there is tons of more info in the man page.

Out of these two suggestion, i would definitly recommend you use screen, it's easier, nicer and cleaner to work with.

Any questions, let me know.


--------------------
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
borg2of7
post Apr 18 2005, 01:16 PM
Post #3


Whats this Lie-nix Thing?
*

Group: Members
Posts: 2
Joined: 18-April 05
Member No.: 4,887



Method B works fine! Thanks You smile.gif
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: 17th December 2017 - 01:20 AM