<paypal></paypal> Please leave a tip

[?]

Xterm

From Sy

Jump to: navigation, search

Linux software > Terminals > xterm


I run xterm from a script, so it has all my preferences used:

xterm -fn 9x15 -bg black -fg gray -sl 10000 -geometry 113x46+0+0 $@

Note that $@ obsoletes this sort of thing:

$1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14} 


[1]:

"For additional security you may install xterm without suid-root; however if you do, xterm will not be able to make utmp or utmpx entries". [it's right down in 'Security Considerations', near the bottom]

Contents

[edit] Executing two commands

This crap doesn't seem to work:

xterm -e "$SHELL" -c "echo ok; echo and this ; sleep 5"

A more complex example, which works:

cd ~/muby.programming/muby
nohup \
xterm -fn 9x15 -bg black -fg gray -sl 10000 -geometry 113x46+0+0 -title 'SVN Update' -e "$SHELL" -c "\
svn up ; echo 'exiting in 5' ; sleep 5\
" >> /dev/null&

A better example, which works:

nohup \
xterm -e "$SHELL" -c "
# comments are allowed
echo ok ;\
echo another ;\
sleep 5;\
" >> /dev/null &

Comments should NOT have ;\ at the end.

[edit] Configuration

[2]

Xterm's configuration is through X resources.

The defaults are set in /usr/X11R6/lib/X11/app-defaults/XTerm (actually: in a unicode environment you better use 'uxterm', which has the config file UXTerm) .

If you want per-use settings, you should either copy that XTerm file to your home directory, or use the general-purpose X resources file (normally ~/.Xresources, but sometimes it is ~/.Xdefaults) . There you should prefi them 'xterm'

After reconfiguring things, you can run xrdb -merge ~/.Xresources or restart the X session.

[edit] Increasing the scrollback buffer

/usr/X11R6/lib/X11/app-defaults/XTerm

Probably this:

*saveLines: 1024

[edit] Review

  • Do How do I make pageup/pagedown scroll through a complete _page_?

The man pages has these extra-vague hints:


      scroll-back(count [,units [,mouse] ])
              This  action scrolls the text window backward so that text that
              had previously scrolled off the top of the screen is now  visi-
              ble.

              The  count argument indicates the number of units (which may be
              page, halfpage, pixel, or line) by which to scroll.

              An adjustment can be specified for these values by appending  a
              "+" or "-" sign followed by a number, e.g., page-2 to specify 2
              lines less than a page.

              If the third parameter mouse is given, the  action  is  ignored
              when mouse reporting is enabled.



      The default bindings in the VT102 window use the SELECT token, which is
      set by the selectToClipboard resource:

                    Shift <KeyPress> Prior:scroll-back(1,halfpage) \n\
                     Shift <KeyPress> Next:scroll-forw(1,halfpage) \n\
Personal tools
Navigation
About This Place
communicate
How did I do this?
[?]
Google ads
[?]