Activating GUI with a crontab

Get help for specific problems
Posts: 36
Joined: 1 Aug 2020

ineuw

I've used RealTimeSync and it works well, but I only need the graphical interface of FreeFileSync to open and that's it.
So, I created this line in crontab, to open the interface hourly, but nothing happens. What am I doing wrong?

0 * * * * env DISPLAY=:1 /opt/FreeFileSync/FreeFileSync
Posts: 943
Joined: 8 May 2006

therube

but I only need the graphical interface of FreeFileSync to open and that's it
Explain why you're wanting the GUI to open?
As in, are you wanting it to open - in relation to RTS?

RTS itself shouldn't need the GUI (to be visible).
Posts: 36
Joined: 1 Aug 2020

ineuw

Hello therube, I want to see the contents, and control synchronization manually, to be sure I didn't forget updating before turning off the desktop. I also tried Google Drive's through Gnome Online accounts, but I prefer FreeFileSync.
Posts: 306
Joined: 7 Jan 2018

bgstack15

Depending on your cron implementation and where your cronjob is, you might need to add the username. For example, you wouldn't need to add the user if you are using `crontab -e`. But if you are editing `/etc/cron.d/80_freefilesync_cron` you probably would need to specify the user:
0 * * * *  ineuw  env DISPLAY=:1 /opt/FreeFileSync/FreeFileSync
Posts: 36
Joined: 1 Aug 2020

ineuw

The correct syntax turned out to be
0 * * * *  /opt/FreeFileSync/FreeFileSync

crontab works like a swiss made linux watch. Other than editing the crontab, no other file or command is required.