Closed Sagyam closed 3 years ago
Does that not work?
0 * * * * env DISPLAY=:0 DESKTOP_SESSION="/usr/share/xsessions/plasma" DBUS_SESSION_BUS_ADDRESS="YOUR_VALUE /usr/bin/dwall -s home
If not, Try this one as well -
0 * * * * env SHELL="YOUR_SHELL" DISPLAY="YOUR_DISPLAY" DESKTOP_SESSION="YOUR_SESSION" DBUS_SESSION_BUS_ADDRESS="YOUR_VALUE" XDG_RUNTIME_DIR="YOUR_VALUE" XDG_DATA_DIRS"YOUR_VALUE" /usr/bin/dwall -s firewatch
Okay like you said I tried
0 * * * * env SHELL="bin/zsh" DISPLAY=":0" DESKTOP_SESSION="/usr/share/xsessions/plasma" DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus" XDG_RUNTIME_DIR="/run/user/1000" XDG_DATA_DIRS"/usr/share:/usr/share:/usr/local/share" /usr/bin/dwall -s firewatch
and I got this in email
X-Cron-Env:
[*] Using style : firewatch
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
[!] pywal is not installed on your system, exiting...
tput: No value for $TERM and no -T specified
tput: No value for $TERM and no -T specified
Apparently its still using shell event though I have told to use zsh
Alright I have SOLVED this issue!! Here is my cron file
MAILTO="sagyamthapa32@gmail.com"
#All mentioned env variables
SHELL=/bin/zsh
DESKTOP_SESSION=/usr/share/xsessions/plasma
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
DESKTOP_SESSION=/usr/share/xsessions/plasma
DISPLAY=:0
XDG_DATA_DIRS=/usr/share:/usr/share:/usr/local/share
XDG_RUNTIME_DIR=/run/user/1000
#Extra Variables
TERM=xterm-256color
USER=sagyam
LOGNAME=sagyam
PATH=/home/sagyam/anaconda3/condabin:/usr/local/bin:/usr/bin:/bin:/usr/games
0 * * * * /usr/bin/dwall -s earth
I think it needed also needed the PATH variable for pywal dependency.
Output of
echo $DESKTOP_SESSION
/usr/share/xsessions/plasma
Extra Info
OS: Debian GNU/Linux 10 (buster) x86_64 Kernel: 4.19.0-13-amd64 Shell: zsh 5.7.1 DE: KDE WM: KWin
Problem
Wallpaper changes when done manually but returns
pywal not installed exiting
when done by cron job.