請教export用法 - Linux

Table of Contents

我系統是unix, 因為我有幾10台server,
想利用telnet輸入指令關閉螢幕保護程式。

Script 寫法是:
export DISPLAY=' :0'
xset s off
這可存成sh執行,有效

但我想直接使用telnet到機台,
輸入那兩個指令
確險示export not found
想請教
在telnet,我是否有指令可宣告DISPLAY=' :0'
讓後面的 xset s off 可執行


--

All Comments

Dora avatarDora2017-08-24
隔壁有unix板
Annie avatarAnnie2017-08-24
Ptt 沒看到unix版 @@
Irma avatarIrma2017-08-25
直接 DISPLAY=:0 xset s off
Zora avatarZora2017-08-29
env DISPLAY=:0 xset s off
Victoria avatarVictoria2017-08-31
unix 板?
Elma avatarElma2017-09-01
啊…對不起,是freebsd板……
Blanche avatarBlanche2017-09-03
你會不會用到tcsh
Eartha avatarEartha2017-09-07
試試看 setenv DISPLAY :0 如果可以那應該就是 tcsh
Harry avatarHarry2017-09-10
echo $SHELL 顯示是csh的
Anthony avatarAnthony2017-09-11
所以用setenv DISPLAY :0 可以,謝謝大家幫忙