title: Ubuntu with XRDP not start program with GUI from Cron
body: <p>Im using Ubuntu 18.04 LTS with xubuntu-desktop and xrdp, i have create a script for restart of JDownloader like:</p>
  
  <pre><code>#!/bin/bash
  
  pkill -f JDownloader
  
  sudo cyberghostvpn --stop
  
  random=$( shuf -i 0-3 -n 1)
  
  if [[ $random == 1 ]]
  then
  sudo cyberghostvpn --traffic --country-code IT --connect
  fi
  
  if [[ $random == 2 ]]
  then
  sudo cyberghostvpn --traffic --country-code DE --connect
  fi
  
  if [[ $random == 3 ]]
  then
  sudo cyberghostvpn --traffic --country-code FR --connect
  fi
  
  if [[ $random == 0 ]]
  then
  sudo cyberghostvpn --traffic --country-code PL --connect
  fi
  
  '/usr/local/jd2/JDownloader 2.desktop'
  </code></pre>
  
  <p>and configured in cron:</p>
  
  <pre><code>*/15 * * * * /root/./reset.sh
  </code></pre>
  
  <p>Cyberghost reset and restart work but Jdownloader won't start, so if try launch a script without cron JD will restart and work perfect.</p>
  
  <p>Now i ask how to launch a program GUI from Cron with XRDP? Google says add this to cron:</p>
  
  <pre><code> * * * * * export DISPLAY=:0 &amp;&amp; /root/./reset.sh  
  </code></pre>
  
  <p>but nothing work...</p>