Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
0
votes
1
answers
116
views
Broadcasting a message to users in desktop environments
I'm currently writing a small systemd service that may need to shutdown the computer. I'd like to broadcast a message to all users, e.g. `This computer is going to shutdown at XXX, don't forget save your work.` For terminal users, I could use `wall`, but for users who don't have a terminal open, tha...
I'm currently writing a small systemd service that may need to shutdown the computer. I'd like to broadcast a message to all users, e.g.
This computer is going to shutdown at XXX, don't forget save your work.
For terminal users, I could use wall
, but for users who don't have a terminal open, that's not an option. I know that all the users on this machine use X/Gnome, so they have a freedesktop notification client installed. However, it's not clear to me how I can use the system bus (?) to send freedesktop notifications.
How can I do that?
Yoric
(103 rep)
Oct 31, 2024, 11:04 AM
• Last activity: Jul 28, 2025, 12:44 PM
5
votes
1
answers
1986
views
Is there any way to syncronize notifications between a Linux desktop and iOS?
I use `notify-send` and `dunst` for my notification system on my desktop. After a research, I found out that there are a few commercial solutions for sending push notifications to iOS devices, and I even wrote a script using Pushover. However, I did not find any way to get notifications from the iPh...
I use
notify-send
and dunst
for my notification system on my desktop.
After a research, I found out that there are a few commercial solutions for sending push notifications to iOS devices, and I even wrote a script using Pushover.
However, I did not find any way to get notifications from the iPhone displayed on my desktop. (Preferably using a unified notification system, for example using notify-send
). I know that OSX has very good support for this, so I guess it's not impossible, but I did not find any working solution.
Of course, the best solution would be to get full sync, including removing a notification from both places if it has been read in one place.
A lot of this is already solved, of course. E-mail, Facebook, etc. notifications gets "synced" out-of-the-box basically.
I'm ok with having to write scripts, including having to write customized filters, etc. If there's no full solutions, I'm satisfied with getting the building blocks only, especially something that sends the iOS notifications to my desktop somehow.
EDIT: I added the tag Bluetooth because I learned that OSX does this using Bluetooth LE. Looking up Bluetooth LE support still did not help me, though.
kdani
(191 rep)
Dec 15, 2015, 07:06 PM
• Last activity: Jul 12, 2025, 10:08 AM
4
votes
3
answers
7562
views
What's the right way to monitor systemd services status
I'm trying to figure what's the right way for me to be notified when some systemd service is having problems. Manually checking `systemctl status` isn't a sustainable option; at the very least I want to have a simple tray icon, like just green or red. Some sounds and/or visual notifications can be u...
I'm trying to figure what's the right way for me to be notified when some systemd service is having problems. Manually checking
systemctl status
isn't a sustainable option; at the very least I want to have a simple tray icon, like just green or red. Some sounds and/or visual notifications can be useful too. Surprisingly I don't seem to find any existing tools for that, so the best I can think of is to write my own, maybe some simple bash script which would poll systemctl once in a while, and update the icon status.
Pretty poor but alas.
Before I actually start spending time on that, want to make sure, am I by any chance missing some better options?
Dmitry Frank
(2828 rep)
Jul 5, 2021, 07:04 PM
• Last activity: Jul 6, 2025, 02:06 AM
3
votes
3
answers
1955
views
get notification when Red Hat releases update/patch for $PACKAGE
I wish to get email notifications when RedHat releases an update/patch for only certain packages. # rpm -qa | grep maria mariadb-5.5.41-2.el7_0.x86_64 mariadb-galera-common-5.5.41-2.el7ost.x86_64 mariadb-galera-server-5.5.41-2.el7ost.x86_64 mariadb-libs-5.5.41-2.el7_0.x86_64 Galera is in OpenStack c...
I wish to get email notifications when RedHat releases an update/patch for only certain packages.
# rpm -qa | grep maria
mariadb-5.5.41-2.el7_0.x86_64
mariadb-galera-common-5.5.41-2.el7ost.x86_64
mariadb-galera-server-5.5.41-2.el7ost.x86_64
mariadb-libs-5.5.41-2.el7_0.x86_64
Galera is in OpenStack channel. How can I receive an email when MariaDB related packages get released?
We use Satellite snapshots. I need somehow from Redhat to get mails. No systems are patched.
Sybil
(1983 rep)
Mar 1, 2016, 06:31 PM
• Last activity: May 7, 2025, 02:05 PM
1
votes
1
answers
97
views
How can I re-read the apt-listchanges content from my last apt command?
I just ran `apt-get upgrade` on my system, and as part of the installation (which includes many hundreds of packages), apt-listchanges brought up some text document. Unfortunately, I dismissed it before reading it, and now - I don't know what the maintainer wanted to tell me, nor which package it re...
I just ran
apt-get upgrade
on my system, and as part of the installation (which includes many hundreds of packages), apt-listchanges brought up some text document. Unfortunately, I dismissed it before reading it, and now - I don't know what the maintainer wanted to tell me, nor which package it relates to ! :-(
Is there a way I could bring up that changelog / notifications document, again?
Notes:
* You may assume I've not used apt again since this happened.
* I'm using Devuan GNU/Linux Exaclibur, although that should probably not matter. apt version is: 2.9.33devuan1
einpoklum
(10753 rep)
Apr 3, 2025, 09:23 PM
• Last activity: Apr 4, 2025, 10:05 AM
4
votes
5
answers
1949
views
I want to design a script to send alert for Swap usage more than 85%
cat /proc/meminfo | grep Swap SwapCached: 460248 kB SwapTotal: 8388600 kB SwapFree: 1031900 kB I want to use this information to compare it with a threshold value. When the limit is reached, a warning shall be sent. Could I get any help on this?
cat /proc/meminfo | grep Swap
SwapCached: 460248 kB
SwapTotal: 8388600 kB
SwapFree: 1031900 kB
I want to use this information to compare it with a threshold value. When the limit is reached, a warning shall be sent.
Could I get any help on this?
Mohit Joshi
(41 rep)
Apr 8, 2015, 10:25 AM
• Last activity: Feb 13, 2025, 09:55 AM
1
votes
1
answers
289
views
Firefox KDE notifications are displayed in middle of screen and capture focus
In KDE, browser notification popups from Firefox started to display in the center of the screen since a while ago instead of in a corner on the right. They also started to steal the focus so if I'm writing something the input field loses focus when the notification is displayed. I'm running Debian 1...
In KDE, browser notification popups from Firefox started to display in the center of the screen since a while ago instead of in a corner on the right. They also started to steal the focus so if I'm writing something the input field loses focus when the notification is displayed.
I'm running Debian 12 with KDE Plasma 5.27.5.
----
I already tried going to System Settings -> Notifications -> Choose Custom Position where I selected the corner where they used to display but that didn't fix the issue. There is no setting about the focus (I read notifications are not supposed to capture focus so there is no need for such a setting). I tested
notify-send te st
and that notification displays in the corner where I configured it but it's different for the notifications from firefox (there are also websites that can send test notifications that make testing this easy). In Firefox, there are no notification settings in the preferences other than which websites have notifications allowed or blocked and I couldn't find any setting for that in about:config.
I'm sandboxing the Firefox with firejail maybe it has to do with that but again it used to work and I didn't change the firejail profile for Firefox in the meantime. It could also be because of some upgrade. It may also have to do with another screen that I connect to sometimes which has another resolution (that display is currently not enabled in display settings and turned off).
Do other users with Debian 12 and KDE also have this issue? If it's a bug I don't know if it's in firefox, kde (which package), firejail, or something else so I hope this is a known problem and maybe already solved by somebody.
mYnDstrEAm
(4708 rep)
Dec 30, 2024, 11:04 PM
• Last activity: Jan 13, 2025, 01:07 PM
0
votes
2
answers
155
views
How to disable "Text Copied" pop up when copying text (Debian 12)
This might be a very basic question but I have tried searching this on google for a long time without any success. I recently installed Debian 12 (using Gnome 43 DE). When I try to copy any text, there is a popup (shown in the screenshot) and a sound that is played. Is there any way to disable the p...
This might be a very basic question but I have tried searching this on google for a long time without any success. I recently installed Debian 12 (using Gnome 43 DE). When I try to copy any text, there is a popup (shown in the screenshot) and a sound that is played. Is there any way to disable the pop up and the sound?
Turning on "Do Not Disturb" does prevent the pop up from showing but then this also hides all other notifications. I tried going to "Settings>Notifications" but there is no option for turning off this "Text Copied" pop-up.

