• Home
  • A – Z Index
  • About this Wiki
  • Feeds
  • Privacy
  • Random
  • The Tag Cloud
  • Archive
  • …
  • On Labour’s Rules
  • Elsewhere
  • my blog
  • Search
davelevy . info / wikithings dave has discovered, brought to you by wordpress & 1and1
  • Home
  • A – Z Index
  • About this Wiki
  • Feeds
  • Privacy
  • Random
  • The Tag Cloud
  • Archive
  • …
  • On Labour’s Rules
  • Elsewhere
  • my blog
  • Search
davelevy . info / wiki

  • Home
  • Technology

Posted by Dave on April 30, 2015

notify-send

Technology
notify-send

While installing docker, I decided I needed to write some notifications to ensure the configuration works. See Docker. I started with a TCL/TK script, which these days looks a bit old school, and writing the packer was (& remains) difficult. Virtualbox reports its status on Ubuntu via a very pretty interface, prettier than Apple script anyway, so I thought I’d have a lock.

The command is notify-send. This is part of the desktop, obviously not needed if running headless.

  1. http://manpages.ubuntu.com/manpages/trusty/man1/notify-send.1.html – the man page
  2. http://www.linuxjournal.com/content/tech-tip-get-notifications-your-scripts-notify-send – some examples
  3. http://ubuntuforums.org/showthread.php?t=1411620 – an ubuntu forums thread with some tips

It comes with some standard icons, somewhere in the /usr/share/icons directories, allegedly, I made myself a docker icon, .png 32×32 to decorate the message.

docker_32x32

I found it on google, and replaced the white background with transparency. It’s not ideal, maybe I should find something better. Here’s a screen shot,

docker-notify-simple-w415

$ notify-send -i ${icon file, path and basename} "Docker Daemon" \
        "docker daemon is running"

I plan to put this in my .profile; or somewhere else if that doesn’t work on a graphic login. This article on stackexchange addresses how to run a script on GNOME login.

I came across another use case and needed it to run on an elementary OS systems. The version of notification used by elementary seems to have some differences. I installed notify-osd and then copied the icon I wanted to use to /usr/share/icons. The icon is then referred to by its file name prefix.

Installing on Raspbian; installing notify-send on Raspbian. Stranger than expected.

Related Posts


dockerelementary OSgnomeLinuxloginnotifynotify-sendraspbianTechnologyubuntu

Dave

https://davelevy.info/wiki/author/admin/

Comments ( 2 )

  1. ReplyAuthorDavePosted on 1:11 pm April 27, 2019
    I added the comments on elementary and amended the comment on .profile.
  2. ReplyAuthorDavePosted on 7:53 pm April 29, 2020
    I added the comments and tag on Raspbian

Leave a Reply to Dave Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

View Comments (2) ...

Search

Another language?

en English
ar Arabicnl Dutchen Englishfr Frenchde Germanel Greekit Italianpl Polishpa Punjabiro Romanianes Spanishtr Turkishur Urducy Welsh

Pages

  • A – Z Index
  • About this Wiki
  • Archive
  • Feeds
  • Privacy
  • Random
  • Search
  • The Tag Cloud

Quick Links

  • Chicken Dinner Chicken Dinner
  • Labour's Rules Labour's Rules
  • my blog, posts my blog, posts

Copyright © 2022. Powered by WordPress. Designed by myThem.es.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.Accept Reject Read More
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT