b***g 发帖数: 4 | 1 Can somebody tell me how are these files used?
I have a shell command which I only want to execute
once when I login. Which of these files should I put
it in?
Thanks. | s***s 发帖数: 1841 | 2 C shell, .cshrc
K shell, .profil
【在 b***g 的大作中提到】 : Can somebody tell me how are these files used? : I have a shell command which I only want to execute : once when I login. Which of these files should I put : it in? : Thanks.
| t********e 发帖数: 880 | 3 should be .login for csh bah
【在 s***s 的大作中提到】 : C shell, .cshrc : K shell, .profil
| c*****t 发帖数: 1879 | 4 You should man csh/ksh/tcsh, depending on the shell
used. There, hit '/' key to do a search on 'FILE'.
That should immediately bring you to the files used.
Usually, the man page will tell you the exact order
of the files being processed.
【在 b***g 的大作中提到】 : Can somebody tell me how are these files used? : I have a shell command which I only want to execute : once when I login. Which of these files should I put : it in? : Thanks.
| j***y 发帖数: 87 | 5 for csh, tcsh, .cshrc and .login are executed
for ksh, bsh, bash, .profile and .login are executed.
But I think bwang's question has some ambiguity. If he just wants to execute
some command once in one session, like xhost +font under an X environment,
then he shouldn't add entries in these startup files.
instead he should check what kind of session manager he is using and modify
the corresponding script, like .xsession and so on.
【在 c*****t 的大作中提到】 : You should man csh/ksh/tcsh, depending on the shell : used. There, hit '/' key to do a search on 'FILE'. : That should immediately bring you to the files used. : Usually, the man page will tell you the exact order : of the files being processed.
| b***g 发帖数: 4 | 6 I am using tcsh, if I put the command in .login, it will be
executed every
time I open a new xterm window. But on the man page, it says
that tcsh will
invoke .login only if the shell is a login shell. ???
This is what I want, however, I don't have a .xsession file
under my home dir
I am using Iris6.5, do you know which file should I modify?
【在 j***y 的大作中提到】 : for csh, tcsh, .cshrc and .login are executed : for ksh, bsh, bash, .profile and .login are executed. : But I think bwang's question has some ambiguity. If he just wants to execute : some command once in one session, like xhost +font under an X environment, : then he shouldn't add entries in these startup files. : instead he should check what kind of session manager he is using and modify : the corresponding script, like .xsession and so on.
| j***y 发帖数: 87 | 7
For Irix, everytime you open an xterm window, a login shell will be invoked,
so it will execute .login once more.
In theory, for irix6.5, you can add a file .sgisession under your home
directory, which will be executed only once for each session. But in practice,
sometime, it doesn't work at all.
So my way is still to add something in .cshrc or .login, but everytime I will
measure if it's first time to be executed.
say, if I only want to call xset +path once, then I add the following script,
se
【在 b***g 的大作中提到】 : I am using tcsh, if I put the command in .login, it will be : executed every : time I open a new xterm window. But on the man page, it says : that tcsh will : invoke .login only if the shell is a login shell. ??? : : This is what I want, however, I don't have a .xsession file : under my home dir : I am using Iris6.5, do you know which file should I modify?
|
|