I'm using Ubuntu Mate 16.04. I would like to configure the system so that it reboots or shuts down on logoff. Here's what I have done so far:
I created /etc/lightdm/lightdm.conf.d/50-ubuntu-mate.conf with the following content.
[Seat:*] user-session=mate session-cleanup-script=/sbin/reboot allow-guest=false
While this successfully reboots the machine on logoff, I have one problem with it. It also reboots the machine when I am at the login greeter and I select a different user account for login. I do not want to reboot when I'm not actually logged into an account and all I am doing is selecting a user from the drop down to login as.
Can anyone tell me if there is another way to go about this that does not cause reboots from the login greeter?