The Salix Update notifier script puts an icon on the sys tray if it detects updates are available.
However, if i decide not to do my updates and wait, after a period of time, it adds another icon as well. This way, given enough time, we will end up with quite a few icons
Perhaps the script should be modified to remove the current icon before adding another?
Cheers,
ray
Salix Update Notifier - Multiple Notification Icons
- damNageHack
- Posts: 663
- Joined: 24. Sep 2009, 17:07
Re: Salix Update Notifier - Multiple Notification Icons
Better add only a new one if there is not already oneray wrote:Perhaps the script should be modified to remove the current icon before adding another?
But I wonder how this could be solved due to the usage of zenity ... Maybe with some kind of a lock file. You would have to check in both cases for a running zenity process (that shows the icon).
But ... why are you using the update notifier if you are not interested in updates? You can also increase the interval to check for updates.
This is the oppinion of the author, it does not force you to share and is signed automatically.
You are free to keep them all errors for your own. Linux is the best game I ever played.
Re: Salix Update Notifier - Multiple Notification Icons
I've been looking at trying to modify the script since i posted this, but i havent yet found a way to do so. I'm no expert at bash, so maybe someone else can find a way.damNageHack wrote:Better add only a new one if there is not already oneray wrote:Perhaps the script should be modified to remove the current icon before adding another?
But I wonder how this could be solved due to the usage of zenity ... Maybe with some kind of a lock file. You would have to check in both cases for a running zenity process (that shows the icon).
But ... why are you using the update notifier if you are not interested in updates? You can also increase the interval to check for updates.
Well, my current scenario is pretty rare, but It's pretty normal scenario where you are Working on/Downloading something so you might want to postpone the update to later.
Cheers,
ray
- damNageHack
- Posts: 663
- Joined: 24. Sep 2009, 17:07
Re: Salix Update Notifier - Multiple Notification Icons
You can not solve that problem due to zenity (the icon process) runs as another process. Either you terminate that process after some time or inactivity (no reaction from user) or it runs forever if no other process (e.g. in thaour case the update-notificater scrpit) terminates or kills it.
This is the oppinion of the author, it does not force you to share and is signed automatically.
You are free to keep them all errors for your own. Linux is the best game I ever played.
Re: Salix Update Notifier - Multiple Notification Icons
One way i can think of is to move the zenity notification icon to a seperate script, so we can track the pid and kill it before showing another.
Will try and give it a whirl.
Cheers,
ray
Will try and give it a whirl.
Cheers,
ray
- damNageHack
- Posts: 663
- Joined: 24. Sep 2009, 17:07
Re: Salix Update Notifier - Multiple Notification Icons
Maybe try something like the following. You should only have to change the line
EDIT:
Although, I can not reproduce it here with Salix Live 13.1.1 LXDE. The icon shows up again only if I've clicked on it before, but there is never more than one icon. Maybe my work around helps anyways.
tozenity --notification \
pgrep -f zenity.+salix || zenity --notification \
I think no good idea with a pid or lock file. If the process will be killed or crashes for some other reasons you will stick with that file and the user will never get a notification any more.ray wrote:One way i can think of is to move the zenity notification icon to a seperate script, so we can track the pid and kill it before showing another.
EDIT:
Although, I can not reproduce it here with Salix Live 13.1.1 LXDE. The icon shows up again only if I've clicked on it before, but there is never more than one icon. Maybe my work around helps anyways.
Last edited by damNageHack on 18. Sep 2010, 22:43, edited 1 time in total.
This is the oppinion of the author, it does not force you to share and is signed automatically.
You are free to keep them all errors for your own. Linux is the best game I ever played.
Re: Salix Update Notifier - Multiple Notification Icons
That way you will end up with multiple pid's if you have different zenity processes running.damNageHack wrote:Maybe try something like the following. You should only have to change the linetozenity --notification \EDIT:pgrep -f zenity.+salix && zenity --notification \
Although, I can not reproduce it here with Salix Live 13.1.1 LXDE. The icon shows up again only if I've clicked on it before, but there is never more than one icon. Maybe my work around helps anyways.
And yes, i don't particularly like tracking apps through pid's to kill them either, but i cant think of any other way to do this.
I do have the latest version of salix-update-notifier and i wonder why i have the problem here.
But, looking at the script, i can see that what i'm facing is indeed possible.
Cheers,
ray
- damNageHack
- Posts: 663
- Joined: 24. Sep 2009, 17:07
Re: Salix Update Notifier - Multiple Notification Icons
Have you tried my suggestion with pgrep? You should modify the script /usr/bin/salix-update-notifier as described, only one line is affected.
This is the oppinion of the author, it does not force you to share and is signed automatically.
You are free to keep them all errors for your own. Linux is the best game I ever played.
Re: Salix Update Notifier - Multiple Notification Icons
@damNageHack,
The pgrep line you wrote wouldnt work if there's more than one instance of zenity around, would it?
Anyways, i'll have a shot at it tomorrow, it's getting a bit late.
Cheers,
ray
The pgrep line you wrote wouldnt work if there's more than one instance of zenity around, would it?
Anyways, i'll have a shot at it tomorrow, it's getting a bit late.
Cheers,
ray
- damNageHack
- Posts: 663
- Joined: 24. Sep 2009, 17:07
Re: Salix Update Notifier - Multiple Notification Icons
Sorry, but I doubt that I understand your problem.
man pgrep wrote: pgrep looks through the currently running processes and lists the pro-
cess IDs which matches the selection criteria to stdout. All the cri-
teria have to match. For example,
[...]
-f The pattern is normally only matched against the process name.
When -f is set, the full command line is used.
Do you see the pattern "zenity.+salix" in my code? And now, think again. I doubt that there will be more than one process with a command line that matches a pattern with "salix" in it, and you can see from the original script that the call to zenity uses a special "salix" icon file, so the pattern should be unique enough.ray wrote:The pgrep line you wrote wouldnt work if there's more than one instance of zenity around, would it?
This is the oppinion of the author, it does not force you to share and is signed automatically.
You are free to keep them all errors for your own. Linux is the best game I ever played.