I am working on a Lubuntu kiosk that is controlled fully by IR remote. So far everything works well except for rebooting and powering down. I have two related questions:
- Now I have 2 separate buttons on the remote; one that runs
poweroff
in terminal and one that runsreboot
. However, I find this clumsy and would prefer to have one button on the remote launch the "Shutdown" Launcher (the power icon on the bottom right of desktop on Lubuntu 17.10) the same that would happen if you clicked the button with mouse. I am usingxbindkeys
to run my commands. Does anyone know the terminal command or have a script to launch the "Shutdown" launcher?
Edit: I solved this part of the question. The command in 17.10 is lxsession-default quit
-
When "Logout Lubuntu 17.10 session?" pop-up appears I want the only options visible to be Shutdown, Reboot, and Cancel. I have tried many things from some older threads and older versions but have had not success in removing any of the options.
Not Working on 17.10:
-
gsettings set com.canonical.indicator.session suppress-logout-menuitem true
-
editing
/usr/share/polkit-1/actions/org.freedesktop.login1.policy
and setting<allow_active>no</allow_active>
under the respective items
Best Answer
From https://www.freedesktop.org/software/polkit/docs/latest/polkit.8.html and https://bbs.archlinux.org/viewtopic.php?id=180798 I'd try creating or editing the file /etc/polkit-1/rules.d/10-auth.rules and including the following content:
I haven't been able to find the actions for switch user or logout, though.