an2linuxserver icon indicating copy to clipboard operation
an2linuxserver copied to clipboard

Notification type

Open sxe opened this issue 5 years ago • 16 comments

KDE Plasma recently made a change to they notification system which makes it so, that an2linux notifications are only shown temporarily and are not added to the notification history anymore. I was told this is the applications "fault" because the notification typ is not correctly set (to be shown permanently in the history).

I had a discussion about it on reddit: https://www.reddit.com/r/kde/comments/c7w6u5/no_plasma_notifications_history_after_update_to/

Would it be possible to change the notification type to something that makes it show up in the history again? Maybe even make it configurable so the user can decide how he wants to see the notifications?

Would be great!

KDE Plasma is probably adding something similar ( https://www.reddit.com/r/kde/comments/c7w6u5/no_plasma_notifications_history_after_update_to/esiqct6/ ) so the notifications are not "lost" anymore but it will take a while until that change hits.

Cheers

sxe avatar Jul 07 '19 07:07 sxe

Sure will look into that, out traveling atm, will be home in a few days

rootkiwi avatar Jul 07 '19 16:07 rootkiwi

Sure thanks, happy to test it obviously if necessary. Cheers

sxe avatar Jul 07 '19 16:07 sxe

Yeah great :)

rootkiwi avatar Jul 07 '19 16:07 rootkiwi

Not really sure what this notification type means, but I now set the desktop-entry hint which is supposed to make the notification configurable for KDE users.

Don't know if this will fix it, let me know how it goes (you need to download the updated an2linuxserver.py).

And I also don't know if there is a reason to make this configurable from an2linux perspective, so it's not configurable at the moment.

rootkiwi avatar Jul 11 '19 20:07 rootkiwi

Hi, thanks for that but sadly it did not change anything, as far as I can tell. The notification shows up on my desktop as before but it does not stay in the KDE Plasma notification history.

I could try to contact the KDE dec to clarify what is needed to make it work. Or do you want to do that yourself?

Cheers

sxe avatar Jul 12 '19 10:07 sxe

Hey, lol, that's a shame.

Yeah if you want to do that it would be great, going on vacation again tomorrow for another week. Then maybe we'll have a response and know what needs to be done after that.

I've read your reddit page and the KDE commit message.

On reddit I found this: https://www.reddit.com/r/kde/comments/c7w6u5/no_plasma_notifications_history_after_update_to/esk3ryh

And also from here: https://cgit.kde.org/plasma-workspace.git/commit/?id=1f6050b1740cf800cb031e98fd89bc00ca20c55a

and here: https://phabricator.kde.org/D22048

From that I thought that all that needed to be done was to set the notification desktop-entry hint, like I did:

notif.set_hint('desktop-entry', GLib.Variant('s', 'an2linux'))

But apparently we must be missing something.

rootkiwi avatar Jul 12 '19 11:07 rootkiwi

Great. ok then, have a nice vacation and see you in a week. :)

sxe avatar Jul 12 '19 11:07 sxe

Thanks, yes :)

rootkiwi avatar Jul 12 '19 11:07 rootkiwi

Hi,

it appears an2linuxserver doesn't install a .desktop file? This is neccessary for it to be configurable. However, this is more of a background service rather than a "proper" application, right? So perhaps that is a usecase I did not take into account when I changed this.

kbroulik avatar Jul 15 '19 07:07 kbroulik

hi @kbroulik , thanks for showing up and taking the time to give some insight.

Yes it is a background service which receives the notifications from an android device.

Is there some way to flag notification that makes them stick in the history at the moment?

Cheers

sxe avatar Jul 15 '19 08:07 sxe

There isn't currently. The freedesktop notification spec wasn't really designed with a history usecase in mind, hence it's quite lacking in many areas and driven by heuristics :/ What you could do is install a desktop file with NoDisplay=true so it won't show up in the application launcher. This won't make it configurable but still show up in history.

kbroulik avatar Jul 15 '19 08:07 kbroulik

I see. Well I hope you will find a solution for this soon cause how it is right now can't obviously be the final solution. Right now I am patching my plasma-workspace to teh previous version to make it work which is much better IMO.

Could you in short explain how such a desktop file would look like as an intermediate solution I could test?

Thanks

sxe avatar Jul 15 '19 09:07 sxe

Hi,

it appears an2linuxserver doesn't install a .desktop file? This is neccessary for it to be configurable. However, this is more of a background service rather than a "proper" application, right?

Hey, correct!

So I guess there is not much more for me to do at the moment then.

Could you in short explain how such a desktop file would look like as an intermediate solution I could test?

Maybe try something like this:

[Desktop Entry]
Name=an2linux_dummy
Type=Application
NoDisplay=true

rootkiwi avatar Jul 20 '19 10:07 rootkiwi

I've got the same problem on Cinnamon. To wit: if I am looking at my computer when the an2linux notification arrives, that's fine; but if I am not then I do not see the notification because, after it's being displayed for a little while, it's gone completely. (Admittedly Cinnamon has a setting 'ignore transient notifications'. If I disable that, then an2linux notifications do become a little more visible. However, there are some notifications that I do want to disappear entirely after they've been displayed - i.e. I do want there to be so-called transient notifications; it's just that I want an2linux notifications not to be transient.)

So, what's needed - for Cinnamon at least - is a way of marking an2linux notifications as permanent a.k.a. non-transient.

EDITED to fix some typos.

LinuxOnTheDesktop avatar Jan 08 '20 17:01 LinuxOnTheDesktop

I use dunst notification daemon. And with dunst you can for example make all notifications permanent and then create filters for notifications that should not be permanent.

rootkiwi avatar Jan 22 '20 18:01 rootkiwi

Here is very late reply to the comment above.

I did try Dunst. But dunst seems broken on Linux Mint Cinnamon (see here) and at any rate Mint Cinnamon has its own notification system and installing another notification system atop of that seems a bad idea. (Here I begin to see a virtue of an OS such as Arch Linux, wherein one assembles one's components oneself.)

So / but: I can see that this problem, or its origin, is not with an2linux but rather with the notification system in various versions of Linux.,

LinuxOnTheDesktop avatar Mar 01 '22 20:03 LinuxOnTheDesktop