LinuxQuestions.org
Help answer threads with 0 replies.
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 08-11-2016, 05:43 PM   #1
WildDrake!
Member
 
Registered: Dec 2003
Location: Current Location: Colorado
Distribution: Ubuntu 14.10, Mint 17.1 Cinnamon and Mate
Posts: 101

Rep: Reputation: 15
Smile Linux Mint-18 zenity-notification hangs my backup Shell Script


LM-18 Cinnamon
Custom Built 64 bit AMD 8-Core 4 GHz with twin 2TB drives, one drive is Primary and the other is my Backup drive of the first drive.
I am a novice at shell scripting.

In 2014 I found a 'rsync' shell script on the Internet and I customized it to back up my primary drive to my backup drive (both drives are on the same machine) using 'cron' each day. My script has been running fine since as I moved to each new version of LM. However, I converted to LM-18 in mid July and my backup routine hangs when it reaches my user Notification statement that a backup is about to begin. That statement uses 'zenity' which is the notification system on Ubuntu/LM. Here is the one line statement I make in my shell script:

Code:
echo 'message:ALERT! Backup Procedures Now In Progress!' | zenity --notification --timeout=10 --listen
Testing my script from the command line I get:

Code:
$ sudo ./backup_local.sh
-which returns:

Code:
** (zenity:16479): WARNING **: Error showing notification: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Notifications was not provided by any .service files
-and then it hangs so that the terminal does not come back to '$' prompt again.

I should note that the Notification does indeed pop up on the user's screen, but the above statement has hung the program at that point.

So far I haven't found an answer to this. Does anyone know why this isn't allowing my shell script to continue on it's merry way? -and how to fix it?

Thanks for your help!
 
Old 08-14-2016, 11:22 AM   #2
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Ubuntu, Manjaro
Posts: 1,791

Rep: Reputation: 427Reputation: 427Reputation: 427Reputation: 427Reputation: 427
I'm not a zenity expert, but it appears that the --listen option induces the problem. This works - does it do what your want?
Code:
zenity --notification --timeout=10 --text='ALERT! Backup Procedures Now In Progress!'
 
Old 08-14-2016, 01:58 PM   #3
WildDrake!
Member
 
Registered: Dec 2003
Location: Current Location: Colorado
Distribution: Ubuntu 14.10, Mint 17.1 Cinnamon and Mate
Posts: 101

Original Poster
Rep: Reputation: 15
Smile

Thanks for the suggestion RockDoctor!

The Good News is: The program runs all the way through.

The Bad News is: Zenity completely fails to show it's text notification message on my desktop.

So, better but not there yet.
 
  


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
Remote GUI notification - using kdialog or zenity kdelover Programming 3 06-05-2010 03:54 PM
Shell script to mail notification vishwaadiga Programming 1 03-17-2010 03:03 AM
LXer: More fun with Zenity: shell script/GUI interactivity LXer Syndicated Linux News 0 02-18-2009 07:40 PM
LXer: Saving my sanity with Zenity : shell script interaction via the GUI LXer Syndicated Linux News 0 01-30-2009 06:00 PM
Shell script using zenity sandsterother Programming 1 02-14-2008 01:16 AM

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

All times are GMT -5. The time now is 04:34 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