Created attachment 7479 Screenshot of notify with hiperlink Please add support of hyperlinks. https://people.gnome.org/~mccann/docs/notification-spec/notification-spec-latest.html#hyperlinks Now it works like this: (from chrome) https://imgur.com/a/vgGS0
Created attachment 7489 An example of the Chrome notification. Hello, Someone discussed about this issue on the Chromium bugs list, and thinking that it might be a Chromium issue, I raised the problem again. It appears to be an issue with the daemon itself. Here's the thread: https://bugs.chromium.org/p/chromium/issues/detail?id=676220#c103 The issue is also discussed on launchpad: https://bugs.launchpad.net/archlinux/+source/xfce4-notifyd/+bug/1735419
The capabilities of the daemon are stated to be: array [ actions body body-hyperlinks body-markup icon-static x-canonical-private-icon-only ] but the body-hyperlinks do not work.
Bug present in version 0.4.1-1.
I have the same issue. It's not a Chromium problem. It's reproducible from command line also: notify-send "Title" "Link to <a href='https://bugzilla.xfce.org'>bugzilla</a>" Stopped working in version 0.4, works in version 0.3.6
Yes, I know about this issue and it is a regression of https://git.xfce.org/apps/xfce4-notifyd/commit/?id=8265b411339a390768f2c94f2bc2e0f9983da04b So I fixed a bug and introduced a regression :/ Unfortunately there are almost no elegant ways of dealing with this, because 1) pango does not support the <a> tag (so the pango_parse_markup check fails) 2) there are no alternative checks in glib or gtk+. The only way this can be fixed is by parsing and validating the notification string myself, which is what I'll probably end up doing for 0.4.2.
Simon Steinbeiss referenced this bugreport in commit 6d178157e49ba60dddf08857950904f43a56dcd6 Fix support for hyperlinks in notifications (Bug #14073) https://git.xfce.org/apps/xfce4-notifyd/commit?id=6d178157e49ba60dddf08857950904f43a56dcd6
Fixed the bug in the notification window, the panel plugin and the log viewer.
Wow, thank you so much Simon! :-)
Same from here, thank you! :)
thank you Simon!
Simon, links looks good, but they doesn't opens. I was test notifies from vivaldi(chromium) and from notify-send. If I copy link and then click on it, then nothing will opened and clipboard will empty. If I just copy link and close notify then it will in clipboard. Here is journal: https://gist.github.com/hxss/5d062ac6611d33e06d2199dbbbf09f4c I'm test notifies with this site: https://gauntface.github.io/simple-push-demo/
Sorry, I can't reproduce your problem. How did you build/install/run notifyd and what's your distro?
Arch linux x86_64 4.14.15-1-ARCH. I was install xfce4-notifyd-git from aur: https://aur.archlinux.org/packages/xfce4-notifyd-git/ After that I was just reboot the system and test notifications.
Hi, I can confirm the issue with the link not opening on click. Just go to https://tests.peter.sh/notification-generator/ and click "Display the notification". Best regards!
Also you can copy links from logs in xfce4-notifyd-config. And then you will see that all symbols in chrome links replaced by http ascii codes: https%3A//tests.peter.sh/ And links with '&' can't be parsed: https://imgur.com/a/XaOmL
Using that webservice does not by default include a hyperlink. What I noticed is (when testing this on the commandline with notify-send) that hyperlinks that don't start with "http://" end up not opening a browser (supposedly xdg-open doesn't know what to do with them). But this simple example works just fine for me: notify-send "a href notification test" "Just a test: <a href='https://tests.peter.sh/notification-generator/'>click me</a>" This can be clicked both from the log viewer as well as from the notification bubble and will open the page in a browser for me. It currently doesn't work in the panel plugin's log view, that part I can still investigate. Could either of you put together a complete notify-send example that doesn't work for you?
Well, the difference between sending the notification via command line, or the website, is that the website doesn't add any characters before the <a> tag. Strangely enough, I can't confirm it because even the clickable version (the one sent with "Just a test: <a...") works only the first time, than stops working for a while. Does it work for you to send a notification and click the link, 3 times in a row (for example)?
Yes, executing that one-liner three times in a row creates three notification bubbles that are all clickable and open the page as expected. Not adding any text to the body before the <a> obviously works for me as well: notify-send "a href notification test" "<a href='https://tests.peter.sh/notification-generator/'>click me</a>"
Which option do you select to get a hyperlink though? I don't see anything like that in the Body setting (apart from the custom setting of course, then you could manually enter a hyperlink).
>Could either of you put together a complete notify-send example that doesn't work for you? # work: notify-send "a href notification test" "Just a test: <a href='https://tests.peter.sh/notification-generator/'>click me</a>" # work: notify-send "a href notification test" "Just a test: <a href='https://tests.peter.sh/notification-generator/?sad=da'>click me</a>" # not work, print "<a href..." directly notify-send "a href notification test" "Just a test: <a href='https://tests.peter.sh/notification-generator/?sad=da&dsa=vcx'>click me</a>" # not work, print "<a href..." directly notify-send "a href notification test" "Just a test: <a href='https://tests.peter.sh/notification-generator/?sad=da\&dsa=vcx'>click me</a>" # not work, print link correctly, can be copied, can't be opened(see my journal gist above) notify-send "a href notification test" "Just a test: <a href='tests.peter.sh/notification-generator/'>click me</a>" # not work, print link correctly, can be copied, can't be opened notify-send "a href notification test" "Just a test: <a href='https%3A//tests.peter.sh/'>click me</a>" # all notifiers from sites via chrome: print link correctly, can be copied, can't be opened chrome always use ascii codes "%3A" instead of ":"(other char didn't come across) https%3A//tests.peter.sh/ https%3A//gauntface.github.io/ https%3A//mail.yandex.ru/
Thanks for the reproducers - now I finally get the problem! I'm not sure if there's much I can do about certain types of links working in GtkLabel and others not (I'm not doing much about displaying those links currently, it's mostly handled by the widget itself). I'll investigate, but it's possible I won't be able to resolve this entirely.
Ok, so a little later I can tell you that the hyperlink feature of GtkLabel does not seem to support links like: * https://tests.peter.sh/notification-generator/?sad=da&dsa=vcx * https://tests.peter.sh/notification-generator/?sad=da\&dsa=vcx And the other hyperlinks that are parsed correctly but do not open are not recognized by xdg-open, you can easily test it on the commandline: * "xdg-open tests.peter.sh/notification-generator/" -> xdg-open fails to detect the URI scheme * "xdg-open https%3A//tests.peter.sh/" -> same as above So I fear there is not much we can do apart from opening a bugreport against GtkLabel for parsing more complex URLs correctly (the first two cases). Not sure the xdg-open cases can be fixed properly, because the way e.g. "tests.peter.sh/notification-generator/" looks it could also be a file location. The only thing I could in theory try to fix is being able to click the hyperlinks (that work) in the plugin's menu, but currently the click is swallowed by the GtkMenu and I'm not sure I really want to hack into that...
For me links without "http://" not a problem. Main future is support of chrome links(https%3A//tests.peter.sh/). Can you write temporary workaround parser(I think it need only 1 regex /%(\w{2})/\1/ and translator ascii2char)?
Nope, I really can't write a parser for that. All the magic happens inside GtkLabel. I'll accept patches though if you really want to work on this!
Created attachment 7624 link-parser-workaround.patch This patch solve problem of parsing links: 1. with html ascii codes ("%3A") 2. with '&' char(replace it by "&") 3. links without protocol(add "http://" as default protocol) So now all this links can be parsed by GtkLabel, displays correctly and can be copied. BUT! Now I can't open ANY link after some system(or notifyd) upgrades. Even links that was works before(https://bugzilla.xfce.org/show_bug.cgi?id=14073#c20) Please help me. I can't fully test notifications now.
I recieve this logs even when trying simple google.com example: $ notify-send "a href notification test" "Just a test: <a href='http://google.com'>click me</a>" 2018-03-03T19:13:05+0500 lenovo xfce4-notifyd[815]: Just a test: <a href='http://google.com'>click me</a> 2018-03-03T19:13:05+0500 lenovo xfce4-notifyd[815]: Just a test: <a href='http://google.com'>click me</a> 2018-03-03T19:13:09+0500 lenovo kernel: traps: xfce4-notifyd[815] general protection ip:7fbd83e63c17 sp:7ffec37ecbb0 error:0 in libgtk-3.so.0.2200.28[7fbd83ad5000+707000] 2018-03-03T19:13:09+0500 lenovo systemd[1]: Created slice system-systemd\x2dcoredump.slice. 2018-03-03T19:13:09+0500 lenovo systemd[1]: Started Process Core Dump (PID 1421/UID 0). 2018-03-03T19:13:09+0500 lenovo systemd[676]: xfce4-notifyd.service: Main process exited, code=dumped, status=11/SEGV 2018-03-03T19:13:09+0500 lenovo kernel: traps: vivaldi-bin[1438] trap int3 ip:5598f2d6c9c0 sp:7ffdf78e66f0 error:0 in vivaldi-bin[5598f1c42000+6ae9000] 2018-03-03T19:13:09+0500 lenovo systemd[1]: Started Process Core Dump (PID 1440/UID 0). 2018-03-03T19:13:09+0500 lenovo systemd-coredump[1424]: Process 815 (xfce4-notifyd) of user 1000 dumped core. Stack trace of thread 815: #0 0x00007fbd83e63c17 gtk_widget_get_display (libgtk-3.so.0) #1 0x00007fbd83e864bf n/a (libgtk-3.so.0) #2 0x00007fbd82a2e24c n/a (libgio-2.0.so.0) #3 0x00007fbd82a2e289 n/a (libgio-2.0.so.0) #4 0x00007fbd8247fca6 g_main_context_dispatch (libglib-2.0.so.0) #5 0x00007fbd82480081 n/a (libglib-2.0.so.0) #6 0x00007fbd824803b2 g_main_loop_run (libglib-2.0.so.0) #7 0x00007fbd83d09eff gtk_main (libgtk-3.so.0) #8 0x0000559ef3c294e1 n/a (xfce4-notifyd) #9 0x00007fbd81e80f4a __libc_start_main (libc.so.6) #10 0x0000559ef3c295ca n/a (xfce4-notifyd) Stack trace of thread 1419: #0 0x00007fbd81f50879 syscall (libc.so.6) #1 0x00007fbd824c6dcd g_cond_wait_until (libglib-2.0.so.0) #2 0x00007fbd82453753 n/a (libglib-2.0.so.0) #3 0x00007fbd824a8c76 n/a (libglib-2.0.so.0) #4 0x00007fbd824a826a n/a (libglib-2.0.so.0) #5 0x00007fbd8221e08c start_thread (libpthread.so.0) #6 0x00007fbd81f55e7f __clone (libc.so.6) Stack trace of thread 817: #0 0x00007fbd81f4b97b __poll (libc.so.6) #1 0x00007fbd8247fff3 n/a (libglib-2.0.so.0) #2 0x00007fbd8248010e g_main_context_iteration (libglib-2.0.so.0) #3 0x00007fbd82480162 n/a (libglib-2.0.so.0) #4 0x00007fbd824a826a n/a (libglib-2.0.so.0) #5 0x00007fbd8221e08c start_thread (libpthread.so.0) #6 0x00007fbd81f55e7f __clone (libc.so.6) Stack trace of thread 1420: #0 0x00007fbd81f50879 syscall (libc.so.6) #1 0x00007fbd824c6dcd g_cond_wait_until (libglib-2.0.so.0) #2 0x00007fbd82453753 n/a (libglib-2.0.so.0) #3 0x00007fbd824a8c76 n/a (libglib-2.0.so.0) #4 0x00007fbd824a826a n/a (libglib-2.0.so.0) #5 0x00007fbd8221e08c start_thread (libpthread.so.0) #6 0x00007fbd81f55e7f __clone (libc.so.6) Stack trace of thread 819: #0 0x00007fbd81f4b97b __poll (libc.so.6) #1 0x00007fbd8247fff3 n/a (libglib-2.0.so.0) #2 0x00007fbd824803b2 g_main_loop_run (libglib-2.0.so.0) #3 0x00007fbd82a746d8 n/a (libgio-2.0.so.0) #4 0x00007fbd824a826a n/a (libglib-2.0.so.0) #5 0x00007fbd8221e08c start_thread (libpthread.so.0) #6 0x00007fbd81f55e7f __clone (libc.so.6) 2018-03-03T19:13:09+0500 lenovo systemd[676]: xfce4-notifyd.service: Failed with result 'core-dump'. 2018-03-03T19:13:09+0500 lenovo systemd-coredump[1441]: Process 1438 (vivaldi-bin) of user 1000 dumped core. Stack trace of thread 1: #0 0x00005598f2d6c9c0 n/a (vivaldi-bin)
To be honest I get some warnings when building notifyd with your diff: http://dpaste.com/0E2Q5ZB Not sure what would have changed in your system so you can't click links anymore, potentially xdg-open/exo-open..? Or maybe you updated your browser and the "default" selection of exo-open/xdg-open doesn't work anymore?
I was try to use other browsers(Chrome, Firefox) - same problem. And this problem exist even with clear xfce4-notifyd-git 0.4.2.r3.g1652201-1 >exo-open/xdg-open both works good. New tab opens. $ xdg-open http://google.com $ [4852:4890:0304/134746.640454:ERROR:browser_gpu_channel_host_factory.cc(108)] Failed to launch GPU process. Created new window in existing browser session. $ exo-open http://google.com $ [5037:5076:0304/134832.615798:ERROR:browser_gpu_channel_host_factory.cc(108)] Failed to launch GPU process. Created new window in existing browser session. $ xdg-open https://tests.peter.sh/notification-generator/ $ [5178:5216:0304/134859.429524:ERROR:browser_gpu_channel_host_factory.cc(108)] Failed to launch GPU process. Created new window in existing browser session.
Created attachment 7626 link-parser-workaround-2.patch I was move patch call from xfce_notify_window_set_body into notify_notify. So now parsed links shows also in notifyd-config log tab. From this tab all links opens without any error. All 3 types of "broken" links. Still receive errors when try to open any link from notification bubble.
I really appreciate the patch/es, but could you please use git patches instead? This would make it easier to apply them plus it would include committer and commit message. I presume including syslog is just a temporary debug proposal and this is not the final version of the patch, correct?
Yes, syslog is just for debug. This is my first C-project and first patch, so here is warnings. Can you do something with label in notify buble or this is fully gtk problem?
Took me some time to get to test this. So first of all: it seems to work for all the examples you listed above and I can successfully click those links in the notification windows. Haven't tested the log yet and haven't checked the code in detail yet to get rid of the warnings, but it seems like a good first step. Thanks for your work!
-- GitLab Migration Automatic Message -- This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/apps/xfce4-notifyd/-/issues/9. Please create an account or use an existing account on one of our supported OAuth providers. If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev