Dunst-1.13.1

#### Supplemental Linux® From Scratch - Version 13.0

### Chapter 4. System Utilities

- Prev

  System Utilities

- Next

  eza-0.23.4

- Up
- Home

# Dunst-1.13.1

## Introduction to Dunst

Dunst provides a notification daemon that is light and customizable for the X Window System and Wayland compositors.

- Download: https://github.com/dunst-project/dunst/archive/v1.13.1/dunst-1.13.1.tar.gz

### Dunst Dependencies

#### Required

D-Bus, gdk-pixbuf, GLib, Systemd, Pango, and Xorg Libraries

#### Recommended

libnotify and Wayland

## Installation of Dunst

Install Dunst by running the following commands:

    make PREFIX=/usr                 \
         SYSCONFDIR=/etc             \
         X11LIB=$XORG_PREFIX/lib/X11 \
         X11INC=$XORG_PREFIX/include/X11

Now, as the `root` user:

    make PREFIX=/usr SYSCONFDIR=/etc install

As a sanity test, you can see if the installation works by sending a notification to the desktop (be sure to do this in a working graphical environment; requires libnotify):

    (dunst & disown)
    dunstify -i info Information "Hello, ${USER}!" && sleep 5
    pkill dunst

## Configuring Dunst

### Config Files

`~/.config/dunst/dunstrc`. The default version is in `/etc/dunst` and will not be read from. If you want to customize your experience, copy the configuration file to `~/.config/dunst`

### Configuration Information

Create the config file:

    mkdir -pv ~/.config/dunst &&
    cp /etc/dunst/dunstrc ~/.config/dunst

Now inspect the file and make any changes to suit your needs.

dunst also needs to be started for it to be able to send any notification. While this can be autostarted by D-Bus, multiple notification daemons may be installed, so D-Bus will be the one to choose what gets autostarted. Thus, there are a couple of options.

##### For X11 - Window Managers

You can just add the following to `~/.xinitrc`:

    dunst &

Make sure the above line comes before the ``exec `<WM>``` line. This will ensure the daemon is started and works throughout the runtime of the X11 instance.

For display managers, it's a bit more tricky. For those, the “General XDG Autostart Method” should be sufficient.

##### For Specific Window Managers or Compositors

In some cases, this method is the only method to autostart this program correctly, like when using Wayfire-0.10.1. In essence, if your preferred window manager or compositor has a configuration file and supports autostarting, the general idea is to just have it autostart dunst with no arguments. Every window manager and compositor will handle autostarting differently, but that's the general gist of it. As an example, for Wayfire-0.10.1, it might look something like this:

    [autostart]
    # Autostart notification daemon
    notifications = dunst

##### General XDG Autostart Method

If the other cases were not possible, this can be the solution. An XDG Autostart file can be created which some window managers and compositors can read from and autostart in accordance with the XDG standard. Create one as the `root` user:

    cat > /etc/xdg/autostart/dunst.desktop << "EOF"
    [Desktop Entry]
    Version=1.0
    Name=Dunst
    Comment=Starts the Dunst daemon
    Exec=/usr/bin/dunst
    Terminal=false
    Type=Application
    EOF

In some cases, this should do the trick.

## Contents

Installed Programs: dunst, dunstctl, and dunstify
Installed Libraries: None
Installed Directories: /etc/dunst

### Short Descriptions

dunst | is the Dunst notification daemon
dunstctl | is a command-line utility for controlling Dunst
dunstify | can send desktop notifications from the command-line

- Prev

  System Utilities

- Next

  eza-0.23.4

- Up
- Home