[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Non-login config files



>>>>> Steven Rezsutek <S.Rezsutek@baloo.gsfc.nasa.gov> writes:

:> In our last episode, Harald said:

>> I would like to restart an old discussion about whether or not a 
>> non-login es should read a config file upon startup. 

Oh, no - I should have kept my big mouth shut - here the discussion is
starting up before I get to write my thoughtful argument... :-(

:> I've never missed this (non-login configs) [...]

:> The first line of my .xsession is "#!/bin/es -lop", so everything
:> is set up in the environment before any apps/shells are started.
:> "Pure" stuff goes in .esrc, and "X-only" stuff, like my rxterm
:> function, go in autoload functions.  Things work fine, be it from
:> an Xterminal, an rsh, or a dialup.
                 ******

Ah.  You hit the problem right on.  Why does it work with an rsh?
Does your rshd run your command in a login shell?  Mine does not,
which is why I declared a function

fn res host cmd {rsh $host . '.!' $cmd}

and created a file .! of es commands to set things up and run the
commands in $*.  But this means I must distinguish between those
remote hosts on which I have es as the login shell and those where I
don't, so I run remote commands using res on one kind and rsh on the
other.  A minor pain perhaps, but it makes it a bit harder to automate
such trivial things as starting up an xterm on the remote host.

If you know a good way around this problem, I would like to know about
it.

- Harald