Fix the default terminal

Go with whatever is set by SSH, and fall back to "linux" if the terminal is not available.

This is needed to make htop and perf work over SSH (using XTerm and other terminal emulators).

PS Also add "screen" now.

This fixes #1975