Though many people use the terminal clients that come with GNOME and KDE to do command line work, many people still use the simple and older XTerm client. It loads much faster. Many GUI apps that have an option to call a terminal call an XTerm.
People new to Linux/Unix environments do not know that they can scroll up and down in command line output. There are keyboard commands for that, but who will remember those commands unless they use those commands all of the time? Well, about a ZILLION years and many, many Linux distributions ago I figured out how to add a GUI scrollbar to an XTerm. I was going through my old Linux notes this weekend and had the thought other people might find it useful.
Adding A Scrollbar To XTerm
- Bring up a terminal and sign in as root ( Ubuntu users can do this with sudo bash )
- Go to /etc/X11/app-defaults
- Bring up the file XTerm in a text editor
- Copy the snippet below to the bottom of the file & save the file:
- execute the command: xrdb -merge /etc/X11/app-defaults/XTerm
! Set up scrollbars - get them, get them on the right side, and be ! able to scroll them with the right,left, or middle mouse button xterm*ScrollBar: on *XTerm*scrollBar: true xterm*rightScrollBar: true xterm*multiScroll: on xterm*jumpScroll: on xterm*scrollbar.Translations: #override \n\ :StartScroll(Continous) MoveThumb() NotifyThumb()\n\ :MoveThumb() NotifyThumb() \n\ :StartScroll(Continous) MoveThumb() NotifyThumb()\n\ :MoveThumb() NotifyThumb() \n\ :StartScroll(Continous) MoveThumb() NotifyThumb()\n\ :MoveThumb() NotifyThumb() \n\ :NotifyScroll(Proportional) EndScroll()
HTH 🙂
Similar Posts:
- None Found
but i donot get a nice scrollbar with this
Ram, what system are you on?
For the changes to reflect immediately, you’d need to do
xrdb -merge /etc/X11/app-defaults
Thanks Ashish!
xrdb -merge /etc/X11/app-defaults/XTerm needed to get the line to complete successfully.
I used to get a scroll bar (no idea when), but Linux Mint 19.3 xfce does not. I added the text to /etc/X11/app-defaults/XTerm, ran xrdb, and now i get a scroll bar. It works, but i recall something different.
Stephen, it is nice to read that a blurb I posted ten years ago is still helping people. Thank you.