I am using AnyDesk on a Raspberry Pi 3. After around 6-7 days, it suddenly consumes all the memory and the device stops responding.
To prevent this, I am using
crontab to execute
/usr/bin/killall anydesk and stop anydesk.
I need to kill it on
0 * * * * and start it again on
2 * * * *.
However, it throws error saying
gtk warning cannot open display.
I have tried using
export DISPLAY=:0 and it still doesnt work.
It keeps saying it cannot open Display 0. I have tried
anydesk.desktop in the
/etc/xdg/autostart/ which I tried to execute from
xdg-open, but even that didn't work.