|
Screen
|
|
03-27-2012, 09:46 AM
|
|||
|
|||
|
Screen
Does anyone know how to start a new screen with the name mc and then run a command in it?
I've been trying Code: screen -S 'mc' -d -m java -jar /home/mc/minecraft/craftbukkit.jarBut it's not working. |
|||
|
03-27-2012, 11:28 AM
(This post was last modified: 03-27-2012 11:42 AM by aatish910.)
|
|||
|
|||
|
RE: Screen
Start screen without any options and then run the command. Then, disconnect the SSH connection. The command will continue running.
I got it. Code: screen -S 'mc' -p 0 -X commandDon't worry about the world coming to an end today. It's already tomorrow in Australia. |
|||
|
03-27-2012, 01:41 PM
|
|||
|
|||
RE: Screen
[root@test ~]# screen -S 'mc' -p 0 -X echo test |
|||
|
03-27-2012, 02:09 PM
|
|||
|
|||
|
RE: Screen
This doesn't work unless a screen session has been started. You can put that in .screenrc or setup a bash script to invoke a screen first snd send the command using the above flags. Are you trying to create a cron job?
Don't worry about the world coming to an end today. It's already tomorrow in Australia. |
|||
|
03-27-2012, 02:39 PM
|
|||
|
|||
|
RE: Screen
No, this would be a start-up script for a Minecraft server.
When they execute the script, it will start a new screen named mc and run java -jar craftbukkit.jar |
|||
|
03-27-2012, 02:49 PM
|
|||
|
|||
|
RE: Screen
Did you look at the init script I sent you?
KVM1 (VPS15/19/25 node) Munin report |
|||
|
03-27-2012, 03:02 PM
|
|||
|
|||
|
RE: Screen
Inside your init script, it's:
screen -dmS minecraft /minecraft/rtoolkit.sh I modified that to be: screen -dmS minecraft 'java -jar craftbukkit.jar' However, when I do screen -r, it says that there are no screens to be resumed. |
|||
|
03-27-2012, 03:35 PM
(This post was last modified: 03-27-2012 03:37 PM by f8ll.)
|
|||
|
|||
|
RE: Screen
What happens when you run "java -jar" ? It may be that the screen session is closing since java exits or has an error or something.\
Edit: Also keep in mind that if its in the init script, you need an absolute path to craftbukkit.jar specified Edit 2: FYI, screen -ls will list the screen sessions for the current user. |
|||
|
03-27-2012, 03:35 PM
|
|||
|
|||
|
RE: Screen
What about do screen -x
Quality VPS and Shared Hosting at MitiHost.com FreeVPS, for give me a good vps ............... |
|||
|
03-27-2012, 03:37 PM
(This post was last modified: 03-27-2012 03:38 PM by DeathProxy.)
|
|||
|
|||
|
RE: Screen
Oh!
I forgot to set the privvmpages to 700M for the OpenVZ container that I was testing it in, so it kept running out of memory. Thanks! EDIT: For me, it's just a bash script. |
|||
|
« Next Oldest | Next Newest »
|
| User(s) browsing this thread: |
| 1 Guest(s) |






