Monday, February 05, 2007

Add a Scroll Bar to xterm

Here is a quick and dirty way of adding a scrollbar (-sb) to an xterm window. I like adding colors to it, too, especially old school black and green. The xterm environment is determined by the .Xdefaults file if it is present.

# xterm -bg black -fg green -title "My Blog Log" -sb &

If you make changes to the .Xdefaults file during your login session, you can load the changes by doing the following action:

# xrdb -load /home/esofthub/.Xdefaults

You might also want to increase the buffer space. In this example, I am increasing the buffer space to 3000 lines.

# xterm -bg black -fg green -title "My Blog Log" -sb -sl 3000 &


Kranti Surya said...

Thanks, very useful tip!

Puttu said...

Thanks mate. But when i add the line "xterm -bg black -fg green -title "My Blog Log" -sb -sl 30000 &" in a script or as alias, it doesn work.