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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
11-30-2009, 11:04 AM
|
#1
|
LQ Newbie
Registered: Nov 2009
Posts: 13
Rep:
|
Closing Putty but server keepts running
hello i'm running my moparscape server now on putty with gives me SSH connection and i'm wondering if there is a way that i could turn off my pc but the server would stil be running i can use logout command that doesnt work
|
|
|
11-30-2009, 12:01 PM
|
#2
|
Member
Registered: Dec 2008
Distribution: LFS
Posts: 99
Rep:
|
If I understand it correctly, you have moparscape server machine to which you are connected via SSH protocol using putty client. And you want remotely shut this machine down. To do so, issue . Note: you need to be root to run this command.
|
|
|
11-30-2009, 12:14 PM
|
#3
|
LQ Newbie
Registered: Nov 2009
Posts: 13
Original Poster
Rep:
|
where and when i need to enter it?
|
|
|
11-30-2009, 12:27 PM
|
#4
|
Member
Registered: Dec 2008
Distribution: LFS
Posts: 99
Rep:
|
If you are connected to that server, just type halt and press enter.
Putty should provide you with terminal uppon connection.
|
|
|
11-30-2009, 12:32 PM
|
#5
|
LQ Newbie
Registered: Nov 2009
Posts: 13
Original Poster
Rep:
|
well i run the server i type halt and when i lcose the server goes offline or am i doing domething wrong?
|
|
|
11-30-2009, 12:39 PM
|
#6
|
Member
Registered: Dec 2008
Distribution: LFS
Posts: 99
Rep:
|
Well, maybe I didnt understand what you want. I thought you want to swith the server (= moparscape machine) off. But by your confusion I see that is not the case. So can you be more specific what exactlu you want to turn off?
|
|
|
11-30-2009, 12:41 PM
|
#7
|
LQ Newbie
Registered: Nov 2009
Posts: 13
Original Poster
Rep:
|
i want to turn off my pc and the server must still be running thats what i want
|
|
|
11-30-2009, 12:44 PM
|
#8
|
LQ Guru
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
|
Hi,
Just type
when logged in with Putty and close Putty. The server will still be running and you'll be able to connect whenever you want.
Kind regards,
Eric
|
|
|
11-30-2009, 12:45 PM
|
#9
|
Member
Registered: Dec 2008
Distribution: LFS
Posts: 99
Rep:
|
Then I dont understand the problem. Server should be running regardless, whether you are connected via putty or not. What happens, when you log off of the server?
Or do you want to run some task on the server and keep it running even when logging off?
|
|
|
11-30-2009, 12:50 PM
|
#10
|
Member
Registered: Dec 2008
Distribution: LFS
Posts: 99
Rep:
|
Well, my error. I though that moparscape is some Linux distro, unknown to me. Shame on me.
Use to run it. Full recomended command is
Code:
nohup your_program > file.out 2> err.out < /dev/null &
so that way you can be sure that you do not lose all outputs and nothing will disturbe your server.
|
|
|
11-30-2009, 12:50 PM
|
#11
|
Moderator
Registered: Aug 2002
Posts: 26,911
|
Your question is somewhat vague but I assume you are starting the server via Putty and because you close the session moparscape quits running too. You can use nohup to keep an application from closing i.e.
nohup moparscape & (replace moparscape with the exact command used to start the server)
|
|
|
11-30-2009, 12:53 PM
|
#12
|
LQ Guru
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
|
Don't be ashamed, I was mislead by the OP's unclear description too.
Good call!
Kind regards,
Eric
|
|
|
11-30-2009, 12:56 PM
|
#13
|
LQ Newbie
Registered: Nov 2009
Posts: 13
Original Poster
Rep:
|
with that command the server doesnd even start
i'm using command sh sh.sh
here's the inside of the sh file:
Code:
#!/bin/sh
java -Xmx512m server
maby this will help you
|
|
|
11-30-2009, 01:00 PM
|
#14
|
LQ Newbie
Registered: Nov 2009
Posts: 13
Original Poster
Rep:
|
hmm i get this
Code:
joomlascape:~# nohup sh sh.sh
nohup: ignoring input and appending output to `nohup.out'
|
|
|
11-30-2009, 01:32 PM
|
#15
|
Member
Registered: Dec 2008
Distribution: LFS
Posts: 99
Rep:
|
The problem is, that you want to run but nohup treats the second parametr as input parameter of nohup. So in your case it only starts Make that sh.sh executable by running and you can run it by
|
|
|
All times are GMT -5. The time now is 07:47 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|