Can FFS run on ubuntu without gui or gnome?

Get help for specific problems
User avatar
Posts: 5
Joined: 3 Oct 2021

AnnAngela

If there are already answers about this problem please tell me, I tried to search but nothing found.

Can FFS run on ubuntu without gui or gnome? I want to use this program on linux server and already have a .ffs_batch file.

I tried to run ffs on cli but kept showing "Error: Unable to initialize GTK+, is DISPLAY set properly?"
Posts: 305
Joined: 7 Jan 2018

bgstack15

It's very good that you have a .ffs_batch file. As long as you're willing to install a few components (namely, the graphical libraries required), you can technically run FreeFileSync in batch mode, without needing to see any of it. See topic 8404 here. The reason is that FreeFileSync loads the graphical elements every time, even if you do not need to view them.

For a summary that is directly applicable to you:
1. You will need to install the GTK3 libraries, and also X virtual frame buffer (aka "fake screen")
apt-get install libgtk-3-0 Xvfb
2. To run the program in batch mode, you will first need to run Xvfb.
xvfb-run /usr/bin/path/to/FreeFileSync_x86_64 /home/AnnAngela/my-sync.ffs_batch
User avatar
Posts: 5
Joined: 3 Oct 2021

AnnAngela

Thank you very much!! Just need to correct you that the packages are`libgtk2.0-0` and `xvfb`.
User avatar
Posts: 5
Joined: 3 Oct 2021

AnnAngela

And I need to say it's very important to run ffs on Xmanager at the first time to confirm that the batch mode can be run. I wasted half an hour to figure out that why the xvfb-run stucked and finally found out that there is a message showing that the device is the third one in the same sponsor key which will keep forever until manually click close button =。=
Posts: 305
Joined: 7 Jan 2018

bgstack15

Good call! Yes, I was using Debian package names, and I forgot that Ubuntu sometimes changes the names. And I even forgot which gtk major version FreeFileSync uses.
Posts: 3
Joined: 9 Jan 2022

agorka

Hello!
Thank you for this topic!
I was using FreeFileSync a lot in windows environment in both gui and CLI modes and now trying to use it in Ubuntu, and, what makes things even more complicated, in Docker container.
I was able to avoid GTK error now but all output I get is:
08:22:43: Warning: Cannot set locale to language "English (U.S.)".
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default
08:23:44: Error: Couldn't open audio: ALSA: Couldn't open audio device: No such file or directory
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default
08:24:44: Error: Couldn't open audio: ALSA: Couldn't open audio device: No such file or directory
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default
08:25:44: Error: Couldn't open audio: ALSA: Couldn't open audio device: No such file or directory
It would be great if FFS would have fully-featured CLI interface, without risk of halting because of window that no one can see. I think the whole linux community would be happy to have it as I see no alternative software with this functionality.
As a quick solution, maybe it's possible to redirect all warnings to console if it's running in console mode?
I'd like to sponsor this feature to be able to use FFS inside Docker!
Posts: 3
Joined: 9 Jan 2022

agorka

I managed to get it running by disabling errors in .ffs_batch, but at least some output in console would be a great help, like how many files were synced, was it successfull or not etc.
Posts: 305
Joined: 7 Jan 2018

bgstack15

Rsync is the traditional cli program for synchronizing two directories, but its usage is pretty different from FreeFileSync.
Posts: 3
Joined: 9 Jan 2022

agorka

Rsync is the traditional cli program for synchronizing two directories, but its usage is pretty different from FreeFileSync. bgstack15, 09 Jan 2022, 14:26
Yes, it's fine for one-way sync, but I like using bidirectional sync with delete propagation, and seems FreeFileSync is the best option for that. As for now, if i run it in docker, i get no console output and just waiting for a hour, and finally receiving error code 130, which I have no idea how to understand.
A few console outputs just to understand what's going on would be great, as currently I feel like a blind person in darkness trying to use it. =(