LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-15-2022, 12:28 PM   #1
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,501
Blog Entries: 2

Rep: Reputation: 68
display system notification to regular user.


I am using the borgmatic's hook feature to notify me that a backup started/finished using notify-send:

Code:
sudo -u miguel DISPLAY=:0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus notify-send "Borgmatic started" "backup home"
(sudo necessary as borgmatic run as root)

and as user "miguel" I had to disable X access control ("xhost +") to get this working.

It is working but I would like to know/learn if there is another better approach ?
I suspect there is another way, as I saw notifications from updates that are available, notifications that a new disk was plugged/unplugged and many others that I suspect they are generated by system processes (not mine).

Also, I realize this hack works only for user miguel (myself) running X, but would be nice a solution that worked for the current user whatever he/she is running either X or Wayland,....but this is not really important....

Generally speaking, how a root process can notify an user of something happened ?

I am using KDE if that matters.

Last edited by marozsas; 07-16-2022 at 06:45 AM.
 
  


Reply

Tags
system notification



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] how to change "-bash-4.1$ "to regular user mood user user@ mhsahkir Linux - Newbie 6 03-31-2015 12:39 PM
difference between regular user and system user (and groups) kushalkoolwal Linux - General 1 09-28-2010 04:25 PM
Few questions about Nagios - reboot notification, value=x notification. marccmile Linux - Software 5 06-04-2009 06:44 PM
Jack-Audio-Control-Kit will not display midi devices as regular user: animehair Linux - Software 3 05-03-2008 02:17 PM
E-Mail notification to users via SMS (gateway script ok, but notification script?!?) Riku2015 Linux - Networking 10 03-08-2002 10:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration