lilydjwg / nvchecker

New version checker for software releases
MIT License
425 stars 68 forks source link

nvchecker-notify question #227

Closed feydreva closed 1 year ago

feydreva commented 1 year ago

Hello,

I have an issue with nvchecker-notify.

I am running arch, KDE plasma, up to date.

When I run nvchecker-notify from terminal, I get a pop-up on my desktop if new_ver.json is different that old_ver.json

I though about creating a crontab, that would call nvcheker-notify every 10 min, $ crontab -e /10 * /usr/bin/nvchecker-notify

But there is never a pop-up coming on my desktop, no notification. Any idea why ? how can I solve this and get a notification whenever there is a new version ? thank you

lilydjwg commented 1 year ago

The notification goes over your session D-Bus. Either set the environment variable DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$UID/bus or use user-level systemd.timer.

feydreva commented 1 year ago

Hello, I have tried both method whit no results :/

With DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$UID/bus : still no notification on my desktop With systemd.timer and service, I get gi.repository.GLib.GError: g-io-error-quark: Cannot autolaunch D-Bus without X11 $DISPLAY (0)

I will continue to explore both path and check why it snot working on my side. thank you

lilydjwg commented 1 year ago

Replace $UID with your actual uid.

Your desktop setup has issues. What does systemctl --user show-environment print? Is DBUS_SESSION_BUS_ADDRESS there?

feydreva commented 1 year ago

hmm not sure what s going on. never had issue on anything else before.

[feydreva@spychea ~]$ systemctl --user show-environment HOME=/home/feydreva LANG=fr_FR.UTF-8 LOGNAME=feydreva MAIL=/var/spool/mail/feydreva PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/android-sdk/platform-tools:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl SHELL=/bin/bash SYSTEMD_EXEC_PID=2536 USER=feydreva XDG_DATA_DIRS=/home/feydreva/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share XDG_RUNTIME_DIR=/run/user/1000 CASROOT=/usr CSF_DrawPluginDefaults=/usr/share/opencascade/resources/DrawResources CSF_EXCEPTION_PROMPT=1 CSF_IGESDefaults=/usr/share/opencascade/resources/XSTEPResource CSF_LANGUAGE=us CSF_MDTVTexturesDirectory=/usr/share/opencascade/resources/Textures CSF_MIGRATION_TYPES=/usr/share/opencascade/resources/StdResource/MigrationSheet.txt CSF_OCCTResourcePath=/usr/share/opencascade/resources CSF_PluginDefaults=/usr/share/opencascade/resources/StdResource CSF_SHMessage=/usr/share/opencascade/resources/SHMessage CSF_STEPDefaults=/usr/share/opencascade/resources/XSTEPResource CSF_ShadersDirectory=/usr/share/opencascade/resources/Shaders CSF_StandardDefaults=/usr/share/opencascade/resources/StdResource CSF_StandardLiteDefaults=/usr/share/opencascade/resources/StdResource CSF_TObjDefaults=/usr/share/opencascade/resources/StdResource CSF_TObjMessage=/usr/share/opencascade/resources/TObj CSF_XCAFDefaults=/usr/share/opencascade/resources/StdResource CSF_XSMessage=/usr/share/opencascade/resources/XSMessage CSF_XmlOcafResource=/usr/share/opencascade/resources/XmlOcafResource DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus DEBUGINFOD_URLS=https://debuginfod.archlinux.org DESKTOP_SESSION=plasma DISPLAY=:0 DRAWDEFAULT=/usr/share/opencascade/resources/DrawResources/DrawDefault DRAWHOME=/usr/share/opencascade/resources/DrawResources EDITOR=nano GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/feydreva/.gtkrc-2.0:/home/feydreva/.config/gtkrc-2.0 GTK3_MODULES=xapp-gtk3-module GTK_MODULES=canberra-gtk-module GTK_RC_FILES=/etc/gtk/gtkrc:/home/feydreva/.gtkrc:/home/feydreva/.config/gtkrc HG=/usr/bin/hg KDE_APPLICATIONS_AS_SCOPE=1 KDE_FULL_SESSION=true KDE_SESSION_UID=1000 KDE_SESSION_VERSION=5 LANGUAGE=en_US:fr LC_MEASUREMENT=fr_FR.UTF-8 LC_MONETARY=fr_FR.UTF-8 LC_NUMERIC=fr_FR.UTF-8 [feydreva@spychea ~]$ echo $UID 1000 [feydreva@spychea ~]$ DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus [feydreva@spychea ~]$ ls -alrt /run/user/$UID/bus srw-rw-rw- 1 feydreva feydreva 0 3 juin 11:56 /run/user/1000/bus

lilydjwg commented 1 year ago

Weird. Did your systemd service run in your user instance (e.g. systemctl --user start xxx)?

feydreva commented 1 year ago

Hello,

so if I run it from /etc/systemd/system/ with sudo systemctl start nvchecker-notify.service I would get the error but if I put it in ~/.config/systemd/user/. and run systemctl start --user nvchecker-notify.service I would get the notification on my desktop. now I have the service, i need to create the timer

Thank you