Page 1 of 1

Shortcut for Lightdm restart

Posted: Mon Oct 25, 2021 7:24 am
by borissa
Hello guys,
I am trying unsuccessfully to add a shortcut on my Raspberry to restart LightDM, the classic CTRL-ALT-BackSpace

I tried to add the following with the same result in /etc/xdg/openbox/lxde-pi-rc.xml and ~/.config/openbox/lxde-pi-rc.xml

Code: Select all

<keybind key="C-A-BackSpace">
      <action name="Execute">
        <command>sudo systemctl restart lightdm</command>
      </action>
    </keybind>
I tried also

Code: Select all

  <keybind key="C-A-BackSpace">
      <action name="Execute">
        <command>sudo service lightdm restart</command>
      </action>
    </keybind>
If I run these commands on terminal of course they works, but there's no way for me to add it as a shortcut,

help please!

Re: Shortcut for Lightdm restart

Posted: Thu Nov 18, 2021 8:18 am
by drooly
Chances are your raspberry Pi's OS uses systemd, so the first command is right.
Have you tried entering that command without sudo? Maybe it'll work.
If not, you have to find a way to enter the password graphically - try "sudo -A systemctl restart lightdm".