Hot answers tagged notifications
9
"A package manager is working" means that something is holding a lock on /var/lib/dpkg/lock and/or/var /cache/apt/archives/lock. You can find out which process this is with the fuser command:
dennis@lightning:~$ sudo fuser /var/lib/dpkg/lock /var/cache/apt/archives/lock
/var/lib/dpkg/lock: 18049
/var/cache/apt/archives/lock: 18049
dennis@lightning:~$ cat ...
7
This is probably the urgency hint which can be set on windows. This hint is recognized by most window managers.
Most terminals can be configured to set the urgency hint when receiving a bell.
(u)xterm for example has the bellIsUrgent option and (u)rxvt has urgentOnBell.
To ring the bell in a terminal just run tput bel or echo "\a" (depending on the shell ...
5
You can send a message to all consoles with the command wall.
For sending notifications under X there is notify-send which sends a notification to the current user on the current display. (From your question, I guess you already know this one.) You can build upon this with some bash scripting. Basically you have to find out which users are on which ...
5
You do it the other way around:
$ pushover-notify "This is my message" command arg1 arg2
Your script pushover-notify could be something like this:
#!/bin/sh
TOKEN=your_token
USER=your_user
MSG="$1"
COMMAND="$2"
shift 2
if "$COMMAND" "$@" ; then
# here run your send-message script, with message "$MSG". for example:
curl -s \
-F ...
4
I think you would be better off just removing libnotify and notify-send from the equation, given your stated requirements they do not provide any additional flexibility of functionality.
If you are looking for a minimal status bar, conky has a comprehensive amount of functionality, all of which can be updated in real time (depending upon how resource ...
4
There used to be a lot of broken routers out there that would drop any packets with the ECN bits set. I remember trying it and experiencing this personally. This site gives you a taste of how things used to be, particularly the "8% of the internet unreachable!" link. It's of roughly the same vintage as the article you linked; as Mat pointed out, the article ...
4
hey you can always write your own!
#!/usr/bin/python
import imaplib
M = imaplib.IMAP4_SSL('imap.gmail.com')
if (M.login('YOU@gmail.com','PASSWORD')[0] != 'OK'): exit("no conn")
c = (M.select('Inbox'))[1][0]
if (c != '0'):print c
M.shutdown()
you can emit this into dmenu or another wm notification tool
4
You can try wall. On my KDE machine, a small panel pops up with the message sent with wall. Of course, the message also appears in all terminals, but maybe your users do not have a terminal open. Example:
echo "It is 9 o'clock and all is well." | wall
3
Use update method and call show method again:
#!/usr/bin/python
# -*- coding: utf-8 -*-
import pynotify
import time
pynotify.init("Basic")
n = pynotify.Notification("Title1", "body1", "dialog-warning")
n.show()
time.sleep(1)
n.update("Title2", "body2", "dialog-warning")
n.show()
Update:
There is close method but... it doesn't work at all. ...
3
You can the pam_lastlog module to display the date of last login upon successful logon.
You can refer to the pam_lastlog man page for more options, but to accomplish what you want just add the following to the /etc/pam.d/login file
session required pam_lastlog.so nowtmp
3
I am now using Trysterobiff. It is a non-polling IMAP mail notifier for the
systray. It implements the requirements, including the execution of external
commands and does not crash.
I've written it using Qt, thus Trysterobiff is quite portable. The non-polling
operation is implemented using the IDLE extension of IMAP, i.e. you are immedialtely notified of ...
3
In KDE 4.8 (sorry I don't have access to anything older ) you can click on the "show hidden icons button" in your panel, then right click on "notifications", click "notification settings". Here you will see some options on what to show. However each application has it's own menu for what events it has send notifications.
An even Better option might be to ...
3
Partial answer: as SL uses GNOME, this tells you the gconf keys for disabling at least the power management's notifcations. So in case these are your "annoying" ones...
Edit another part, I think you're done with notifications if you disable the Notification Area Applet, probably via some GUI panel options.
2
I have my programs send me emails, or beep the console when they are finished. I use the && character which tells console to wait for the previous command to finish and I end the whole thing with another & to get control of the console back.
So your example would look like this:
apt-get -b source packagename && sleep 10 && ...
2
On Arch Linux I removed exec permission on notification-daemon lib.
I found this temporary quick fix when I was searching for solution to this same problem.
$ sudo chmod -x /usr/lib/notification-daemon-1.0/notification-daemon
Some of annoying notifications you can disable here:
$ gnome-session-properties
For example you can disable "Print Queue ...
1
From CLI, you can display and close a notification pop-up via gdbus/qdbus.
Here's how to that with gdbus:
gdbus call --session --dest org.freedesktop.Notifications --object-path /org/freedesktop/Notifications --method org.freedesktop.Notifications.Notify my_app_name 42 audio-card "Message" "Body" [] {} 20
this will output something like:
(uint32 72,)
...
1
A bit convoluted, but it works:
#!/bin/bash
now=`date +%s`
max_age=10800 # 3 hours in seconds
if [ $(($now - `stat -c '%Y' $1`)) -gt $max_age ]; then
echo "file hasn't been updated in $max_age seconds"
fi
Call the script with the filename as the only argument.
1
Maybe using:
notify-send -u low|normal|critical 'Foo' 'Bar'
could solve your problem...
low and normal shouldn't show up in fullscreen mode, but critical!
EDIT:
looks like it's a bug, which is fixed since version 3.5.3.
see comments for links (to less reputation to post them here again)
Solution:
Update to >3.5.3 or script a little wrapper (grep ...
1
You can maybe try the solution via dbus-send proposed there :
dbus-send --session --type=method_call --reply-timeout=10000 \
--dest=org.freedesktop.Notifications \
/org/freedesktop/Notifications org.freedesktop.Notifications.Notify \
string:"app_name" \
uint32:0 \
string:'app_icon' \
string:"summary" \
string:"body" \
array:string:"" \
...
1
notify-send --icon=/path/to/XX.png will only set the icon displayed in the dialog,
But for the tray icon, you need to refer to your KDE plasma theme, which is theme_dir/icons/notification.svgz
To find all your kde plasma themes installed, check out these two locations,
/usr/share/kde4/apps/desktoptheme/ (system location)
And ...
1
Short: there is not the solution(TM) for what you want.
However, with sufficient knowledge about your setup it may be possible to develop a solution that works for you. I had the same problem once.
The reason why it's so difficult is that the Xserver is precicely not tied to a user. You can confirm that on any major Linux distribution by loging in to the ...
1
You might try changing the display variable slightly:
DISPLAY=:0.1 notify-send [options] "summary" "body"
Usually, your desktop screens are :0, and the main is :0.0, second is :0.1, and so forth.
If I remember correctly, this should put it on the other screen.
you might need to have a wrapper script or such to change the value of DISPLAY when executing ...
1
I think that notify-send relies on on D-Bus on most systems, and the most common method of contacting dbus is via the $DBUS_SESSION_BUS_ADDRESS variable. However hard-coding this in crontab is probably not very workable since the bus address changes every time you start a new instance of dbus which usually happens whenever you log in or reboot. Arcege's ...
1
About the only thing that I can suggest is to create a named pipe and have cron write to the pipe and have a little script started by the session manager that reads from the pipe and calls notify-send:
while read line < /tmp/.cron2notify.s # pipe name in /tmp
do notify-send "Cron message" "$line"
done
Then in the crontab, have the program write to ...
Only top voted, non community-wiki answers of a minimum length are eligible

