4

I installed nodm, so that Debian starts Xorg and a window manager immediately after booting, without requesting any password and without a login.

How can I similarly setup Debian to shutdown the system automatically, without password prompt, whenever the window manager and Xorg are quit?

2
  • 1
    You'd have to somehow monitor the xorg server/daemon and run shutdown when it quits. As to how you go about this, I don't know. Perhaps something in an X config file could issue that command on termination. Perhaps even in ~/.bash_logout (assuming the default user for nodm is logged out when xorg quits). Commented Sep 18, 2014 at 15:45
  • I think you will find varying avenues based on how the system is shutdown. If a window-manager application is doing it, there will be fewer places to look for a script that can be tuned. If procs are being shutdown by a hot-key or even command line, different options available. Commented Dec 5, 2014 at 15:34

1 Answer 1

0

Use a displaymanager, which supports scripts like Xreset and Xsession, for example kdm and configure it for auto login.

$ head -n5 /etc/kde4/kdm/Xreset #! /bin/sh # Xreset - run as root after session exits # Reassign ownership of the console to root, this should disallow # assignment of console output to any random users's xterm. See Xstartup. 

There you can place the shutdown command. Have a look at lightdm, maybe even xdm, if they support such scripts, too. maybe even nodm does.

1
  • nodm runs the user session using Xsession script; I haven't specifically checked its reset behaviour, but I'd be surprised if this didn't work. Commented Jul 15, 2015 at 16:26

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.