Switching apps results in a paused SSH session
-
If I open an SSH session from the terminal app to my Ubuntu server, this process appears to be paused after switching from other apps back to the terminal app. I'm able to resume the SSH session with command fg %1, but after resuming the terminal acts differently. That means commands are echoed after pressing enter, but before executing them and arrow keys result in control characters (^[[A for arrow up, ^[[C for arrow right etc) being printed to the terminal.
This behaviour seems to be more an SSH issue, than an UT issue. Because the same happens if i send SIGSTOP to SSH sessions from laptop to server or laptop to UT.
The display behaviour is similar to this and this issue, but I checked in my case the shell is always bash and $TERM doesn't change before and after the pausing of SSH.
Is it possible to either prevent the SSH session being paused during app switching or to fix the terminal behaviour after resuming the paused session? -
@WillemHexspoor Try to switch Prevent App Suspension for Terminal in UT Tweak Tool App
-
I know this problem since I use Ubuntu Touch (since 2015) and the hint about Prevent App Suspention will help.
But, why this suspention is done at all? If I compare it with my KDE desktop which has similar switching between four desktops, all with some apps open at the same time... why do we have it on UT and UBports? Resource limits?
matthias
-
@tera Thanks, that solved the issue
-
Sadly this is the default behaviour for Terminal and as @guru says it has been present ever since UT has a Terminal (and suspends inactive apps, not sure which was first). But it makes it quite useless on many occasions so if I could vote I would vote for preventing Terminal suspension by default.
Of course UT Tweak Tool is a way to "fix" this but it is kind of expected that people would want to run tools in Terminal even when the app is not on focus.
-
why do we have it on UT and UBports? Resource limits?
Very definitely to limit resource consumption. On a mobile phone you have very different expectations about battery life. I think UT sigstops the process when the app switches to background.