小编M. *_*han的帖子

在桌面通知中显示终端命令结果

我需要在通知中显示终端命令的结果。

通知可以通过运行来触发:

notify-send "Notification message"
Run Code Online (Sandbox Code Playgroud)

我的命令是:

sudo /opt/lampp/xampp start
Run Code Online (Sandbox Code Playgroud)

在终端中显示以下结果:

Starting XAMPP for Linux 5.6.20-0...
XAMPP: Starting Apache...already running.
XAMPP: Starting MySQL...already running.
XAMPP: Starting ProFTPD...already running.
Run Code Online (Sandbox Code Playgroud)

我希望此结果显示在通知中,就像“通知消息”显示在notify-send.

谢谢!

notification command-line gnome-terminal notify-send

5
推荐指数
1
解决办法
1620
查看次数