You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- name: "MEDIUM | RHEL-08-020041 | PATCH | RHEL 8 must ensure session control is automatically started at shell initialization. | Set tmux.sh if file exists"
The system is configured to execute tmux at this line:
case "$name" in (sshd|login) exec tmux ;; esac
In situations where a person is logged, gets disconnected, and re-connects, the system executes a new tmux session.
This creates confusion as the user tries to reconnect to their previous sessions (if they are tmux savvy), or additional frustration as they (believe) they have lost their previous work (probably not true).
Changing this line to this:
case "$name" in (sshd|login) tmux a || exec tmux ;; esac
...will run tmux a to re-attach to the users pre-existing session if it exists, but if it doesn't then the exec tmux will execute the new tmux session as required.
This is related to #232 and whenever that issue is resolved, this would be a welcome enhancement to the handling of the tmux sessions for any of us who are in the command line on systems with intermittent connectivity issues.
The text was updated successfully, but these errors were encountered:
dglinder
changed the title
Reduce multiple tmux sessions
Reduce unnecessary tmux sessions
Sep 17, 2024
Thank you again for this issue. The fix has been applied and is now in the main branch and release. I will close this issue, Please reopen if you feel this is not resolved.
In this task within the
fix-cat2.yml
playbook, specifically line 3340:RHEL8-STIG/tasks/fix-cat2.yml
Lines 3332 to 3344 in 461d572
The system is configured to execute
tmux
at this line:In situations where a person is logged, gets disconnected, and re-connects, the system executes a new
tmux
session.This creates confusion as the user tries to reconnect to their previous sessions (if they are
tmux
savvy), or additional frustration as they (believe) they have lost their previous work (probably not true).Changing this line to this:
...will run
tmux a
to re-attach to the users pre-existing session if it exists, but if it doesn't then theexec tmux
will execute the newtmux
session as required.This is related to #232 and whenever that issue is resolved, this would be a welcome enhancement to the handling of the
tmux
sessions for any of us who are in the command line on systems with intermittent connectivity issues.The text was updated successfully, but these errors were encountered: