Take screenshot of terminal output in text mode in Ubuntu