Date: Sat, 21 Jan 2017 06:35:11 +0100 From: Polytropon <freebsd@edvax.de> To: Marco Beishuizen <mbeis@xs4all.nl> Cc: freebsd-questions@freebsd.org Subject: Re: Shutdown from WindowMaker when using Xdm Message-ID: <20170121063511.4efe3b77.freebsd@edvax.de> In-Reply-To: <alpine.BSF.2.20.1701202109540.1982@localhost> References: <alpine.BSF.2.20.1701202109540.1982@localhost>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 20 Jan 2017 21:17:57 +0100 (CET), Marco Beishuizen wrote: > Hi, > > What is a good and clean way to shutdown the system from a windowmanager > (in my case WindowMaker), and using xdm? I did add a menuitem containing > "shutdown -p now", but then WM sometimes coredumps. I did the same and connected it to a key combination for covenience (Ctrl+Alt+Moon on Sun USB type 7 keyboard), and the remaining visible shutdown messages never indicated a coredump for me (and there is no .core file). > So I get the > impression that this method isn't the best way to do it. Basically there is no problem with this method, simply because it is the _normal_ method. Maybe you can exchange the parameter "now" for a small time value, so programs have time to perform TERM before they get KILL. Actually, my menu item (menu "Functions", item "System shutdown") calls this command: xterm -class SHUTDOWN -fg black -bg red -e "shutdown -p now ; read DUMMY" Maybe that adds the "little time" that is needed instead of calling the shutdown program directly? In any case, you can examine a possibly remaining core file to find out what _really_ happened instead of guessing. ;-) > Just exiting the > WM is possible, but then the system exits to the login screen, without the > possibility of shutting down from there. You can put an xlogout-based button on xdm's login screen (using the same configuration file that puts a xconsole there) which performs the "shutdown -p now" action. > So is there a clean way of shutting down from WM? What you're doing _is_ a clean way. I'd recommend examining why the core dump occurs. As I said, I'm doing this for years (probably decades) and never saw such kind of problem. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170121063511.4efe3b77.freebsd>