![]() ![]() I have no idea if this will affect the priority of the batch file once FreeFileSync.exe launches that. Just follow the special instructions for Windows 7.Īll the above said you should know that by default Task Scheduler will launch any process it launches with priority Below Normal. If you follow the instructions in the Manual page you will get it to work on Windows 7 without problems. Basically, on Windows 7, when you deal with the "Actions" dialogue in Task Scheduler you need to point the Scheduler to the FreeFileSync.exe on your system and then add the WhatEverName.ffs_batch as an argument. The solution is there - I tried the solution mentioned and then the WhatEverName.ffs_batch runs without issues. Then I looked at the FFS Manual Page for Schedule Batch Jobs. Xauthority file is found there.Īlternatively, you can export the secret from this to root's home: xauth -f /home/user/.Xauthority nextract - localhost/unix:0 | sudo xauth -f /root/.Xauthority nmerge -Īnd then XAUTHORITY=/root/.Xauthority or just HOME=/root.I am on Windows 7 and tried it too and couldn't get it to work. ![]() If you are root you can read both files, so your client can simply provide in the environment: XAUTHORITY=/var/run/lightdm/root/:0Īlternatively, you can set the HOME to that of the user of the display, This "secret" is just an arbitrary random number. ![]() This file holds a copy of the secret in the user's ~/.Xauthority file. It means clients must connect using the secret in the file /var/run/lightdm/root/:0. Download FreeFileSync 12.5 Open all news Latest News FreeFileSync 12. ![]() This guide will detail how to configure automatic folder mirroring and syncing using FreeFileSync. If when you do ps alxww|grep X you find your X11 server running with an -auth option, something like this: /usr/bin/X :0. A good way to do that is to configure an important folder to be automatically synchronised or mirrored. Ubuntu sudo will preserve some environment variables for the command including DISPLAY and HOME (see output of sudo sudo -V) so the program will be able to read the ~/.Xauthority file (continue reading for details).Īlternatively, to keep using a root crontab: Your user crontab entry can then just have the command: DISPLAY=:0.0 sudo /usr/bin/FreeFileSync /home/user/bu-1.ffs_batch 2>/home/user/bu-1.ffs_log Be careful editing this file: use visudo, or ensure you have root logged in or a shell running root to be able to do any repairs. If not, then just add the user entry to /etc/sudoers. This assumes file /etc/sudoers has the line: (note # is not a comment) #includedir /etc/sudoers.d The software makes it easy to process multiple folder. Batch 1 runs and when completed Batch 2 runs and when completed Batch 3 runs and when completed the process stops So while the Batch 1 job is time specific, the other Batch Jobs are event specific (i.e. Replace ALL by your hostname (not localhost) to be more secure. FreeFileSync lets users automate their synchronization tasks by running the application as a batch job. I want to conduct these batch jobs in the order listed and I would like to automate this process - i.e. To start, double-click this file or schedule in a task planner. If you don't explicitly list the args to the command, then any args will be allowed by sudo. Create a batch file for unattended synchronization. The command must be given with a full pathname. You could configure sudo to not need a password for a particularĬommand and go back to using a non-root cron.įor this, assuming a user id of "user" wants to run the command FreeFileSync as root, create a file /etc/sudoers.d/user with user ALL = NOPASSWD: /usr/bin/FreeFileSync When I call the same script from my root crontab with sudo crontab -e, FreeFileSync never gets to run because of the following error: $ cat /home/user/bu-1.ffs_logġ6:35:01: Error: Unable to initialize GTK+, is DISPLAY set properly?Īs can be seen, I have export DISPLAY=:0.0 within the script and my root crontab file is equipped with: $ sudo crontab -e | head -4Ģ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/binĬan someone help troubleshooting the error ?ĮDIT: Could it be that running this from root's crontab fails because user root as no open session and therefore no stdout to which to display?Ĭan I circumvent that difficulty by asking root to display to a current user's session's stdout? It seems to be worth a shot if doable if so how do I do that? usr/bin/FreeFileSync /home/user/bu-1.ffs_batch 2> \ # define default display and pass it on to any child process Root privileges are necessary to run FFS, otherwise it complains about not having rights to get to some directories and files being backed up. The only thing is I have to input my sudo passwd, which makes it interactive and somewhat unwieldly. When running the script below from my local user crontab, with sudo before /usr/bin/FreeFileSync (last script's line), a small progress window opens on my GUI and things go well. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |