> ssh -l shared_account source ~mpratt/.aliases
This just exits right away.
> ssh -X -l shared_account dtterm -e source ~mpratt/.aliases
> ssh -Xf -l shared_account dtterm -e source ~mpratt/.aliases
> ssh -Xtf -l shared_account dtterm -e source ~mpratt/.aliases
> ssh -Xtfn -l shared_account dtterm -e source ~mpratt/.aliases
Any combination of Xntf options seems to popup the new terminal and
then close it. One of the commands actually reports an error from the
source command saying it can't find ~mpratt/.aliases (which is weird
since I source it in my own .cshrc without problems).
Any suggestions?
Thanks,
Mike
How about putting the aliases file in the home directory of the
shared_account or sourcing it from the dotfiles of the shared_account
and doing a "dtterm -e ssh -X -l shared_account localhost &"
Might ssh -t bhn 'other-command; $SHELL' be what you're looking for?
Of course, other-command can't directly affect the environment in the
shell.
Also, the options may be OpenSSH specific; that shouldn't be a problem
with Solaris, though.
lg, Bernd
>> ssh -X -l shared_account dtterm -e source ~mpratt/.aliases
>> ssh -Xf -l shared_account dtterm -e source ~mpratt/.aliases
>> ssh -Xtf -l shared_account dtterm -e source ~mpratt/.aliases
>> ssh -Xtfn -l shared_account dtterm -e source ~mpratt/.aliases
Can this work? There is no executable program "source" that does what you
want. What you have in mind is some functionality provided by the shell.
> Any combination of Xntf options seems to popup the new terminal and
> then close it.
For newer versions of openssh you may need to use "-Y" ("Enables trusted
X11 forwarding") rather than "-X".
> Any suggestions?
I don't know of any way to get an interactive shell to use a startup file
with a different name.
Perhaps you should start using some other shell, bash, zsh, etc., or even
tcsh/csh if all your colleagues use the other (i.e., csh/tcsh); then you
can put whatever you like in that shell's startup file and start it up as
your target program ("ssh ... dtterm -e othershell").
--
Paul Kimoto
This message was originally posted on Usenet in plain text. Any images,
hyperlinks, or the like shown here have been added without my consent,
and may be a violation of international copyright law.
> I don't know of any way to get an interactive shell to use a startup file
> with a different name
... but you could accomplish the goal along the following lines:
(1) Put a line in the shared cshrc that says something like
test -e "$extracshrccommands" && source "$extracshrccommands"
(2) Write (and make executable) a little script like
#!/bin/csh
setenv extracshrccommands ~mpratt/.aliases
exec /bin/csh
(3) Run ssh with this script as the program to be run ("ssh ... dtterm -e
/path/to/this/script").
(Please check syntax, as I switched away from csh a long time ago.)
Thanks for all the responses. Unfortunately I am kind of limited in
my options for the main reason that I cannot modify the .cshrc file
for shared_account (or any of its file: it's shared by all our users
and modifying it is frowned upon and will get me a slap on the wrist).
I also cannot change shells, so I'm stuck with tcsh. And I had said
source originally, but perhaps I'd have better luck with the "."
command?
Mike
I must be missing the difficulty with this one but
ssh -l <shared-account> <host> bash --rcfile
<custombashrcwithaliasesandprogramtoexeconlogin>
Would this not do what you want?
--
Steve Pointer