How to show a Kivy GUI using cron planner?
<p>I've made a simple Python script that would display a little alert window. I wanted it to do so every 20 minutes, so I looked into the <code>cron</code> planner, as I am using Ubuntu.<br>
The command I used to run the script was <code>python3 alert.py</code>, with <code>alert.py</code> being the script in my home directory.<br>
The <code>cron</code> setup was done using the <code>gnome-schedule</code> app, so I assume nothing is wrong there.
This is <code>alert.py</code>:</p>

<pre><code>from kivy.base import runTouchApp
from kivy.uix.label import Label
from kivy.core.window import Window
Window.size = (200, 100)
runTouchApp(Label(text = "Test Alert!"))
</code></pre>

<p>The problem is that the window is not appearing. And as it seems, the script is not running at all (I've added a <code>os.mkdir</code> call, but no directories appeared). What's the problem? And how can I see the log that the script outputs to <code>stdout</code>? </p>

<p>The solution was to change the command behaviour to <code>X application</code> (rather than <code>Default behaviour</code>). After that change, the console shows up and the GUI is displayed.</p>

<p><a href="https://i.stack.imgur.com/Levi1.png" rel="nofollow"><img src="https://i.stack.imgur.com/Levi1.png" alt="gnome-schedule"></a></p>

python cron kivy