Pro*_*eak 1 tcsh centos display
user@domain:~ $ echo $DISPLAY
:0
user@domain:~ $ DISPLAY=:0
DISPLAY=:0: Command not found.
Run Code Online (Sandbox Code Playgroud)
只是尝试在这里运行命令: https: //stackoverflow.com/questions/46810043/notify-send-doesnt-work-over-ssh - 为什么它不被识别为命令?我使用的是 CentOS v7.7。
tcsh与 Bash 具有不同的语法。要在该 shell 中设置变量并使其可用于您将调用的程序,您必须使用以下命令:
setenv DISPLAY :0
ssh ....
Run Code Online (Sandbox Code Playgroud)
或者,如果您只想启动该变量ssh(如您链接的答案中所述),您可以env在命令之前使用:
env DISPLAY=:0 ssh ......
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
269 次 |
| 最近记录: |