1

Im using Ubuntu 18.04 LTS with xubuntu-desktop and xrdp, i have create a script for restart of JDownloader like:

#!/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'

and configured in cron:

*/15 * * * * /root/./reset.sh

Cyberghost reset and restart work but Jdownloader won't start, so if try launch a script without cron JD will restart and work perfect.

Now i ask how to launch a program GUI from Cron with XRDP? Google says add this to cron:

 * * * * * export DISPLAY=:0 && /root/./reset.sh  

but nothing work...

Lemanuale
  • 11
  • 2

0 Answers0