How to show a GUI message box from a bash script in linux?

前端 未结 13 2173
孤街浪徒
孤街浪徒 2020-12-04 04:58

I\'m writing a few little bash scripts under Ubuntu linux. I want to be able to run them from the GUI without needing a terminal window to enter any input or view any output

13条回答
  •  天命终不由人
    2020-12-04 05:40

    alert and notify-send seem to be the same thing. I use notify-send for non-input messages as it doesn't steal focus and I cannot find a way to stop zenity etc. from doing this.

    e.g.

    # This will display message and then disappear after a delay:
    notify-send "job complete"
    
    # This will display message and stay on-screen until clicked:
    notify-send -u critical "job complete"
    

提交回复
热议问题