Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mac os x Terminal.app's buffer and screen command

I use Mac os x Terminal.app to connect to my remote machine and then use screen on that machine.

Is there a way to use the scrollbars on Terminal to scroll back and forth on the screen's buffer. It is painful to do ctrl+a + Esc and then Page Up/Down

Thanks Arvind

like image 519
Arvind Avatar asked Jun 24 '09 16:06

Arvind


People also ask

How do I clean my Mac using terminal?

Now, just type in sudo purge inside the Terminal window and hit Enter. This will begin the process of clearing your RAM and disk cache contents. You will get a prompt asking you to type in your password. In OS X 10.9 or higher, this command requires an administrator password, hence the use of sudo.

How do I find Applications on Mac terminal?

On your Mac, do one of the following: Click the Launchpad icon in the Dock, type Terminal in the search field, then click Terminal. In the Finder , open the /Applications/Utilities folder, then double-click Terminal.


2 Answers

To expand on the previous two answers: the .screenrc line

termcapinfo xterm* ti@:te@

will turn on your scrollbars. This is a win unless you're using control-A to switch between multiple screen sessions in the same Terminal window. Screen uses what's called cursor addressing mode to keep a separate history buffer for each session; the termcapinfo line above tells it never to use that mode. All history then goes into one buffer, the native Terminal buffer, and you'll see lines from all sessions mixed in with each other.

These days that just means using a separate Terminal window (or tab) for each login on your remote -- a low price to pay for getting your scrollbars back, to my mind.

So why isn't scrollbar mode the default? Because in Ye Olde Tyme Dayes when we walked twenty miles in the snow to our 80 by 24 character-cell VT100s, you could only get one login per terminal. Unless you had two terminals on your desk, screen was the only multi-session game in town.

like image 127
Yarrow Avatar answered Sep 17 '22 17:09

Yarrow


Adding the following to ~/.screenrc should do what you want.

termcapinfo xterm* ti@:te@
like image 38
Joe Martinez Avatar answered Sep 19 '22 17:09

Joe Martinez