LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-22-2012, 07:36 PM   #1
Cultist
Member
 
Registered: Feb 2010
Location: Georgia
Distribution: Slackware64 14.2
Posts: 779

Rep: Reputation: 107Reputation: 107
popup balloon in a script?


I'm wondering if there is any way to create a pop-up balloon in KDE/XFCE/whatever in a script, like the kind that typically appears in the bottom right corner in KDE or the top right corner in XFCE.

Basically I want to automatically run this little script every hour or something:
Code:
UPDATE=$(slackpkg check-updates)
if [ "$UPDATE" = "No News Is Good News" ]; then
	exit
fi
slackpkg update
except after the last command, I would like a balloon to alert me that there are fresh updates to install.

Anyone know a way to do this?
 
Old 06-22-2012, 08:11 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
You can use notify-send for this:
Code:
notify-send "There are updates available."
 
1 members found this post helpful.
Old 06-24-2012, 03:12 PM   #3
jmccue
Member
 
Registered: Nov 2008
Location: US
Distribution: slackware
Posts: 696
Blog Entries: 1

Rep: Reputation: 381Reputation: 381Reputation: 381Reputation: 381
Interesting, did not know about notify-send, I was going to suggest xmessage(1).

A real cheap method, assuming your script is executed via cron, is to add this:
Code:
echo "There are updates available"
to your script. cron will then mail a message to your mailbox (file $MAIL).

I know xmessage(1) will fail if executed inside cron, not sure about notify-send.

John
 
Old 06-24-2012, 03:42 PM   #4
fogpipe
Member
 
Registered: Mar 2011
Distribution: Slackware 64 -current,
Posts: 550

Rep: Reputation: 196Reputation: 196
zenity is also an option. Doesnt come by default with slackware. Looks nicer than xmessage tho.
 
Old 06-24-2012, 04:08 PM   #5
fogpipe
Member
 
Registered: Mar 2011
Distribution: Slackware 64 -current,
Posts: 550

Rep: Reputation: 196Reputation: 196
Quote:
Originally Posted by TobiSGD View Post
You can use notify-send for this:
Code:
notify-send "There are updates available."
That doesnt seem to work in fluxbox. I dont get any error message. Nothing at all happens even when i specify a critical urgency level. Any tips?
 
Old 06-24-2012, 04:13 PM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
You have to have a notifier daemon running on your system. I use xfce4-notifyd on my systems (running i3wm). Works pretty well.
 
1 members found this post helpful.
Old 06-24-2012, 05:00 PM   #7
fogpipe
Member
 
Registered: Mar 2011
Distribution: Slackware 64 -current,
Posts: 550

Rep: Reputation: 196Reputation: 196
Quote:
Originally Posted by TobiSGD View Post
You have to have a notifier daemon running on your system. I use xfce4-notifyd on my systems (running i3wm). Works pretty well.
Yes it does, thank you.
 
Old 06-24-2012, 08:35 PM   #8
Cultist
Member
 
Registered: Feb 2010
Location: Georgia
Distribution: Slackware64 14.2
Posts: 779

Original Poster
Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by TobiSGD View Post
You can use notify-send for this:
Code:
notify-send "There are updates available."
Exactly what I needed. Thanks.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtio Balloon- Does -m take precedence? dman777 Linux - Virtualization and Cloud 0 10-11-2011 09:23 PM
prevent windows notification balloon Berhanie General 2 01-05-2011 10:30 AM
some sort of dhcp lease alert script/email/popup system? Predatorian Linux - Server 2 10-21-2009 12:26 PM
software update balloon Rita G. Debian 8 02-29-2008 08:50 PM
How do I Turn off Balloon notices in kde 3.5 GlennsPref Mandriva 9 01-22-2006 07:20 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:28 AM.

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