I'm able to launch anbox.appmgr from a SSH session using: DISPLAY=:0 /snap/bin/anbox.appmgr
.
I'm also able to launch anbox.appmgr from a sh script:
#!/bin/bash
if ! pidof org.anbox.appmgr >/dev/null 2>&1;then DISPLAY=:0 /snap/bin/anbox.appmgr ;fi
But I can't figure out how to launch anbox.appmgr from crontab.
I tried:
* * * * * /bin/bash /home/eduardogoncalves/./startAnbox.sh
* * * * * DISPLAY=:0 /bin/bash /home/eduardogoncalves/./startAnbox.sh
* * * * * DISPLAY=:0 /snap/bin/anbox.appmgr
* * * * * DISPLAY=:0 /usr/bin/snap run anbox.appmgr
* * * * * su eduardogoncalves -c "DISPLAY=:0 /usr/bin/snap run anbox.appmgr";
* * * * * if ! pidof org.anbox.appmgr >/dev/null 2>&1;then DISPLAY=:0 /snap/bin/anbox.appmgr ;fi
but all without success. Can someone point me how to achieve this?