由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Unix版 - equivilent $REMOTEHOST in ksh
相关主题
xterm Xt error: Can't open display::0关于X 窗口的问题 ( setenv DISPLAY ... )
按你们的经验,这个错误是由什么引起的?xhost problem....
an unixquestions, Please help!一个 x terminal 设置的问题
急:ld.so.1的问题输入xterm总提示display错误
如何改变CLASSPATH?[转载] any fast way to learn Yak? (bison and flex)
怎么从script中把环境变量传回到当前shell中? (转载)可以看别人的环境变量?
TCSH里怎么用setenv把一个带有空格的路径加给$PATH?Solaris下指定打印机的环境变量是什么?
关于display的问题问个关于xwin的土问题
相关话题的讨论汇总
话题: remotehost话题: equivilent话题: ksh话题: display话题: variable
进入Unix版参与讨论
1 (共1页)
h**h
发帖数: 132
1
there is $REMOTEHOST in tcsh, but how to get this equivilent
variable in ksh?
the purpose is when telnet to the server, .profile will
automatically set the DISPLAY without manually input.
thanks
m*****e
发帖数: 4193
2
use ssh

【在 h**h 的大作中提到】
: there is $REMOTEHOST in tcsh, but how to get this equivilent
: variable in ksh?
: the purpose is when telnet to the server, .profile will
: automatically set the DISPLAY without manually input.
: thanks

h**h
发帖数: 132
3
that's definitely an alternative to tunnel xwindow traffic.
But since hundreds of users are used to telnet, and it's
expensive
to spend dollars for hundreds of licenses of ssh client
still looking for cheap solution.
there should be a simple script to identify whether it is
console login or not, if not, then decide where the user is
from, then define DISPLAY variable.
Any ideas?

【在 m*****e 的大作中提到】
: use ssh
c*****t
发帖数: 1879
4
There is a way, but not very good.
1. get current tty
2. finger -l username | grep tty | cut fromremotesite
3. check if it is the console, setenv
p.s. last is not as good as finger.

【在 h**h 的大作中提到】
: that's definitely an alternative to tunnel xwindow traffic.
: But since hundreds of users are used to telnet, and it's
: expensive
: to spend dollars for hundreds of licenses of ssh client
: still looking for cheap solution.
: there should be a simple script to identify whether it is
: console login or not, if not, then decide where the user is
: from, then define DISPLAY variable.
: Any ideas?

h**h
发帖数: 132
5
This doesn't work either, since most unix servers disable
finger server
well, the worst case is to write a shell script
to
1> who -m
user pts/9 Oct 20 17:35 (10.10.10.10)
2> parse info between ($REMOTEHOST)
3> See if it is from console or not
4> export DISPLAY=$REMOTEHOST:0.0
put that in .profile or .login?
h**h
发帖数: 132
6
export REMOTEHOST="`who am i | sed -n 's/.*(\(.*\))/\1/p'`"

【在 h**h 的大作中提到】
: This doesn't work either, since most unix servers disable
: finger server
: well, the worst case is to write a shell script
: to
: 1> who -m
: user pts/9 Oct 20 17:35 (10.10.10.10)
: 2> parse info between ($REMOTEHOST)
: 3> See if it is from console or not
: 4> export DISPLAY=$REMOTEHOST:0.0
: put that in .profile or .login?

1 (共1页)
进入Unix版参与讨论
相关主题
问个关于xwin的土问题如何改变CLASSPATH?
土土地问一哈:UNIX系统下如何运行APPLET?怎么从script中把环境变量传回到当前shell中? (转载)
unix中文打印之合集 (请补充)TCSH里怎么用setenv把一个带有空格的路径加给$PATH?
请问怎么改变屏幕的刷新频率?sun os 2.8, sparc关于display的问题
xterm Xt error: Can't open display::0关于X 窗口的问题 ( setenv DISPLAY ... )
按你们的经验,这个错误是由什么引起的?xhost problem....
an unixquestions, Please help!一个 x terminal 设置的问题
急:ld.so.1的问题输入xterm总提示display错误
相关话题的讨论汇总
话题: remotehost话题: equivilent话题: ksh话题: display话题: variable