1

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?

  • 2
    Does this answer your question? [How can I show notify-send messages triggered by crontab?](https://askubuntu.com/questions/978382/how-can-i-show-notify-send-messages-triggered-by-crontab) More explanations are available at https://github.com/pa4080/cron-gui-launcher – pa4080 Aug 06 '20 at 06:20
  • Hello @pa4080, the code at https://askubuntu.com/a/978413/227276 worked like a charm! Thank you! – eduardogoncalves Aug 06 '20 at 16:55
  • Excellent! I'm glad to hear that. You could up-vote the answer in order to tell the others it is useful :) – pa4080 Aug 06 '20 at 17:09

0 Answers0