Desktop notifications

From ArchWiki
Revision as of 18:31, 25 October 2011 by City-busz (Talk | contribs) (Full rewrite to make this article up to date and add more examples in several programming languages)

Jump to: navigation, search

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.


Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어


External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

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

Installation

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

Note: Usually you don't have to install libnotify explicitly, since all applications that requires libnotify depends on it.

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

GNOME

  • gnome-shell provides a notification server itself. Notifications are displayed at the bottom of the screen.
  • In GNOME Fallback mode, you need to install notification-daemon:
Template:Cli
Note: notification-daemon is a required component for GNOME Fallback mode. You can't login without it.

KDE

KDE uses knotify4 from kdebase-runtime package to display notifications. If you are using KDE, this package is already installed.

XFCE

To get notifications in XFCE, you need to install xfce4-notifyd: Template:Cli

Tip: To configure xfce4-notifyd, run the following command in the terminal: Template:Codeline.

Unity

Unity uses Notify OSD, which is available in AUR: notify-osdAUR.

Other DEs

Other DEs could use notification-daemon (should be launched explicitly), xfce4-notifyd or notify-osdAUR (automatically launched by D-Bus on request).

Tips & Tricks

awn-applet-awn-notification-daemon, colibri, notify-osd, plasma-widgets-workspace, xfce4-notifyd

Write your own notify app

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

Bash

Template:File

C

Template:File

C#

Template:File

Genie

Template:File

JavaScript (gjs)

Template:File

JavaScript (seed)

Template:File

Python

Template:File

Python 2 (python-notify)

Template:File

Vala

Template:File

More Resources