Questions tagged [notify-send]

34 questions
4
votes
2 answers

Run shutdown command inside bash script

I'm trying to make an executable file (bash script) to show me a notification and shutdown my computer when a process is not found. I will run the script as a Startup Application and I'm using the notify-send and shutdown commands in this script. …
4
votes
3 answers

notify-send from within a bash script

I'd like to use notify-send from within a bash script that is running in the background to inform the user about the progress of the script. More specifically this is a script that automagically runs when a USB flash drive is inserted and runs a…
Andor Kiss
  • 165
  • 1
  • 9
4
votes
0 answers

Linux notify-send long message

I am using notify-send on Ubuntu. Sometime the message is too long and the cutoff the beginner ... message line 1 message line 2 How to deal if this and cut the end of the message? How much long can be the message to the nofity-send? (it depends of…
hildogjr
  • 754
  • 2
  • 6
  • 17
3
votes
1 answer

notify-send command doesn't launch the notification through systemd service

I'm trying to use a systemd service to send a desktop notification using a .sh script with notify-send command. My script notif.sh is the following: #!/bin/bash notify-send "Hello World" and my systemd service notifme.service is the next…
biorubenfs
  • 643
  • 6
  • 15
3
votes
3 answers

systemd service not executing notify-send

I want to generate pop-ups for certain events in my python script. I am using 'notify-send' for that purpose. subprocess.Popen(['notify-send', "Authentication", "True/False"]) The above command executes fine on terminal but when I run it from…
Wajahat
  • 107
  • 1
  • 2
  • 10
2
votes
0 answers

Running notify-send as root under Wayland

I need to send a desktop notification to the user from some shell scripts using notify-send, so i found this answer and it's working under X11 without any problem, so i tried to add Wayland support to the script by using $WAYLAND_DISPLAY to make it…
markoly
  • 33
  • 4
2
votes
0 answers

Get Desktop Notifications On Linux Programmatically

I want to develop a notification daemon with an applet. When an app sends a notification to a user for example Discord. I want to get the notification and show it to the user and store the notifications in the applet. I know how to send…
2
votes
0 answers

Capture Desktiop Notification in Linux

Hi Guys I'm using Fedora 32 Workstation. I wanted to know is there a way to capture desktop Notification using some shell script or python script. I want to keep a log of all the desktop notification. So far I am able to only create notification…
2
votes
1 answer

Notify-send not working in python script run with sudo

I'm writing a python script that is run with sudo permissions. At some point, I would like to send a notification to the user. I have noticed that notify-send does not work as a root user, so I tried to run it as the actual user by doing su…
dvilela
  • 1,200
  • 12
  • 29
2
votes
1 answer

Ubuntu - PHP | notify-send looks different when called through PHP

I am currently working on building a php command line app and I make use of notify-send to send notification in my Ubuntu 17.10 which now comes with gnome. The notifications look fine and as they should when I manually run the cli app in terminal.…
Sapnesh Naik
  • 11,011
  • 7
  • 63
  • 98
2
votes
2 answers

sudo -u username notify-send stuck

here is my code: roroco@roroco ~/Dropbox/rbs/ro_wemedia $ time sudo -u root notify-send 'prpr' real 0m0.033s user 0m0.008s sys 0m0.012s roroco@roroco ~/Dropbox/rbs/ro_wemedia $ time sudo -u roroco /usr/bin/notify-send "prpr" real …
chikadance
  • 3,591
  • 4
  • 41
  • 73
1
vote
1 answer

I can't keep a bash script alive in ubuntu 20.04

I found and slightly modify the following script, that monitor the notify-send notifications and dump them in a file. #!/bin/bash logfile=$1 dbus-monitor "interface='org.freedesktop.Notifications'" |\ grep --line-buffered "string" |\ grep…
kurokirasama
  • 737
  • 8
  • 31
1
vote
0 answers

notification from c++ privilege daemon process to all users

I have a c++ privileged daemon process which is running as root. Want to send notification to all the desktop users programmatically using libnotify-dev package.How can it be done in cleaner way.
vkg
  • 685
  • 1
  • 8
  • 21
1
vote
1 answer

what are the differences in libnotify dev versus libnotify bin

what is the difference in 2 libraries? Which one is prefered for production apps? Why is there significantly different set of dependencies while installing?
vkg
  • 685
  • 1
  • 8
  • 21
1
vote
1 answer

ShellScript parsing a sting variable to notify-send

I have never seen this anywhere in my search I am making a script to see if I can send a string variable to notify-send so far $MESSAGE='Hello world!' notify-send "`$MESSAGE`" -t 1 will trow Hello command not found and notify-send $MESSAGE -t…
Spark_TheCat
  • 89
  • 1
  • 13
1
2 3