Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Desktop notifications without Daemon?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1341

PostPosted: Mon Oct 22, 2018 5:07 pm    Post subject: Desktop notifications without Daemon? Reply with quote

Greetings all.

Is there any way to provide desktop notifications with out a desktop notification daemon?
I hardly use notifications, and would like to keep overhead down.

Code:
eselect notify-send list
Available notify-send binary implementations:
  [1]   tinynotify-send

Code:
notify-send -w Hello Desktop
System-wide notifications not supported.

Code:

notify-send -l Hello Desktop
Sending message over D-Bus failed: The name org.freedesktop.Notifications was not provided by any .service files

_________________
Donate to Gentoo
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 3691
Location: Dallas area

PostPosted: Mon Oct 22, 2018 5:12 pm    Post subject: Re: Desktop notifications without Daemon? Reply with quote

turtles wrote:
Greetings all.

Is there any way to provide desktop notifications with out a desktop notification daemon?


I don't think so.

Personally I've always considered notifications the debils work.
_________________
Asus m5a99fx, FX 8320 - nouveau & radeon, oss4
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
4.14.62 kernel, profile 17.0 (no-pie) amd64-no-multilib
gcc 7.3.0, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1635
Location: United Kingdom

PostPosted: Mon Oct 22, 2018 5:18 pm    Post subject: Reply with quote

turtles,

You mean like sending a notification from e.g. a Bash script or whatever? How about:

Code:
$ xmessage "Hello Desktop"


EDIT: Or, if you install Zenity:

Code:
$ zenity --warning --text="Hello Desktop"

_________________
Clevo W230SS: amd64 OpenRC elogind nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 OpenRC elogind xf86-video-ati. Dual boot Win 7 Pro 64-bit.
KDE on both.

Fitzcarraldo's blog


Last edited by Fitzcarraldo on Mon Oct 22, 2018 5:23 pm; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 21345
Location: here

PostPosted: Mon Oct 22, 2018 5:19 pm    Post subject: Reply with quote

Maybe with osd_cat (x11-libs/xosd package)?
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1341

PostPosted: Mon Oct 22, 2018 5:21 pm    Post subject: Reply with quote

Hmm thanks for the reply.

I think there should be a way to do it.
I tried making a file to tell dbus to just use notify-send

/usr/share/dbus-1/system-services/org.freedesktop.Notifications.service

Code:

[D-BUS Service]
Name=org.freedesktop.Notifications
Exec=/usr/bin/notify-send
User=root
SystemdService=Notifications.service

_________________
Donate to Gentoo
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 3691
Location: Dallas area

PostPosted: Mon Oct 22, 2018 5:23 pm    Post subject: Reply with quote

Fitzcarraldo, fedeliallalinea
Yeah, those will work, but not what I call "desktop notification".

If all he needs is a message in a box, then he can use xmessage, xosd, *dialog, etc.

If you have dbus, then dbus-send might be what you need.
https://mail.gnome.org/archives/networkmanager-list/2010-January/msg00212.html

ETA:
hello_world.sh
Code:
#!/bin/bash
notify-send 'Hello world!' 'This is an example notification.' --icon=dialog-information

_________________
Asus m5a99fx, FX 8320 - nouveau & radeon, oss4
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
4.14.62 kernel, profile 17.0 (no-pie) amd64-no-multilib
gcc 7.3.0, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5592

PostPosted: Mon Oct 22, 2018 5:46 pm    Post subject: Reply with quote

Install dunst and configure it to run a script on every message that kills itself after a delay.
Back to top
View user's profile Send private message
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1341

PostPosted: Mon Oct 22, 2018 6:32 pm    Post subject: Reply with quote

Fitzcarraldo wrote:
turtles,

You mean like sending a notification from e.g. a Bash script or whatever? How about:

Code:
$ xmessage "Hello Desktop"


EDIT: Or, if you install Zenity:

Code:
$ zenity --warning --text="Hello Desktop"


Yeah thanks xmessage I was unaware of and that looks reasonable thank you.


zenity pulls in a bunch of stuff that I don't have installed on this system like ruby.

Anon-E-moose wrote:


If you have dbus, then dbus-send might be what you need.
https://mail.gnome.org/archives/networkmanager-list/2010-January/msg00212.html

ETA:
hello_world.sh
Code:
#!/bin/bash
notify-send 'Hello world!' 'This is an example notification.' --icon=dialog-information


Yeah i do have dbus but when I run something like that I get
Code:
notify-send -l Hello Desktop
Sending message over D-Bus failed: The name org.freedesktop.Notifications was not provided by any .service files

I did head the error and made the .service file i posted above.

Ant P. wrote:
Install dunst and configure it to run a script on every message that kills itself after a delay.

Ill try that one now it looks good only one dep.

Thanks everyone
_________________
Donate to Gentoo
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum