8

What I tried: I created the file /etc/sddm/sddm.conf (also tried /etc/sddm.conf) with the following content:

[General]
HaltCommand=true
RebootCommand=true

Unfortunately, that did not help - the reboot button continued to work. Preferably, the buttons should also go away.

Edit: I'd like to clarify that I'm not expecting true to be interpreted as a boolean value, I'm expecting it to be interpreted as command. And true is a valid command as there is the executable /bin/true on most Linux systems that does nothing except returning exit status success. Just to be sure that this is not a path issue, I also tried setting it to /bin/true which also did not help.

  • 1
    Did you restart SDDM (or reboot) after making that change? – telcoM Jan 27 at 21:33
  • There is nothing you can do to stop me powering off your machine, if you let me touch it. If I can press power button, then most machines will power off after a 4 second press. If I can touch the power cord, then I can unplug it. – ctrl-alt-delor Jan 29 at 20:19
  • 2
    @ctrl-alt-delor First of all, you do not always have physical access just because you can access the login screen. But in my case, it is not about security, it is just that I want to prevent accidental shutdowns. – W.Mann Jan 31 at 19:53
0

You should put your edits in this file file here /etc/sddm.conf.d

[General]
HaltCommand=true
RebootCommand=true

Then reboot, and see if your buttons continue to work. This should fix the issue. You can read more about SDDM on the arch wiki here: https://wiki.archlinux.org/index.php/SDDM#Configuration

  • 1
    I believe you mean that you should create a configuration file inside that same folder, not edit /etc/sddm.conf.d, which is a folder. – AF7 Jan 29 at 15:26
  • Could you just restart the service (or better tell the service to re-load its config). You should not have to re-boot. – ctrl-alt-delor Jan 29 at 20:21
  • What would be the difference? The .d directories are usually only there to avoid the need to merge changes to package-installed config files on upgrades and to allow other packages to easily extend the configuration. Besides, there is no /etc/sddm.conf.d on Debian (stretch) and the manpage clearly states /etc/sddm.conf as config file. I just found that sddm --example-config prints the current config, and it does respect the content of /etc/sddm.conf. It just does not behave as I would expect. – W.Mann Jan 31 at 20:08
0

If you don't want them to show then it should be set to false in /etc/sddm/sddm.conf. In theory anyway, as this doesn't appear to be an actual option listed in the docs. e.g. HaltCommand= is suppose to point to the command that is to execute when a request to shutdown is made, so setting true should be effectively the same as default, which is "/usr/bin/systemctl poweroff" and false being the opposite of that should be what you want.

[General]
HaltCommand=false
RebootCommand=false

The way allowed for in the docs would be to allow them to be visible and just make them not work by setting to a /path/to/some/script/ the contents of which should be something like:

#!/bin/bash
notify-send "Shutdown/Reboot not allowed!"

For that to notify you need libnotify-bin installed, but it should still disable the option.

The above should work, however many people are having issues with this and are reverting back to KDM. Referenced here: https://github.com/sddm/sddm/issues/611

  • This does not seem to work on my machine unfortunately. The buttons continue to behave as expected. – AF7 Jan 30 at 19:52
  • 1
    @AF7 All I can do is point you in the direction to get more information. As I have dug deeper it seems a lot of people are having this same issue. Unfortunately with no solutions. github.com/sddm/sddm/issues/611 – Michael Prokopec Jan 30 at 20:05
  • @MichaelProkopec I added a clarification why I set it to true. Thanks for the link. – W.Mann Jan 31 at 20:19
  • @W.Mann Interesting problem I have the same issue in the virtualbox I setup to see if I could fix it and no joy yet. Your welcome for the link, I rarely get thanks for bad news. – Michael Prokopec Jan 31 at 21:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.