linux-specific fixes for terminal etc.