由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Unix版 - .cshrc?.login?.profile?
相关主题
login shell and normal shell?Enviroment Config Help
how to redirect error output under unix TELNET 老断
怎样改成tcsh?奇怪问题一个
how to change login shell?怎么更改一些系统命令的路径,非管理员? 如gcc等.
C++5.0的初级问题Where to set fontpath?
[转载] using ssh in tcsh script我的alia放在script里为什么不工作?
Classpath setting questionstrange problem about wget execution
UNIX dummy Questions?关于一个C++library的连接
相关话题的讨论汇总
话题: login话题: cshrc话题: shell话题: files话题: once
进入Unix版参与讨论
1 (共1页)
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?

1 (共1页)
进入Unix版参与讨论
相关主题
关于一个C++library的连接C++5.0的初级问题
AIX shell configuration[转载] using ssh in tcsh script
一个unix .cshrc的wentiClasspath setting question
急:ld.so.1的问题UNIX dummy Questions?
login shell and normal shell?Enviroment Config Help
how to redirect error output under unix TELNET 老断
怎样改成tcsh?奇怪问题一个
how to change login shell?怎么更改一些系统命令的路径,非管理员? 如gcc等.
相关话题的讨论汇总
话题: login话题: cshrc话题: shell话题: files话题: once