My orginal question was the following:
Hello,
I am now supporting a number of workstations running dec unix and xdm. Can
anyone point me to some cheat sheets on how to change borders color,
background color etc. It seems that via the session manager I can change
somethings but not the borders fro example. Also, what commands can be
sent to a decterm to change the header from saying decterm to the node name
or something I remember doing this under vms several years ago, how can
you do this under Unix. Any information will be appreciated.
jim jones
******** The first response I received was the following and brought back
some memories:
Jim,
I don't have any "cheat-sheets", but I suspect you are running
Motif. If that is the case, this is all controlled by the X resources
on the display. They are controlled primarily from the .Xdefaults and
.mwmrc files.
The actions of keys and buttons are in .mwmrc while the color and
appearance stuff are in .Xdefaults. Here is the excerpt from mine that
controls several color items:
#ifdef COLOR
DXsession.display_pattern: 0
#endif
#ifdef COLOR
*highlightColor: #33333d3d7d7d
#endif
#ifdef COLOR
*Background: #fafaf8f8f3f3
*topShadowColor: #fffffffffcfc
*bottomShadowColor: #969695959292
#endif
******* The next response provide some nice detail and a script which
helped really helped a lot.
On Thu, 11 Dec 1997, Jim R Jones wrote:
> I am now supporting a number of workstations running dec unix and xdm.
Can
> anyone point me to some cheat sheets on how to change borders color,
> background color etc. It seems that via the session manager I can change
> somethings but not the borders fro example. Also, what commands can be
> sent to a decterm to change the header from saying decterm to the node
name
For general administration of xdm and X, there is a good book by
O'Reilly, which came with the DU doc package ("X window system
administrators guide" ISBN 0-937175-83-8). DEC things are slightly at
variance with the standard way (the book copes with some of this).
I assume you are talking of DU 3.2 with OSF Motif, not of DU 4 with
CDE. That will be a different story. I like the Motif look and have
not moved to DU 4 and CDE.
I'm not sure whether your concern is really with xdm, or more generally
with the customization of the desktop. I'll tell you how I do it on my
Alpha (I use X at the console).
*) xdm things are configured in files in /var/X11/xdm
They are (mostly ?) in the X resource format, which is described
in any good book or man page about X.
I did only a few changes there (to the login box)
*) most other things are configured at user level. Probably one can
put somewhere systemwide files, but our local approach is that when
we create a new account we :
- create a soft link from the user home to specific system
wide files (like .cshrc)
- copy other files from templates (for students we copy from
the advisor's ones)
Experienced users can then customize the templates.
*) the files relevant to the customization of the desktop are :
.Xdefaults for general resources
.mwmrc for some aspect of customization of the window manager
(assuming you use mwm). I have assigned here some
Fn keys to accelerators for window functions
Mwm for window manager specific resources (as you know
X applications may read a file like this with precedence
to .Xdefaults), for instance I've set up here things
like border colours, focus-follow-mouse policy, and
even modified the number of buttons in the title bar.
Everybody can do what he likes. I have 3-d window
borders
which are blue, and red for the focus window. I have
suppressed all buttons but the menu one.
A colleague of mine has flat white window borders, and
black for the focus one, and suppressed all colours !
*) what goes in .Xdefaults and what in specific files is matter of
trial and error
*) if you press mouse button 1 on the root window, you will access a
menu which lets you customize the desktop and save. This will
create some of the above files for you. You can rename them, play
with other changes, save them and make a dxdiff of the related
changes, and converge on the preferred configuration.
*) concerning DECterm there are two things to note :
- one is keyboard configuraiton (perhaps that's more relevant to
dxnotepad, it's a general resource file invoked by xmodmap).
There is a DEC utility (dxkeycaps ?) to create it.
This is one of our fixed systemwide files (those linked)
Or perhaps you are happy with defaults
- the other one is that the resource file for decterm is DXterm.
You can configure and "save" a copy of it using the Options menu
from the menu bar.
We have a default systemwide DXterm,
- you can also start decterm with a custom file, using
dxterm -setup filename.
We (and I) use it for some particular cases :
- we have aliases to open a rlogin window on a Sun, or another
DEC (and also we had VAX and IBM). We have such windows in
different colours, and with different terminal emulation (from
vt300 to vt100). Matter of trial and error, and taste.
- I have also personal aliases to start a dxterm in which I run
a specific application (like Pine mail, the one I'm using now)
with specific colours and title bar and icon name.
*) if you want to change the title bar dynamically, you have to send
escape sequences (while a static name is set as a resource in the
avove files). I can't remember straight now what they are, but
I'll enclose the script we use to annotate ALL our terminal
windows (dxterm xterm sun's shelltools etc.) with hostname and
user id. You can derive it from them.
BEWARE : the files contains two non-printable characters, the
escape and the bell (control-G). If they do not survive mailing
repristinate them with an appropriate editor.
---------------------------------------------------------------------------
-
Lucio Chiappetti - IFCTR/CNR - via Bassini 15 - I-20133 Milano (Italy)
---------------------------------------------------------------------------
-
Fuscim donca de Miragn E tornem a sta scio' in Bregn
Che i fachign e i cortesagn Magl' insema no stagn begn
Drizza la', compa' Tapogn (Rabisch, II 41,
96-99)
---------------------------------------------------------------------------
-
For more info :
http://www.ifctr.mi.cnr.it/~lucio/personal.html
---------------------------------------------------------------------------
-
#! /bin/csh -f
#
# issue escape sequence to annotate window banner
#
# first get unqualified hostname and terminal name
#
set a = `hostname`
set b = `tty`
set aa = `echo $a | tr . '\040'`
set bb = $b:t
#
# construct escape sequences to be used
#
set escape = ?
switch ($TERM)
#
# vt300/200/100 are for dxterm on DECs
case vt300:
set title = ( ${escape}]21\;Host $aa[1] : user $USER on terminal
$bb${escape}\\ )
set icon = ( ${escape}]2L\;$bb $aa[1]${escape}\\ )
breaksw
case vt200:
set title = ( ${escape}]21\;Host $aa[1] : user $USER on terminal
$bb${escape}\\ )
set icon = ( ${escape}]2L\;$bb $aa[1]${escape}\\ )
breaksw
case vt100:
if ( ! $?WINDOW_ME) then
set title = ( ${escape}]21\;Host $aa[1] : user $USER on terminal
$bb${escape}\\ )
set icon = ( ${escape}]2L\;$bb $aa[1]${escape}\\ )
else
# however vt100 is also te100tool on Sunview
set title = ( ${escape}]lHost $aa[1] : user $USER on terminal
$bb${escape}\\ )
endif
breaksw
# this is for Sunview and Openwindows stuff
case sun-cmd:
set title = ( ${escape}]lHost $aa[1] : user $USER on terminal
$bb${escape}\\ )
breaksw
# and this is for xterm anywhere
case xterm:
set bell =
set title = ( ${escape}]0\;Host $aa[1] : user $USER on terminal
$bb${bell}\\ )
breaksw
# any other terminal is not recognized
default:
exit
endsw
#
# finally issue using appropriate command for Sun or DEC
#
if ($DECSTATION) then
echo $title
if ($?icon) then
echo $icon
endif
else
/usr/5bin/echo $title
endif
*****The last response provide another script which was also helpful:
Hello,
The following lines in /etc/csh.cshrc (for tcsh shell) sets the header
for either "dtterm" (DU V4.0) or DECterm:
#
if ( $TERM == "dtterm" ) then
alias cwdcmd 'echo -n "^[]2;${HOST}:$cwd^G^[]1;${HOST}^G"'
endif
#
if ( $TERM == "vt300" ) then
alias cwdcmd 'echo -n "^[]21;${HOST}:$cwd^[\^[]2L;${HOST}^[\"'
endif
#
Getting the control characters ( ^{, ^G) into the command string can
prove to be a challenge.
The command strings work independent of the shell.
bye ...
Received on Fri Jan 02 1998 - 16:47:38 NZDT