Skip to main content
100%

always load screen when session starts

✓ Published0🌍 Public
Aanatolyg
Last edited Mar 15, 2012
Created on Mar 15, 2012

This example demonstrates a shell-script configuration that ensures a persistent terminal session automatically loads whenever a user starts a new login shell. It shows a conditional check on the `$TERM` environment variable to detect whether the session is already running inside GNU Screen, a terminal multiplexer. If not, the script invokes the `screen` command with the `-xRR` flags, which reattaches to an existing session or creates a new one while detaching other connections. The code resides in the user’s `.bashrc` file, relying on standard Bash conditional logic and the Screen application’s command-line interface.

AI-generated description

Similar vizzes