There is a comment on Nanalegumene's
site which says screen wouldn't work on the mybook so we should use dtach.
I found dtach to be inadequate for my needs. So I decided to hack out a way to
make it work.
Having gotten it working here's what I did (as root).
Make sure you are in superuser mode
# wget http://ftp.uni-erlangen.de/pub/utilities/screen/screen-4.0.3.tar.gz # tar -xvf screen-4.0.3.tar.gz # cd screen-4.0.3 # ./configure
Now you have to edit the pty.c file using your favorite editor.
You might have to use vi pty.c if you haven't installed nano.
On line 38 it reads # include.
You have to comment that out by surrounding it with slash star as in:
/* # include */The reason being the make will fail because
stropts.h is not included in your /sys directory.
By examining the 38th line of pty.c we find that stropts.h is called when
HAVE_SVR4_PTYS exists. I don't know how to counteract that another way besides
removing that include.
you might want to edit /etc/screenrc with your favorite editor.
# make # make instal # install -m 644 etc/etcscreenrc /etc/screenrc
I'm not sure why make install didn't install screen somewhere on the path. But running locate didn't find it anywhere but the source directory.
# cp ./screen /bin
That's it. You now have a functioning terminal multiplexor with all the trimmings.
Start putty and login as root.
To start a new screen shell:
# screen -R -D
Screen
[CTRL]-a d (detach) Detach screen from this terminal. [CTRL]-a [CTRL]-k (kill) Destroy current window.
Resuming a detached screen session:
# screen -r
Usefull commands:
# screen -list : prints a list of pid.tty.host strings identifying your screen sessions. # screen -wipe : removes destroyed sessions instead of marking them as `dead'.