Rishi Menon
(1 rep)
Jul 11, 2024, 01:40 AM
• Last activity: Dec 10, 2024, 07:43 PM
4
votes
1
answers
2595
views
Notify-send doesn't work at Cinnamon
I am using `Linux Mint 17`. I want to be informed every 50 min, at every hour for small break. Here is ***cron job***: nazar@desktop ~ $ crontab -l DISPLAY=:0.0 XAUTHORITY=/home/matrix/.Xauthority 00 13 * * * /home/nazar/Documents/scripts/lunch_break_job.sh # JOB_ID_2 50 * * * * /home/nazar/Document...
I am using
***How to solve this issue?***
**SOLUTION:**
Now my
Linux Mint 17
.
I want to be informed every 50 min, at every hour for small break.
Here is ***cron job***:
nazar@desktop ~ $ crontab -l
DISPLAY=:0.0
XAUTHORITY=/home/matrix/.Xauthority
00 13 * * * /home/nazar/Documents/scripts/lunch_break_job.sh # JOB_ID_2
50 * * * * /home/nazar/Documents/scripts/pc_break.sh # JOB_ID_1
* * * * * /home/nazar/Documents/scripts/cron_job_test.sh # JOB_ID
Here is script for /home/nazar/Documents/scripts/cron_job_test.sh
:
#!/bin/bash
export DISPLAY=0.0
export XAUTHORITY=/home/matrix/.Xauthority
if [ -r "$HOME/.dbus/Xdbus" ]; then
. "$HOME/.dbus/Xdbus"
fi
/usr/bin/notify-send -i "hello"
This snippet of function:
if [ -r "$HOME/.dbus/Xdbus" ]; then
. "$HOME/.dbus/Xdbus"
fi
Checks DBUS_SESSION_BUS_ADDRESS
and uses it.
[According to this answer](https://unix.stackexchange.com/questions/111188/using-notify-send-with-cron) I executed script, and now my Dbus
is saved to $HOME/.dbus/Xdbus
:
nazar@desktop ~ $ cat $HOME/.dbus/Xdbus
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-flm7sXd0I4,guid=df48c9c8d751d2785c5b31875661ebae
export DBUS_SESSION_BUS_ADDRESS
All should work. I couldn't find what is missed. Because notification doesn't work now.
From terminal it works fine:

crontab
looks as follows:
DISPLAY=":0.0"
XAUTHORITY="/home/nazar/.Xauthority"
XDG_RUNTIME_DIR="/run/user/1000"
00 13 * * * /home/nazar/Documents/scripts/lunch_break_job.sh # JOB_ID_2
50 * * * * /home/nazar/Documents/scripts/pc_break.sh # JOB_ID_1
# * * * * * /home/nazar/Documents/scripts/cron_job_test.sh # JOB_ID
and cron_job_test.sh
looks now:
#!/bin/bash
/usr/bin/notify-send -i /home/nazar/Pictures/icons/Mail.png "hello" "It is just cron test message"
pc_break.sh
:
:bash
#!/bin/bash
/usr/bin/notify-send -i /home/nazar/Pictures/icons/download_manager.png "Break:" "Make a break for 10 min"
lunch_break_job.sh
:
:bash
#!/bin/bash
/usr/bin/notify-send -i /home/nazar/Pictures/icons/Apple.png "Lunch: " "Please, take a lunch!"
Keep in mind that scripts should be executable.
catch32
(221 rep)
Dec 7, 2015, 09:17 AM
• Last activity: Nov 12, 2024, 07:35 PM
0
votes
1
answers
812
views
How to turn off a notification coming from a website?
I accidentally subscribed to news notifications from a stock market site and now I am getting notifications every few minutes that are irritating me. I do get other notifications for email I'd like to keep. How can I find which alerts are active on my system and turn them off? Or failing that, turn...
I accidentally subscribed to news notifications from a stock market site and now I am getting notifications every few minutes that are irritating me.
I do get other notifications for email I'd like to keep. How can I find which alerts are active on my system and turn them off? Or failing that, turn them all off.
I am working on a Linux Mint 17.3 system, it is my own (I have the root password).
P.S. The Zacks.com site has an alert area, but it says I am not subscribed. I thought this was the site, but the alerts don't show who they are from, and I was surfing other market sites yesterday, too. So I'd just like to know how to look at a list, or if getting rid of cookies would work, or something like that.
Amadeus
(119 rep)
Oct 25, 2019, 02:03 PM
• Last activity: Oct 20, 2024, 01:47 PM
0
votes
1
answers
698
views
How to get the name of the last mounted/unmounted filesystem
I'm know I can monitor (using [poll][1], or [select][2]) on the files `/proc/mount` or `/etc/mtab` and findout **WHEN** a filesystem is mounted or unmounted. Also I can use [getmntent][3] for getting a list of mounted filesystems. My app is intended to monitor the mounted filesystem and report any c...
I'm know I can monitor (using poll , or select ) on the files
/proc/mount
or /etc/mtab
and findout **WHEN** a filesystem is mounted or unmounted. Also I can use getmntent for getting a list of mounted filesystems.
My app is intended to monitor the mounted filesystem and report any change (mount or unmount).
My solution:
1. Detect some change in /proc/mounts
.
2. Get all currently mounted filesystem with getmntent
.
3. Compare the obtained list with some previous list.
4. Process the difference.
But I need to know if there are some way to get the last filesystem mounted when polling from /proc/mounts
or /etc/mtab
. Just reading the file or polling data into some structure (like mntent
for instance.)
Raydel Miranda
(299 rep)
Apr 25, 2014, 01:28 PM
• Last activity: Oct 7, 2024, 04:32 AM
0
votes
2
answers
316
views
Wrong notification system in KDE Plasma (again)
I'm using KDE Plasma on Suse Tumbleweed but the notifications are not working any more. When I try to configure the notifications using the Configuration app, I'm told that > Notifications are currently provided by 'GNOME cinnamon' instead of Plasma. I found [wrong-notification-system-in-kde-plasma]...
I'm using KDE Plasma on Suse Tumbleweed but the notifications are not working any more. When I try to configure the notifications using the Configuration app, I'm told that
> Notifications are currently provided by 'GNOME cinnamon' instead of Plasma.
I found [wrong-notification-system-in-kde-plasma](https://unix.stackexchange.com/questions/603186/wrong-notification-system-in-kde-plasma) and applied the accepted answer solution to my problem
mkdir -p ~/.local/share/dbus-1/services/
ln -s /usr/share/dbus-1/services/org.kde.plasma.Notifications.service \
~/.local/share/dbus-1/services/org.kde.plasma.Notifications.service
followed by a restart but nothing changed, in the configuration app I still have
> Notifications are currently provided by 'GNOME cinnamon' instead of Plasma.
What should I do the have notifications working as they used to do?
---
Addendum
Just because
dbus
is involved,
$ sudo systemctl status dbus
● dbus-broker.service - D-Bus System Message Bus
Loaded: loaded (/usr/lib/systemd/system/dbus-broker.service; enabled; preset: >
Drop-In: /usr/lib/systemd/system/dbus-broker.service.d
└─block-restart.conf
Active: active (running) since Fri 2024-09-06 11:46:03 CEST; 29min ago
Invocation: 4aaf4a564c6945a395fa85e24111783a
TriggeredBy: ● dbus.socket
Docs: man:dbus-broker-launch(1)
Main PID: 1578 (dbus-broker-lau)
Tasks: 2 (limit: 18352)
CPU: 501ms
CGroup: /system.slice/dbus-broker.service
├─1578 /usr/bin/dbus-broker-launch --scope system --audit
└─1579 dbus-broker --log 4 --controller 9 --machine-id cbd4a50f23a94e8>
Sep 06 11:46:03 localhost systemd: Starting D-Bus System Message Bus...
Sep 06 11:46:03 localhost systemd: Started D-Bus System Message Bus.
Sep 06 11:46:03 localhost dbus-broker-launch: Ready
gboffi
(1376 rep)
Sep 6, 2024, 09:53 AM
• Last activity: Sep 7, 2024, 03:48 PM
1
votes
2
answers
153
views
Be notified of new mail in any Maildir inbox under ~/Mail, in the Zsh shell
I have a cron job that fetches new mail from several mail servers every 20 minutes. The mail is automatically sorted into Maildir mailboxes in a hierarchy under `~/Mail`. I want to be notified in the shell if a new message has arrived in any local mailbox in the last 20 minutes. I'm using the `zsh`...
I have a cron job that fetches new mail from several mail servers every 20 minutes. The mail is automatically sorted into Maildir mailboxes in a hierarchy under
~/Mail
.
I want to be notified in the shell if a new message has arrived in any local mailbox in the last 20 minutes.
I'm using the zsh
shell.
Kusalananda
(354269 rep)
Jul 14, 2024, 03:53 PM
• Last activity: Aug 13, 2024, 12:22 AM
0
votes
2
answers
112
views
Battery notification script works on its own but does not work when triggered by a systemd-service
On my Gentoo Linux with dunstify as a notification daemon and StumpWM as a window manager, I wrote the following bash-script that is meant to inform me about my battery status: ``` #!/bin/bash #This script notifies you if your battery is under 80% and puts the laptop to sleep in 5min if it is under...
On my Gentoo Linux with dunstify as a notification daemon and StumpWM as a window manager, I wrote the following bash-script that is meant to inform me about my battery status:
#!/bin/bash
#This script notifies you if your battery is under 80% and puts the laptop to sleep in 5min if it is under 50% and isn't plugged in within that time.
if ! [ -z "$(acpi -b | cut -c 25)" ] && [[ $(acpi -b | cut -c 25) -lt 8 ]] && ! [[ "$( acpi -b | cut -c 28)" == "%" ]]
then if ! [ -z "$(acpi -b | cut -c 25)" ] && [[ $(acpi -b | cut -c 25) -lt 5 ]] && ! [[ "$(acpi -b | cut -c 28)" == "%" ]]
then dunstify "Battery Jul 10 16:02:54 gentoolaptop systemd: battery.service: Main process exited, code=exited, s>░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://gentoo.org/support/
░░
░░ An ExecStart= process belonging to unit battery.service has exited.
I've been trying to run this as a user service, where I get this message, and as a system service, where I get told that XDISPLAY and XAUTHORITY isn't set. Why can't it send messages when triggered as a service?
Alexander Praehauser
(221 rep)
Jul 10, 2024, 02:55 PM
• Last activity: Jul 27, 2024, 08:04 AM
1
votes
1
answers
2967
views
How do I get the desktop notifications?
I want to display my desktop notifications (I'm using Gnome 3) on some other device. So I want to write a software that gets the notification on my computer and sends it over the internet. Unfortunately, I didn't find any good point to start on how my code can get the notifications and do something...
I want to display my desktop notifications (I'm using Gnome 3) on some other device. So I want to write a software that gets the notification on my computer and sends it over the internet. Unfortunately, I didn't find any good point to start on how my code can get the notifications and do something with them.
Is there some API for it?
Florian
(347 rep)
Aug 21, 2016, 05:42 PM
• Last activity: Jul 17, 2024, 02:27 PM
3
votes
2
answers
4036
views
Setup NUT power failure notifications when running computer on UPS battery
### Description of the problem #### I have [UPS][1] [Orvaldi KC2000][2] (its capacity: 2000VA/1400W) and I want to setup configuration of my [Debian 10][3] ([Buster][4] which is currently [testing][5]) to: 1. *get GUI (preferably GNOME) notifications* when there is power failure and my computer is r...
### Description of the problem ####
I have UPS Orvaldi KC2000 (its capacity: 2000VA/1400W) and I want to setup configuration of my Debian 10 (Buster which is currently testing ) to:
1. *get GUI (preferably GNOME) notifications* when there is power failure and my computer is running on UPS battery (to know that I have little time to save the work and turn off the system),
1. *automatically turn off the computer* when the battery of my UPS is critically low.
I hoped that this is easy with NUT (*Network UPS Tools*), but it turned out that there is no obvious way to meet the 1-st requirement – which is getting GUI (preferably GNOME) notifications.
### What I've done to solve the problem? ###
I've installed NUT (provided by
nut
package which installs \[among others\] nut-server
and nut-client
) and I configured it by editing files residing in /etc/nut
directory.
root@host:~# ls /etc/nut
nut.conf ups.conf upsd.conf upsd.users upsmon.conf upssched.conf
specifically:
- /etc/nut/upsd.users
:
[upsmon] # name of my UPS
password = my_UPS_password
actions = SET
instcmds = ALL
upsmon master
- /etc/nut/nut.conf
:
MODE=standalone
- /etc/nut/ups.conf
:
maxretry = 3
[myups]
driver = blazer_usb
port = auto
- /etc/nut/upsmon.conf
:
MONITOR myups@localhost 1 upsmon my_UPS_password master
MINSUPPLIES 1
SHUTDOWNCMD "/sbin/shutdown -h +0"
POLLFREQ 5
POLLFREQALERT 5
HOSTSYNC 15
DEADTIME 15
POWERDOWNFLAG /etc/killpower
RBWARNTIME 43200
NOCOMMWARNTIME 300
FINALDELAY 5
- rest of the files (/etc/nut/upsd.conf
, /etc/nut/upssched.conf
) have default content – /etc/nut/upsd.conf
is empty and /etc/nut/upssched.conf
has single line: CMDSCRIPT /bin/upssched-cmd
.
(I skipped the comments sections in the above listings.)
After editing above configuration files I needed to run systemctl restart nut-*
. *
may be overkill, but I don't remember which services need to be restarted – nut-client.service
, nut-driver.service
, nut-monitor.service
or nut-server.service
.
I also installed nut-monitor
which (quote): *provides nut-monitor, a GUI application to monitor UPS status*. I hoped that nut-monitor
has some functionality that allows to popup warning window if UPS battery is low or there is some way to configure GNOME to display status of the UPS, but unfortunately I didn't find any way to do that.
To simulate power failure I use 2 commands: upsdrvctl -t shutdown
and upsmon -c fsd
(which shuts down the computer).
Recently I've found that there is nut-hal-drivers
package that provides GUI notifications, but:
1. I can't find this package in Debian repository.
1. nut-hal-drivers
package apparently doesn't work with upsmon
and upsd
provided by the nut
package.
### The question ###
**My question:** how can I setup configuration of my system to popup some kind of warning (preferably popup message native for given desktop environment) if there is power failure and my computer is using UPS' battery?
patryk.beza
(1229 rep)
Feb 19, 2018, 06:49 PM
• Last activity: Jun 21, 2024, 06:59 AM
51
votes
13
answers
44896
views
How can I get an alert when my battery is about to die in Linux Mint?
This happens to me more than I'd like to admit, but sometimes I don't notice the power getting low since it only shows up in my status bar, then the computer just quits. I'd like a big alert that warns me before this happens. Is there any way for it to alert me? Ubuntu has a nice popup that tells yo...
This happens to me more than I'd like to admit, but sometimes I don't notice the power getting low since it only shows up in my status bar, then the computer just quits. I'd like a big alert that warns me before this happens. Is there any way for it to alert me? Ubuntu has a nice popup that tells you it's getting low.
Travis Reeder
(873 rep)
Jan 9, 2013, 05:59 PM
• Last activity: Mar 29, 2024, 07:12 AM
3
votes
2
answers
3088
views
How do notifications work on linux?
I use ArchLinux, but this should be irrelevant, other than being the reason why I often refer to [its wiki pages](https://wiki.archlinux.org/). I think don't have a really clear understanding of how notifications work, and what are the "players" interacting for notifications to work: - how many play...
I use ArchLinux, but this should be irrelevant, other than being the reason why I often refer to [its wiki pages](https://wiki.archlinux.org/) .
I think don't have a really clear understanding of how notifications work, and what are the "players" interacting for notifications to work:
- how many players are involeved?
- What is a notification server, and what does it _serve_?
- What is a notification client, and what does it _do_?
- What is this
notify-send
thing I can use to make a notification pop up? Is _it_ the (well, _a_) client?
- What is a _notification daemon_?
- And what is the role of [libnotify
](https://archlinux.org/packages/?name=libnotify) ?
---
In an attempt to understand that and to set up notifications on my system, I referred to [this wiki page](https://wiki.archlinux.org/title/Desktop_notifications).¹ ;
I've tried with [notification-daemon
](https://gitlab.gnome.org/Archive/notification-daemon) first. This doesn't work just upon installing it. For a call to notify-send
to be successful, one has to either launch it (it means executing /usr/lib/notification-daemon-1.0/notification-daemon
) manually, autostart it somehow, or create a file at /usr/share/dbus-1/services/org.freedesktop.Notifications.service
with this content
[D-BUS Service]
Name=org.freedesktop.Notifications
Exec=/usr/lib/notification-daemon-1.0/notification-daemon
Then I tried [dunst
](https://wiki.archlinux.org/title/Dunst) , but that, as soon as installed, just works, in the sense that notify-send
just works. I think this is fundamentally because it starts itself upon the first call to notify-send
(which means that I initally had the impression that it worked also after I had uninstalled it; that's because the dunst
process was running), but how does it do that?
And these two, notification-daemon
and dunst
are both under the section [Notification servers > Standalone](https://wiki.archlinux.org/title/Desktop_notifications#Standalone) , but they are also called "notification daemons"; does it mean that _notification daemon_ and _notification server_ are synonyms? If not, where's the difference?
And from the perspecitve of the user (me), is the difference between those two aesthetic? I mean, when one is running vs the other is running, I see that the notification looks different. Incidentally, here comes the question "what are they serving?", because it looks to me that they are only waiting for some other tool to send them notifications, so that they can show them in a nice way. Or are both of them doing both things? In either case, where do the notifications originally come from? How do they get to notification boxes?
Anyway, what if I want to do custom stuff with the notifications? Say that I want to get them all and have my own shell script that, say, just appends them in a file ~/notifications
. Would that mean I'm writing my own notification server? Or client? Or what?
The reason I'm asking is that I want to experiment with the idea that I can show notifications in the [xmobar
](https://codeberg.org/xmobar/xmobar) status bar (which I use with XMonad window manager), so I'm trying to understand all the bits.
I've also given a look at [statnot
](https://github.com/halhen/statnot) which seems very very skinny and without frills, but with reference to the my previous paragraph, it feels like using statnot
would still mean that I would still have to write a configuration that, via the function update_text
, calls into some API that xmobar or xmonad exposes. This way I would not have control on, say, how many notifications I want to show at a time.
I'm getting a bit lost :/
Trying to understand the implications on this question of mine from the [Desktop Notifications Specification](https://specifications.freedesktop.org/notification-spec/notification-spec-latest.html) has been unsuccessful :D
---
(¹) But [I had a pre-existing "bug" in my ~/.xinitrc
, so I had to solve that first](https://bbs.archlinux.org/viewtopic.php?pid=2145202#p2145202) .
Enlico
(2258 rep)
Jan 25, 2024, 07:17 PM
• Last activity: Feb 19, 2024, 05:10 PM
1
votes
0
answers
123
views
Cause a script to execute when the default route is changed
I have 2 interfaces: the Ethernet (metrics 1) and 4G (metrics 2). When the first disappears the second is used, when the Ethernet comes back, the first one is used again. I would like to send a notification (run the script send.sh) when the metrics (indeed route) is changed, eg, "Ethernet is tempora...
I have 2 interfaces: the Ethernet (metrics 1) and 4G (metrics 2). When the first disappears the second is used, when the Ethernet comes back, the first one is used again. I would like to send a notification (run the script send.sh) when the metrics (indeed route) is changed, eg, "Ethernet is temporary unavailable, using 4G data" and "Ethernet comes back".
I use Ubuntu 22.04 with NetworkManager.
I would like to create a system service, which may listen to the route state and send notifications when it changes its metric/route.
Please, help me to understand how to do that. Thanks!
Oleksa
(151 rep)
Nov 5, 2023, 03:47 PM
• Last activity: Jan 11, 2024, 08:11 PM
10
votes
2
answers
9613
views
Find out the owner of a DBus service name
I can't find a way to find what program implements the `org.freedesktop.Notifications` service. Is it possible to ask DBus to tell me what program provides it? The reason for asking this question is quite banal: I found a new desktop notifications daemon I'd like to use, but it won't start and inste...
I can't find a way to find what program implements the
org.freedesktop.Notifications
service. Is it possible to ask DBus to tell me what program provides it?
The reason for asking this question is quite banal: I found a new desktop notifications daemon I'd like to use, but it won't start and instead complains with this message
> Name Lost. Is Another notification daemon running?
However, I am unable to determine what program *is* holding the name. I already uninstalled every other notification daemon, restarted X server, and even rebooted the machine.
However, when I run this command:
dbus-send --session --dest=org.freedesktop.DBus --type=method_call \
--print-reply /org/freedesktop/DBus org.freedesktop.DBus.ListNames
string "org.freedesktop.Notifications"
is present in the output, so *something* is holding the name, and I can't start my desired daemon.
Mael
(223 rep)
Jul 20, 2017, 06:33 PM
• Last activity: Nov 27, 2023, 01:26 PM
Showing page 1 of 20 total questions