adi1090x / dynamic-wallpaper

A simple bash script to set wallpapers according to current time, using cron job scheduler.
GNU General Public License v3.0
1.88k stars 115 forks source link

No hourly change echo "$DESKTOP_SESSION" plasma #103

Open Silesse opened 11 months ago

Silesse commented 11 months ago

My wallpaper has stopped changing since updating to dwall v3.0 I'm on garuda linux (arch based)

My user's cron job looks like this:

!/bin/bash

0 env PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl DISPLAY=:0 DESKTOP_SESSION=plasma DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus" /usr/bin/dwall -s sol

Using the custom image set sol This works when used through terminal but doesn't seem to trigger every hour

echo "$SHELL | $PATH | $DISPLAY | $DESKTOP_SESSION | $DBUS_SESSION_BUS_ADDRESS | $XDG_RUNTIME_DIR" Gives me /bin/bash | /usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl | :0 | plasma | unix:path=/run/user/1000/bus | /run/user/1000

Let me know if there's anything else you need to know. I'd love to get this working again

Silesse commented 11 months ago

Changing my user (siva) cron to:

!/bin/bash

0 env TERM=xterm-256color PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl DISPLAY=:0 DESKTOP_SESSION=plasma DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus" /usr/bin/dwall -s sol

results in the following from systemctl cronie.service ... ● cronie.service - Periodic Command Scheduler Loaded: loaded (/usr/lib/systemd/system/cronie.service; enabled; preset: disabled) Active: active (running) since Tue 2023-09-26 21:42:17 BST; 31min ago Main PID: 626 (crond) Tasks: 1 (limit: 6946) Memory: 3.0M CPU: 345ms CGroup: /system.slice/cronie.service └─626 /usr/bin/crond -n

Sep 26 22:00:01 hplaptop14dk0xxx CROND[8025]: (siva) CMDOUT ([*] Using style : sol) Sep 26 22:00:01 hplaptop14dk0xxx CROND[8025]: [141B blob data] Sep 26 22:00:01 hplaptop14dk0xxx CROND[8025]: [22B blob data] Sep 26 22:00:01 hplaptop14dk0xxx CROND[8025]: (siva) CMDEND (env TERM=xterm-256color PATH=/usr/local> Sep 26 22:00:01 hplaptop14dk0xxx CROND[8025]: pam_unix(crond:session): session closed for user siva

The wallpaper still does not change Autostart is working just fine

(edit) Trying to make a systemd service gives me an Invalid environment assignment (ignores /usr/bin/dwall , -s , and sol) I'm guessing there's another env variable I need? Or maybe I've just typed one wrong and staring at them for so long has driven me crazy...

chairielazizi commented 2 months ago

anyone has solution for this? I also added the TERM env to my cron. I received the same kind of cron status where it also show the blob data, and it does not change the wallpaper. running on manjaro with i3wm.