{{Article summary text|This article discusses how to install, configure and use libnotify for application development.}}

+

{{Article summary heading|Related}}

+

{{Article summary wiki|GTK+}}

+

{{Article summary wiki|Libcanberra}}

+

{{Article summary end}}

−

Libnotify is an easy way to display desktop notifications and information in a small dialog. It's used in much opensource apps like Evolution, Pidgin, etc. It has support for Gtk+ and Qt applications and is desktop independent.

+

'''Libnotify''' is an easy way to display desktop notifications and information in a small dialog. It implements the [http://developer.gnome.org/notification-spec/ Desktop Notifications Specification] and it is already used by many open source apps like [[Evolution]], [[Pidgin]], etc. It has support for [[GTK+]] and [[Qt]] applications and is desktop independent.

==Installation==

==Installation==

−

The libnotify package is available from the Extra repository. Install libnotify from a terminal with the following command.

−

pacman -S libnotify

+

Libnotify can be installed with the package {{Pkg|libnotify}}, available in the [[official repositories]].

−

==Configuration==

+

In order to use libnotify, you have to install a notification server:

−

===Gnome===

+

===Builtin servers===

+

The following desktop environments use their own implementations to display notifications, and you can't replace them. Their notification servers are started automatically on login to receive notifications from applications via DBus.

−

To configure libnotify in Gnome install the packages notification-daemon and gconf-editor available in the Extra repository.To install the packages from the terminal:

* [[Cinnamon]] provides a notification server itself. Notifications are displayed at the top right corner of the screen.

+

* [[Enlightenment]] provides a notification server trough its Notification module. Notifications are displayed at the top right corner of the screen.

+

* [[GNOME]] provides a notification server itself. Notifications are displayed at the bottom of the screen.

+

* [[GNOME Flashback]] uses {{Pkg|notification-daemon}}. Notifications are displayed at the top right corner of the screen.

+

* [[KDE]] uses '''knotify4''' from package {{Pkg|kdebase-runtime}} to display notifications. Notifications are displayed at the bottom right corner of the screen.

−

pacman -S notification-daemon gconf-editor

+

===Other servers===

+

In other desktop environments, the notification server is launched on the first call via DBus. You can choose one of the following implementations:

+

* {{pkg|dunst}} is a minimalistic notification daemon for Linux designed to fit nicely into minimalistic windowmanagers like [[dwm]].

+

* {{pkg|notification-daemon}} is the notification server used by [[GNOME Flashback]]. It doesn't have a D-Bus service file by default. To use it outside from GNOME Flashback, create the following file:

+

{{hc|/usr/share/dbus-1/services/org.gnome.Notifications.service|

+

[D-BUS Service]

+

Name&#61;org.freedesktop.Notifications

+

Exec&#61;/usr/lib/notification-daemon-1.0/notification-daemon}}

+

* {{Pkg|notify-osd}} is a notification server for [[Unity]], available in the official repositories.

+

* {{AUR|statnot}} is a small, lightweight notification daemon that can output notifications to the root window's title, stdout or FIFO pipes, making it integrate very well with tiling window managers. It's available in the [[Arch User Repository]] or as a [https://github.com/halhen/statnot git repo].

+

* {{AUR|twmn-git}} is a notification system for tiling window managers. It's available in the [[Arch User Repository]] or as a [https://github.com/sboli/twmn git repo].

+

* {{Pkg|xfce4-notifyd}} is a notification server for [[Xfce]], available in the official repositories.

+

:{{Tip|To configure xfce4-notifyd, run the following command in the terminal: {{ic|xfce4-notifyd-config}}.}}

−

Open gconf-editor from the terminal with the following:

+

==Tips and tricks==

−

−

gconf-editor

−

From gconf-editor, select "/apps/notification-daemon/" from the sidebar which will allow libnotify to be configured.

+

===Write your own notify app===

+

You can write your own libnotify display messages easily in many programming languages through GObject-Introspection or bindings, or you can simply use bash.

−

===XFCE===

+

The following examples display simple a "Hello world" notification.

−

To configure libnotify in XFCE, you need the packages xfce4-notifyd and xfconf available in the Extra repository.To install the packages from the terminal:

Revision as of 07:55, 19 October 2013

Libnotify is an easy way to display desktop notifications and information in a small dialog. It implements the Desktop Notifications Specification and it is already used by many open source apps like Evolution, Pidgin, etc. It has support for GTK+ and Qt applications and is desktop independent.

Installation

Builtin servers

The following desktop environments use their own implementations to display notifications, and you can't replace them. Their notification servers are started automatically on login to receive notifications from applications via DBus.

notify-osd is a notification server for Unity, available in the official repositories.

statnotAUR is a small, lightweight notification daemon that can output notifications to the root window's title, stdout or FIFO pipes, making it integrate very well with tiling window managers. It's available in the Arch User Repository or as a git repo.