Linux Batch (Script) File Issues

Get help for specific problems
Posts: 45
Joined: 20 May 2008

arrmo

Hi,

I have set up batch files under Linux, and I want to run them unattended at night (i.e. as cron jobs). If I am logged in to the console this works, using the following command,

export DISPLAY=:0 && FreeFileSync syncfile.ffs_batch

This works because FreeFileSync basically displays on the console then (display :0). However, if I am not logged in (it's a headless machine), then this fails, with the following message,

Error: Unable to initialize gtk, is DISPLAY set properly?

This is because there is no display :0 (I'm not logged in to the console). Is there a way to have FreeFileSync not try to initialize the GUI, but rather just run the batch job (sort of in the background, without the GUI)?

Thanks!
User avatar
Site Admin
Posts: 7210
Joined: 9 Dec 2007

Zenju

FFS's GUI is implemented in terms of GTK. So the question is if it's generally possible to run a GTK application without being logged in.
Posts: 45
Joined: 20 May 2008

arrmo

Hi,

I'm not sure that this works, but it does mean the batch files can't really be used to run unattended synchronizations ... :-(.

Thanks anyways.
User avatar
Site Admin
Posts: 7210
Joined: 9 Dec 2007

Zenju

I'm just saying that if it's possible to run a GTK application unattended (what I don't know), then this approach should work for FFS, too. So I wouldn't expect it to be impossible in first place.