我学校用的是港湾验证,使用起来很让人不爽,于是下定决心自己写linux下面的港湾客户端,熬了几天,写好了。
写成daemon程序,发现ubuntu里面的这个气泡提示很好,就网上淘了些资料,现在整理出来。
ubuntu的气泡提示是使用notify-osd来实现的,我们需要下载libnotify,
apt-get install notify-osd (ubuntu 已经自带)
apt-get install libnotify-dev
其实shell里面也可发送气泡提示,命令为notify-send,需要安装libnotify-bin
apt-get install libnotify-bin
usage:
notify-send Test "Hello World"
notify-send "Message Title" "The message body is shown here" -i /usr/share/pixmaps/apple-green.png -t 1000
ps:icon can be a png, xpm or jpg file
截图来看看:
C语言中,我们使用的是notify库,可查阅官方资料
Libnotify Reference Manual: