LCKB
Installing Screen on Putty - Printable Version

+- LCKB (https://lckb.dev/forum)
+-- Forum: ** OLD LCKB DATABASE ** (https://lckb.dev/forum/forumdisplay.php?fid=109)
+--- Forum: Guides & Help Section (https://lckb.dev/forum/forumdisplay.php?fid=193)
+---- Forum: Help & Support (https://lckb.dev/forum/forumdisplay.php?fid=157)
+----- Forum: Ep2 Support (https://lckb.dev/forum/forumdisplay.php?fid=166)
+------ Forum: Solved Topics (https://lckb.dev/forum/forumdisplay.php?fid=144)
+------ Thread: Installing Screen on Putty (/showthread.php?tid=2087)



- halohalo - 06-24-2013


Hey guys, i have installed screen on Putty, but then, how i start the server or open the screen? I coudnt find any command for it, i tried "screen" only but it only shows a black screen for more commands ;/

 

Hope someone can help me out

 

Thank you




- pwesty - 06-24-2013


screen -r for resuming a detached one or screen -x for starting a new one

 

 

and im almost certain screen --help will display all possible commands




- halohalo - 06-24-2013

The problem is that if i start usa gameserver on putty then i cant use any other command to close it like: logout, exit, nothing...anyway to close it and keep it on? or to fix it




- pwesty - 06-24-2013

the startService.sh is a script that was made for that reason which was released with the german files in the main folder




- halohalo - 06-24-2013

Its fixed, we had to made "startx" and then we have be able to start the Screen^^




- HateMe - 06-24-2013


a start script for screen...

 

 

 

PATH=/bin:/usr/bin:/sbin:/usr/sbin

#
# DONT FORGET TO CHANGE THE PATH TO YOUR NEEDS!
DIR=/home/lcserver/Connector

#
DAEMON=$DIR/run

PARAMS=" connector_test start &"

NAME=USA_LCConnector_Fun
DESC="USA_LC Connector_Fun"

case "$1" in
 start)
   if [[ `screen -ls |grep $NAME` ]]
   then
    echo "Already Running!!!"
   else
       echo "Starting $DESC: $NAME"
       
    if [ -e $DIR ];
           then
            cd $DIR
           screen -d -m -S $NAME $DAEMON $PARAMS
           else echo "No such directory: $DIR!"
    fi
   fi
   ;;

 stop)
   if [[ `screen -ls |grep $NAME` ]]
   then
       echo -n "Stopping $DESC: $NAME"
    screen -r ${NAME} -X quit
       echo " ... done."
   else
       echo "Coulndt find a running $DESC"
   fi
   ;;

 restart)
   if [[ `screen -ls |grep $NAME` ]]
   then
       echo -n "Stopping $DESC: $NAME"
    screen -r ${NAME} -X quit
       echo " ... done."
   else
       echo "Coulndt find a running $DESC"
   fi
   
   echo -n "Starting $DESC: $NAME"
   cd $DIR
   screen -d -m -S $NAME $DAEMON $PARAMS
   echo " ... done."
   ;;
 
 status)
   ps aux | grep -v grep | grep $NAME | grep SCREEN > /dev/null
   CHECK=$?
   [ $CHECK -eq 0 ] && echo "Server is UP" || echo "Server is DOWN"
   ;;

console)
       if [[ `screen -ls |grep $NAME` ]]
       then
       screen -r $NAME    
       else
    echo "Coulndt find a running $DESC"
    fi
   ;;
 
 *)
   echo "Usage: $0 {start|stop|status|restart|console}"
   exit 1
   ;;
esac

exit 0