Tak*_*kat 37 ssh notify-osd 12.04
有时我们需要向远程用户发送消息。我们可以使用 Notify OSD 在本地桌面上显示消息,但是我们无法向远程用户的桌面发送消息。
我们尝试了以下方法:
ssh user@remote
notify-send message
Run Code Online (Sandbox Code Playgroud)
-> 向本地显示器发送消息,但不向远程显示器发送消息。
ssh admin@remote
sudo -u user "notify-send message"
sudo: notify-send user: command not found
Run Code Online (Sandbox Code Playgroud)
-> 出现命令未找到错误。
ssh -X user@remote "DISPLAY=:0 notify-send message"
Run Code Online (Sandbox Code Playgroud)
-> 再次仅将消息发送到我的本地邮箱。
有没有办法向远程桌面发送消息?
hyt*_*omo 53
你有没有尝试过
ssh user@host 'DISPLAY=:0 notify-send "TEST MESSAGE."'
来自ubuntuforums.org/showthread.php?t=1240828 的答案
(没有jjmontes-X建议的选项)