Screen

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Created page with "{{Quicklinks}} {{thirdparty}} = GNU Screen = GNU Screen is a powerful terminal multiplexer that allows you to create, manage, and control multiple terminal instances (or wind...")
 
m
 
(3 intermediate revisions by one user not shown)
Line 1: Line 1:
{{Quicklinks}}
+
{{Quicklinks|Screen}}
 
{{thirdparty}}
 
{{thirdparty}}
 
= GNU Screen =
 
= GNU Screen =
  
GNU Screen is a powerful terminal multiplexer that allows you to create, manage, and control multiple terminal instances (or windows), each running a separate program, from a single screen. With Screen, you can detach sessions from the terminal so that they continue running in the background, and later reattach to them. This feature is especially useful for long-running processes that should not be interrupted. A comprehensive guide can be found here: [Ubuntu Users - Screen](https://wiki.ubuntuusers.de/Screen/).
+
GNU Screen is a powerful terminal multiplexer that allows you to create, manage, and control multiple terminal instances (or windows), each running a separate program, from a single screen. With Screen, you can detach sessions from the terminal so that they continue running in the background, and later reattach to them. This feature is especially useful for long-running processes that should not be interrupted. A comprehensive guide can be found here: [https://help.ubuntu.com/community/Screen Screen].
  
 
Many users utilize GNU Screen to run OpenSimulator, as it provides an effective way to organize multiple sessions while keeping track of them all.
 
Many users utilize GNU Screen to run OpenSimulator, as it provides an effective way to organize multiple sessions while keeping track of them all.
Line 10: Line 10:
 
To install GNU Screen, use the following command:
 
To install GNU Screen, use the following command:
  
  bash
+
  #!/bin/bash
 
  sudo apt-get install screen
 
  sudo apt-get install screen
  
 
You can check the installed version with the following command:
 
You can check the installed version with the following command:
  
  bash
+
  #!/bin/bash
 
  screen -v
 
  screen -v
  
Line 21: Line 21:
 
To start a new OpenSim session with GNU Screen, you can use the following commands:
 
To start a new OpenSim session with GNU Screen, you can use the following commands:
  
  bash
+
  #!/bin/bash
  # Start a new OpenSimulator instance.
+
  # Start a new OpenSimulator 0.9.3 instance.
 
  screen -fa -S OpenSim -d -U -m dotnet OpenSim.dll
 
  screen -fa -S OpenSim -d -U -m dotnet OpenSim.dll
  # Start an old OpenSimulator instance.
+
  # Start an old OpenSimulator 0.9.2 instance.
 
  screen -fa -S OpenSim -d -U -m mono OpenSim.exe
 
  screen -fa -S OpenSim -d -U -m mono OpenSim.exe
  
  # Start a new Robust server.
+
  # Start a new Robust 0.9.3 server.
 
  screen -fa -S ROBUST -d -U -m dotnet Robust.dll
 
  screen -fa -S ROBUST -d -U -m dotnet Robust.dll
  # Start an old Robust server.
+
  # Start an old Robust 0.9.2 server.
 
  screen -fa -S ROBUST -d -U -m mono Robust.exe
 
  screen -fa -S ROBUST -d -U -m mono Robust.exe
  
Line 36: Line 36:
 
To reconnect to an existing OpenSim session, use the command:
 
To reconnect to an existing OpenSim session, use the command:
  
  bash
+
  #!/bin/bash
 
  screen -r OpenSim
 
  screen -r OpenSim
  
Line 43: Line 43:
 
To safely shut down OpenSimulator or Robust, you can use the following commands:
 
To safely shut down OpenSimulator or Robust, you can use the following commands:
  
  bash
+
  #!/bin/bash
 
  # Safely shut down OpenSimulator. The character ^M stands for Return/Enter.
 
  # Safely shut down OpenSimulator. The character ^M stands for Return/Enter.
 
  screen -S OpenSim -p 0 -X eval "stuff 'shutdown'^M"
 
  screen -S OpenSim -p 0 -X eval "stuff 'shutdown'^M"
Line 51: Line 51:
 
For safer handling in case the sessions are not found, you can use these commands:
 
For safer handling in case the sessions are not found, you can use these commands:
  
  bash
+
  #!/bin/bash
 
  # Safely shut down OpenSimulator and issue a warning if it is not found.
 
  # Safely shut down OpenSimulator and issue a warning if it is not found.
 
  screen -S OpenSim -p 0 -X eval "stuff 'shutdown'^M" || echo "OpenSim not found."
 
  screen -S OpenSim -p 0 -X eval "stuff 'shutdown'^M" || echo "OpenSim not found."
Line 59: Line 59:
 
If an OpenSimulator or Robust process has crashed and you need to kill the session, you can use the following commands (note that any data that would have been written during shutdown will be lost):
 
If an OpenSimulator or Robust process has crashed and you need to kill the session, you can use the following commands (note that any data that would have been written during shutdown will be lost):
  
  bash
+
  #!/bin/bash
 
  # Kill the OpenSimulator screen.
 
  # Kill the OpenSimulator screen.
 
  screen -X -S OpenSim kill
 
  screen -X -S OpenSim kill

Latest revision as of 07:47, 5 November 2024


Contents

[edit] GNU Screen

GNU Screen is a powerful terminal multiplexer that allows you to create, manage, and control multiple terminal instances (or windows), each running a separate program, from a single screen. With Screen, you can detach sessions from the terminal so that they continue running in the background, and later reattach to them. This feature is especially useful for long-running processes that should not be interrupted. A comprehensive guide can be found here: Screen.

Many users utilize GNU Screen to run OpenSimulator, as it provides an effective way to organize multiple sessions while keeping track of them all.

[edit] Installation

To install GNU Screen, use the following command:

#!/bin/bash
sudo apt-get install screen

You can check the installed version with the following command:

#!/bin/bash
screen -v

[edit] Starting Sessions

To start a new OpenSim session with GNU Screen, you can use the following commands:

#!/bin/bash
# Start a new OpenSimulator 0.9.3 instance.
screen -fa -S OpenSim -d -U -m dotnet OpenSim.dll
# Start an old OpenSimulator 0.9.2 instance.
screen -fa -S OpenSim -d -U -m mono OpenSim.exe
# Start a new Robust 0.9.3 server.
screen -fa -S ROBUST -d -U -m dotnet Robust.dll
# Start an old Robust 0.9.2 server.
screen -fa -S ROBUST -d -U -m mono Robust.exe

To detach the OpenSim session, press the key combination `Ctrl+a d`.

To reconnect to an existing OpenSim session, use the command:

#!/bin/bash
screen -r OpenSim

[edit] Ending Sessions

To safely shut down OpenSimulator or Robust, you can use the following commands:

#!/bin/bash
# Safely shut down OpenSimulator. The character ^M stands for Return/Enter.
screen -S OpenSim -p 0 -X eval "stuff 'shutdown'^M"
# Safely shut down Robust.
screen -S ROBUST -p 0 -X eval "stuff 'shutdown'^M"

For safer handling in case the sessions are not found, you can use these commands:

#!/bin/bash
# Safely shut down OpenSimulator and issue a warning if it is not found.
screen -S OpenSim -p 0 -X eval "stuff 'shutdown'^M" || echo "OpenSim not found."
# Safely shut down Robust and issue a warning.
screen -S ROBUST -p 0 -X eval "stuff 'shutdown'^M" || echo "Robust not found."

If an OpenSimulator or Robust process has crashed and you need to kill the session, you can use the following commands (note that any data that would have been written during shutdown will be lost):

#!/bin/bash
# Kill the OpenSimulator screen.
screen -X -S OpenSim kill
# Kill the Robust screen.
screen -X -S ROBUST kill

[edit] Conclusion

GNU Screen is an essential tool for managing multiple terminal sessions and is particularly well-suited for applications like OpenSimulator. It provides an easy way to detach, share, and log sessions. With Screen, you can significantly improve your workflows and maintain control over long-running processes.

Personal tools
General
About This Wiki