User Tools

Site Tools


notify

If you want to send us your comments, please do so. Thanks
More on comments


notify

Warning

When you enable

Start | Settings | Settings and Startup | Advanced | Launch Gnome services at startup

it is possible that all the custom made notifier configurations get lost
The configuration of personal notifiers as described below does not seem to work any more

After turning Gnome services off at startup everything seems to be working as normal

Extended man page

Indicator applets

The new, upstream, indicator system is Ayatana

In Xfce serveral notifier applets can be activated in the tray

  • Recommended:
    • Notification plugin (With the black bell icon. Also shows the notifications this page is about)
    • Status Tray Plugin
  • StatusNotifier Plugin
  • Similar, the configuration windows look the same:
    • Indicator Plugin
    • Status Notifier Plugin. Has also a maximum icon size in pixels setting

Introduction

With

notify-send "Hello"

a popup message can be shown.
If you want to use an icon use

notify-send -i /usr/share/icons/Tango/22x22/status/dialog-information.png "Hello"

Run from cron

This does not work for notify-send
Solution: t.b.d.

Fromat and Options

Command format

notify-send [OPTIONS] <summary> [body]
  • OPTIONS see table below
  • summary: text in bold typeface
  • body: text in normal typeface (on a new line)

Only long option given. There might be a short option. See the man page

OptionExplanationRemark
--urgency=LEVELlow (disappears after --expire-time), normal (disappears after --expire-time), critical (does not disappear after --expire-time, user has to click on the notification to get it closed))The difference between low and normal is not clear to us
--expire-time=TIMEThe duration, in milliseconds, for the notification to appear on screenUbuntu's Notify OSD and GNOME Shell both ignore this parameter
--icon=ICON[,ICON…]Specifies an icon filename or stock icon to displayUse an icon name or a full path to an icon. How to find Examples of icon names: notification-message-im (bell icon)
--category=TYPE[,TYPE…]Specifies the notification categoryWhich type are possible is not clear to us
--helpShow this help message
--hint=TYPE:NAME:VALUESpecifies basic extra data to pass. Valid types are int, double, string and byteHow this can be used is not clear to us

Find Icons

Do

  • Start | Settings | Appearance | Tab Icons | Note the selected Icon theme
  • Do cd /usr/share/icons/IconThemeName or
  • In a terminal do find / -name “*Icon theme name*” 2> /dev/null
  • Now you should had found the path to the icons. There might be icons in different sizes

Output from a command

notify-send  echo "$(echo Hello)"

Setting a personal notifier Debian 8 and newer

With, in a terminal window,

notify-send "Hello"

a popup message can be displayed.
Example notifier popup
You can create your own format. Do

cd /usr/share/themes
sudo mkdir -p MyNotifier/xfce-notify-4.0
cd MyNotifier/xfce-notify-4.0/
sudo touch gtk.css
sudo vi gtk.css

and paste

#  /usr/share/themes/MyNotifier\!/xfce-notify-4.0/gtk.css
 
#XfceNotifyWindow {
    background-color: #ff69b4;
    border-radius: 10px;
    border: 6px solid #ffff00;
}
 
#XfceNotifyWindow label,
#XfceNotifyWindow image {
    font-family: Comic Sans MS;
    font-size: 22;
    color: #ffff00;
}
 
#XfceNotifyWindow label#summary {
    font-weight: Bold;
}
 
#XfceNotifyWindow button {
    border-style: none;
    background-image: none;
    background-color : #9400d3;
}
 
#XfceNotifyWindow button:hover {
    border-style: none;
    background-image: none;
    background-color : #5e0086;
}
 
#XfceNotifyWindow progressbar {
    border-radius: 3px;
}
 
#XfceNotifyWindow progressbar progress {
    min-height: 16px;
    background-image: none;
    background-color: shade(#ffff00, 1.2);
}
 
#XfceNotifyWindow progressbar trough {
    min-height: 16px;
    background-image: none;
    background-color: #5e0086;
    border: 1px solid shade(#5e0086, 0.6);
    border-radius: 3px;
}

into it.
Change colors, fonts and attributes to your liking. For some ideas for colors see the Crayola crayon colors
For fonts, have a look in Libre Office Writer for inspiration. Dejavu, Noto Free mono are some alternatives
Save the file and exit vi
Now do

start | Settings | Notifications

a window is shown
The notifier settings window
Clik on Preview and then on the Theme roldown menu. With the up and down cursor keys you can go through the various themes, including the one you just made. If yours doesn't show go through the list several times, that might solve it.
By changing the size, background color, font color and font type in gtk.css you can configure your own notifier. Have fun :-)
If you want to use notifier-send in a script have a look at Notifier

Setting a personal notifier Debian 7 and older

With, in a terminal window,

notify-send "Hello"

a popup message can be displayed.
Example notifier popup
You can create your own format. Do

cd /usr/share/themes
sudo mkdir -p MyNotifier/xfce-notify-4.0
cd MyNotifier/xfce-notify-4.0/
sudo touch gtkrc
sudo nano gtkrc

and paste

#  /usr/share/themes/MyNotifier\!/xfce-notify-4.0/gtkrc
 
style "my-window"
{
    bg[NORMAL] = "#4d4dff" 
    XfceNotifyWindow::border-color = "#CCffCC"
    XfceNotifyWindow::border-radius = 20.0
    XfceNotifyWindow::border-width = 2.0
}
class "XfceNotifyWindow" style "my-window"
 
style "my-text"
{
    font_name = "Comic Sans MS 20"
    fg[NORMAL] = "#ffff00"
    GtkWidget::link-color = "#a700a7"
}
widget_class "XfceNotifyWindow.*.<GtkLabel>" style "my-text"
 
style "my-button"
{
    bg[NORMAL] = "#202020"
    bg[PRELIGHT] = "#404040"
    fg[NORMAL] = "#ffccff"
    fg[PRELIGHT] = "#ffffff"
}
widget_class "XfceNotifyWindow.*.GtkButton*" style "my-button"
 
style "my-btn"
{
    bg[NORMAL] = "#9400d3"
    bg[PRELIGHT] = "#5e0086"
}
widget "XfceNotifyWindow.*.GtkButton" style "my-btn"

into it.
Save the file and exit nano.
Now do

start | Settings | Notifications

a window is shown
The notifier settings window
Clik on Preview and then on the Theme roldown menu. With the up and down cursor keys you can go through the various themes, including the one you just made. If yours doesn't show go through the list several times, that might solve it.
By changing the size, background color, font color and font type in gtkrc you can configure your own notifier. Have fun :-)
If you want to use notifier-send in a script have a look at Notifier


Main subjects on this wiki: Linux, Debian, HTML, Microcontrollers, Privacy

RSS
Disclaimer
Privacy statement
Bugs statement
Cookies
Copyright © : 2014 - 2024 Webevaluation.nl and the authors
Changes reserved.

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
notify.txt · Last modified: 14-03-2024 20:09 by wim