Re: configure XTERM

From: Stephane CHAZELAS (this.address_at_is.invalid)
Date: 10/30/03


Date: Thu, 30 Oct 2003 10:16:41 +0100

2003/10/29, 21:19(-08), Mike:
[...]
> Couple of questions:
> 1) when i am in an Xterm window and i want to shell out to a new XTERM
> window, how can i ensure that the new windows opens with the settings
> i specified above? i know i can create a script to do this..but was
> wondering if there was a way to change the default behavior of xterm
> when it opens.

You can configure xterm using X resources. X resources
can be installed in the X server memory and queried by
applications (such as xterm), see man xrdb.

They can also be but in a file that every application reads
(named ~/.Xdefaults or ~/.Xdefaults-<hostname>), or in a file
per application located somewhere in a path that looks like
/path/to/app-defaults (see man X for all the details).

For example, the resource for your command line can be written:

XTerm*saveLines: 1000
XTerm*background: black
XTerm*foreground: green
XTerm*pointerColor: red
XTerm.VT100.geometry: 80x32
XTerm*scrollBar: true
XTerm*font: 8x13
XTerm*rightScrollBar: true

xterm reads the SHELL environment variable to know which shell
to start.

>
> 2) the part of the command above which reads "-e 'bash --login -i'"
> was taken from the Cygwin.bat file. this apparently causes the
> /etc/profile script to excutes and sets Xterm to open at my home
> directory. my question is what does 'bash --login -i' mean? i did a
> man on bash, but it doesn't really explain in depth what the --login
> parameter does. thanks.

This runs a login shell, you generally run one login shell per
session, at the entry point (when you log in). Running a login
shell in a xterm doesn't make much sense unless every command
you run is run from this xterm (i.e. xterm is the ancestor of
all your further processes). Well, at least it is true in a Unix
environment, I don't know for MS Windows.

> 3) when i type something like 'xlsfonts | more', i get a message that
> more is not a known command. why is this?

Maybe it is not installed, or maybe it's in a place your shell
is not aware of. Shells locate commands to run using the "PATH"
environment variable.

> 4) is there a good tutorial that explains the difference between
> .bashrc, .bash_profile, etc/profile and etc/bash.bashrc files are?

I don't find bash much consistEnt about its startup files, you
may prefer switching to the zsh shell which is more user
friendly featureful and consistent.

-- 
Stéphane                      ["Stephane.Chazelas" at "free.fr"]


Relevant Pages

  • [GNU Screen] Attach to daemon and create a new window?
    ... I've configured my window manager to start xterms like this: ... shell sessions from multiple windows, ... Normally, I expect the new xterm to give me a new shell, too. ... So I'd like to change the window manager command in such a way that it ...
    (comp.unix.questions)
  • Re: X11 xterm window title
    ... icon titles to "string". ... means in a console shell it will *BEEP* every time the shell ... invoked from xterm is "xterm". ... displayed in an X window... ...
    (comp.os.linux.misc)
  • Re: Enlarging the terminal window
    ... can issue "mode co80,43" at the command line and then invoke slrn. ... haven't found a way to do that in Ubuntu's shell window, ... xterm -geometry 80x43 ## Or rxvt, etc, instead of xterm ... To resize an open window: ...
    (comp.os.linux.misc)
  • Re: starting programs as a daemon
    ... then dies as soon as the xterm exits (either ... shell, because it is not a child of the shell after forking twice. ... to kill members of the same session group when it dies. ... IN the xterm) and its process group is that of the same progenitor. ...
    (comp.os.linux.misc)
  • Re: Enlarging the terminal window
    ... can issue "mode co80,43" at the command line and then invoke slrn. ... haven't found a way to do that in Ubuntu's shell window, ... xterm -geometry 80x43 ## Or rxvt, etc, instead of xterm ... To resize an open window: ...
    (comp.os.linux.misc)