Foreground process stopped when terminal app is backgrounded

Bug #1436233 reported by zubozrout
36
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Ubuntu Terminal App
Confirmed
High
Unassigned

Bug Description

When my screen goes off or Terminal app lose focus while connected to SSH through my Ubuntu Tablet, SSH connection disconnects. This is not an expected behaviour and apps running in the console should be kept alive even when user is not necessarily interacting with them all the time.

Why isn't there the same policy for terminal as for music app that can play music while "minimized"? This is not just ssh, every app is suspended when you are not using terminal and in most cases this is wrong. SSH breaks, music played e.g. through VLC pauses, ... with this the terminal is useless - you may want to run some script that takes longer than a few seconds - so why can't you browse the web in the meantime instead of watching the terminal output for hours.

// I may have not notice this, but I found myself without my computer, on a wireless blocking ssh, having to repair a remote computer and although I could do it on my Android phone I like Ubuntu Terminal more so I tried to use this and I was really surprised of this behaviour. I had to set my screen to never lock and keep the tablet like this for hours. This not only makes me sad as it is wrong, but also takes more battery than with the screen completely off.

zubozrout (zubozrout)
description: updated
Changed in ubuntu-terminal-app:
status: New → Confirmed
Revision history for this message
jEzEk (jezek) wrote :

I found out, that it does not closes the ssh connection, but it moves it to background (like CTRL-Z). if you type fg, you should be back to ssh session. But after that the arrow keys and other special keys are working weird, eg. TAB key does not do completion, like before, etc. File this as another bug, or make it part pf this bug?

Revision history for this message
Rüdiger Kupper (ruediger.kupper) wrote :

I confirm that bakgrounding the terminal app (e.g., switching to the home scope) stops the running process in the terminal (like CTRL-Z was pressed). Returning to the terminal app, you need to foreground it again ("fg").
I cannot determine if this is intentionally (some kind of safety measure?) or a bug (terminal receiving SIGSTOP where it shouldn't).
Like OP said, it is certainly unexpected.

This is Ubuntu Phone 15.04 (r3) on MX4.

summary: - SSH connection closed when screen goes off or terminal app is not on the
- top
+ Foreground process stopped when terminal app is backgrounded
Revision history for this message
Etienne Papegnies (etienne-papegnies) wrote :

Affected by this too. This is especially annoying in the case of htop.
When one focuses the terminal again the "[1]+ Stopped htop" is not cleaned from the window and while htop resumes correctly it does so on a corrupted terminal window.

Changed in ubuntu-terminal-app:
importance: Undecided → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.