什么是cygwin/Windows相当于Linux的'notify-send

Mic*_*per 12 cygwin libnotify

Linux具有notify-send将用户通知发送到桌面管理器的命令.(在许多环境中,这些显示为屏幕一角的弹出窗口,以及低电量警告和其他系统消息.)我在监视和备份脚本中使用它.

Cygwin似乎没有lib-notify,那么这个命令是否有Windows等价物?网络搜索引导我找到关于从Windows系统托盘/通知区域运行批处理文件的文章,或尝试从批处理文件中清理系统托盘,但我还没有找到一种方法从后台进程生成不显眼的用户消息.

Dor*_*gen 14

你可以试试notifu.它是一种命令行通知应用程序,因此您可以在cygwin中使用它.

用法: notifu /p title /m message

  • `-bash:notifu:command not found`显然它可以[这里](http://www.paralint.com/projects/notifu/); 我还没有尝试过. (2认同)

Dwi*_*cer 5

从NT3.51天开始,Windows就具有此功能,它是在UNIX中以wall(1)命令模仿的。对于Pre Vista,7、8系统,命令为net send:

net send * "Message"
Run Code Online (Sandbox Code Playgroud)

在较新的专业版本中,它是msg.exe:

msg "%username%" "Hello World"
msg * "Message"
Run Code Online (Sandbox Code Playgroud)

Samba甚至还支持旧的通知协议:echo“ Hello world” | smbclient -NM HomePC

对于新的Vista后版本,需要使用PsExec/ winexe。有关更多详细信息,请参阅有关Windows 7消息的Ubuntu:SE文章。