Getting my head round FFS (Ver 7.7 build 3) after migrating from Windows & Allwaysync pro. All sync jobs appear to be running nicely with Gnome scheduler except (and you were expecting an except...) for the "On completion" shutdown. Which doesn't. No errors anywhere, machine just happily keeps running. Log file carries no errors & reports sucessful sync. End of the batch file looks like this:
</Pair>
</FolderPairs>
<OnCompletion>dbus-send --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.RequestShutdown</OnCompletion>
</MainConfig>
<BatchConfig>
<HandleError>Ignore</HandleError>
<RunMinimized>true</RunMinimized>
<LogfileFolder Limit="-1">/home/byson/FFSlogs</LogfileFolder>
</BatchConfig>
</FreeFileSync>
Running Ubuntu with Gnome desktop, 32 bit:
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty
Any suggestions received with gratitude.
(Sorry for posting on wrong place first time. Bit busy this AM)
Shutdown on completion not shutting down on completion...
- Posts: 4
- Joined: 15 Dec 2015
- Site Admin
- Posts: 7210
- Joined: 9 Dec 2007
The default "On Completion" command lines are just suggestions and (in the case of Linux) quite volatile. Currently it seems none of the three commands work in user-mode:
gnome-session-quit
sudo pm-suspend
dbus-send --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.RequestShutdown
What are better default alternatives?
gnome-session-quit
sudo pm-suspend
dbus-send --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.RequestShutdown
What are better default alternatives?
- Site Admin
- Posts: 7210
- Joined: 9 Dec 2007
I've updated the suggested command lines for Log off/Standby/Shut down with the following three commands (none of which require admin rights):
gnome-session-quit --no-prompt
systemctl suspend
systemctl poweroff
This works fine on my Ubuntu 15.10 test system. Let me know if you have refinements or know better alternatives.
gnome-session-quit --no-prompt
systemctl suspend
systemctl poweroff
This works fine on my Ubuntu 15.10 test system. Let me know if you have refinements or know better alternatives.
- Posts: 4
- Joined: 15 Dec 2015
Thanks. systemctl doesn't work with V14.04 though as yuou say, it does with 15.10. As a slightly inelegant work-round I changed the ownership of shutdown:
sudo chown root:your_user_name /sbin/shutdown && sudo chmod 4770 /sbin/shutdown
And used shutdown -P now
I'll see how that goes. It is a one-user machine so I am not too concerned with the security implications of messing with permissions.
sudo chown root:your_user_name /sbin/shutdown && sudo chmod 4770 /sbin/shutdown
And used shutdown -P now
I'll see how that goes. It is a one-user machine so I am not too concerned with the security implications of messing with permissions.
- Posts: 4
- Joined: 15 Dec 2015
That is very odd. If I run: "shutdown -P now" in terminal, the machine shuts down. If I set the batch file up to run in Gnome Schedule 2.1.1 and execute it from the menu bar, the batch file runs & the machine shuts down on completion. BUT if I let Gnome Schedule 2.1.1 run the file the synchronization runs... but the machine does not shut down. Confused I am. Am I missing something obvious ?Thanks. systemctl doesn't work with V14.04 though as yuou say, it does with 15.10. As a slightly inelegant work-round I changed the ownership of shutdown:
sudo chown root:your_user_name /sbin/shutdown && sudo chmod 4770 /sbin/shutdown
And used shutdown -P now
I'll see how that goes. It is a one-user machine so I am not too concerned with the security implications of messing with permissions.johnthehat
- Posts: 4
- Joined: 15 Dec 2015
Sorted. The problem is NOT FreeFileSync. The problem is that when one tests the batch file with GnomeScheduler it is NOT path dependant BUT when GS runs the batch file, it is. It is therefore essential thet the full file path to shutdown is used. So the On Completion line needs to be
/sbin/shutdown -P now
And this will obviously apply to other operatons required On Completion.
/sbin/shutdown -P now
And this will obviously apply to other operatons required On Completion.
- Posts: 5
- Joined: 14 Apr 2016
Rats. Would you believe the problem returned ?
I had to do a clean re-install. I have restored the user permissions for shutdown & I am using the same batch files...but shutdown is NOT occuring :-(
confused.
I had to do a clean re-install. I have restored the user permissions for shutdown & I am using the same batch files...but shutdown is NOT occuring :-(
confused.