GNU screen

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(+link)
(External links: +link)
 
(19 intermediate revisions by one user not shown)
Line 1: Line 1:
'''GNU screen''' is a default installed tool in [[SHR]].
+
'''GNU screen''' is a [http://en.wikipedia.org/wiki/VT100 VT100] terminal multiplexer, default installed tool in [[SHR]]. The started terminal processes are [http://en.wikipedia.org/wiki/Persistence_%28computer_science%29 persistent] and shareable.
  
It can among others be used to make a virtual VT100 terminal, for seriel communication or e.g. via SSH:
+
It can, among others, be used for making [http://en.wikipedia.org/wiki/Virtual_terminal virtual terminal]s, and to do serial communication with a physical or virtual [http://en.wikipedia.org/wiki/Serial_port serial port] (typical RS-232):
 
*man screen
 
*man screen
 +
 +
Typical test if any GNU screen processes exist:
 +
screen -list
 +
# Response:
 +
# No Sockets found in /tmp/screens/S-root.
 +
 +
Typical usage:
 +
screen
 +
# Response:
 +
# Screen version 4.00.03 (FAU) 23-Oct-06
 +
# ...
 +
# [Press Space or Return to end.]
 +
# Do either of this to enter the created GNU screen.
 +
 +
screen -list
 +
# There is a screen on:
 +
#      8291.pts-3.om-gta02    ('''Attached''')
 +
# 1 Socket in /tmp/screens/S-root.
 +
 +
On purpose disconnect a GNU screen process:
 +
<ctrl>a d
 +
# Response: [detached]
 +
# You should see the terminal in a former [different] state.
 +
 +
See if the disconnection worked:
 +
screen -list
 +
# There is a screen on:
 +
#        8291.pts-3.om-gta02    ('''Detached''')
 +
# 1 Socket in /tmp/screens/S-root.
 +
 +
Reconnect to a GNU screen:
 +
screen -RD 8291
 +
# You should see the terminal in another [different] state.
 +
 +
Make update and upgrade in the GNU screen process:
 +
opkg update;opkg upgrade;sync;sync;sync
 +
# Sync info:
 +
# http://www.oreillynet.com/linux/cmd/cmd.csp?path=s/sync
 +
# I think it will prevent data loss, if FR looses power/undergoes unclean power off,
 +
# after a complete sleep uninterrupted upgrade.
 +
 +
If you now loose ssh connection to your FR it does not matter - the upgrade proceeds (as long as the FR does not sleep - if the touchscreen goes black please tap the touchscreen to prevent sleep).
 +
 +
If you do loose the ssh connection, you ought to be able to restart the wi-fi interface, start a ssh connection to FR and reconnect to GNU screen process and see the last couple of lines and see how the upgrade ended.
  
 
==External links==
 
==External links==
 +
*[http://www.youtube.com/watch?v=b2nZdChQvAs YouTube - The Joy of Screen]
 +
*[http://www.youtube.com/watch?v=yqysa6oq80o YouTube - How to you use the gnu/screen]
 
*http://en.wikipedia.org/wiki/GNU_Screen
 
*http://en.wikipedia.org/wiki/GNU_Screen
*http://freshmeat.net/projects/screen/
 
 
*http://www.gnu.org/software/screen/
 
*http://www.gnu.org/software/screen/
*http://www.gnu.org/software/screen/manual/
+
** [http://www.gnu.org/software/screen/manual/ manual]
*http://www.gnu.org/software/screen/manual/screen.html
+
** [http://freshmeat.net/projects/screen/ freshmeat.net: download]
 
*MacOS X: [http://www.macosxhints.com/article.php?story=20061109133825654 Nov 14 2006, macosxhints.com: Use 'screen' as a serial terminal emulator Network]
 
*MacOS X: [http://www.macosxhints.com/article.php?story=20061109133825654 Nov 14 2006, macosxhints.com: Use 'screen' as a serial terminal emulator Network]
  
 
[[Category:Developer resources]]
 
[[Category:Developer resources]]

Latest revision as of 19:27, 10 December 2010

GNU screen is a VT100 terminal multiplexer, default installed tool in SHR. The started terminal processes are persistent and shareable.

It can, among others, be used for making virtual terminals, and to do serial communication with a physical or virtual serial port (typical RS-232):

  • man screen

Typical test if any GNU screen processes exist:

screen -list
# Response:
# No Sockets found in /tmp/screens/S-root.

Typical usage:

screen
# Response:
# Screen version 4.00.03 (FAU) 23-Oct-06
# ...
# [Press Space or Return to end.]
# Do either of this to enter the created GNU screen.
screen -list
# There is a screen on:
#       8291.pts-3.om-gta02     (Attached)
# 1 Socket in /tmp/screens/S-root.

On purpose disconnect a GNU screen process:

<ctrl>a d
# Response: [detached]
# You should see the terminal in a former [different] state.

See if the disconnection worked:

screen -list
# There is a screen on:
#        8291.pts-3.om-gta02     (Detached)
# 1 Socket in /tmp/screens/S-root.

Reconnect to a GNU screen:

screen -RD 8291
# You should see the terminal in another [different] state.

Make update and upgrade in the GNU screen process:

opkg update;opkg upgrade;sync;sync;sync
# Sync info:
# http://www.oreillynet.com/linux/cmd/cmd.csp?path=s/sync
# I think it will prevent data loss, if FR looses power/undergoes unclean power off,
# after a complete sleep uninterrupted upgrade.

If you now loose ssh connection to your FR it does not matter - the upgrade proceeds (as long as the FR does not sleep - if the touchscreen goes black please tap the touchscreen to prevent sleep).

If you do loose the ssh connection, you ought to be able to restart the wi-fi interface, start a ssh connection to FR and reconnect to GNU screen process and see the last couple of lines and see how the upgrade ended.

[edit] External links

Personal tools