Summary: make xdm run .login and .cshrc files

From: David Harel (hareldv@netvision.net.il)
Date: Thu Oct 17 1996 - 06:47:25 CDT


Hi Managers,

I think I might have miss wrote my question so I will not include it.
However the answers I received helped me to get thoughts arranged.
thanks to:

        Bob Fulwiler <bobf@psa.pencom.com>
        Dan Pritts <danno@us.itd.umich.edu>
        Kevin Woods <kev@cnet.com>
        "Wojciech Mikanik" <WMIKANIK@star.iinf.polsl.gliwice.pl>
        ps4330@okc01.rb.jccbi.gov (Peter Schauss x 2014)
        weber@ash.crd.ge.com (Markus Weber)

What I really meant was:

Some users which use csh or tcsh had warnings like:
ridiculous long path: truncated.

obviously the reason was incremental path assignment like set
path=($path /usr/local/bin ..... set in .cshrc
So I screamed at everybody not to set path in .cshrc but only at .login
Now I faced the problem with xdm. All the scripts involved are set up
for bourn shell by default (I wanted to keep the default) and therefore
only .profile should have been started

As in many cases some users had to work both on an X terminal and on the
machine's console itself and had to have environment environments set up
correctly.
I tried to rewrite .xinitrc for csh make it source .login and set the
Xsession to start it like this:

        exec /bin/csh $HOME/.xinitrc

But this didn't work when logging in at the console.

Next step was back to .xinitrc in bourn shell which only had the line

/bin/csh $HOME/.xinitrc.csh

The .xinitrc.csh is a csh script (has an execute permission) and it
sources .login and starts all the rest for X11 (start applications and
window manager.
This solution works fine.

I use fvwm for window manager so things are accordingly.
Here are the files involved:

1. ~/.xinitrc

/bin/csh $HOME/.xinitrc.csh

2. ~/.xinitrc.csh

#!/bin/csh -f
setenv OPENWINHOME /usr/openwin
set path=($OPENWINHOME/bin $path)
#
# check if .login was already involed
if (! $?LOGIN) then
        source ~/.login
endif
#
# see if we'r comming from dxm or at system console
if ( $?SESSION_SVR ) then
        /usr/openwin/bin/xterm -geometry 50x10+0+0 -n Console -T Console
\
        -sb -sl 500 -bd white &
else
        /usr/openwin/bin/xterm -geometry 50x10+0+0 -n Console -T Console
\
        -sb -sl 500 -bd white -C &
endif
#
# start the fvwm Save_Desk file
if ( -f ~/new.xinitrc ) then
        source ~/new.xinitrc
else
        fvwm
endif

3. .login

# flag to signal if .login has been executed
setenv LOGIN
.
.
.

The issue is still on and comments are very welcome so another summary
is expected.

Thanks everybody.
---
Harel

---

\||/ David Harel Software Systems (`') _____||_____ Phone/Fax: 972 6 920738 (]____ ____[) Cellular: 052 476555 | | Snail Mail: Amuka / \ D.N Merom Hagalil | /\ | 13802 _| | | |_ Israel <___) (___> Email: Hareldv@netvision.net.il



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:13 CDT