From owner-freebsd-questions@freebsd.org Sat Jan 21 05:35:22 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BEF69CBABA2 for ; Sat, 21 Jan 2017 05:35:22 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mailrelay13.qsc.de (mailrelay13.qsc.de [212.99.187.253]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.antispameurope.com", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3060F12A0 for ; Sat, 21 Jan 2017 05:35:21 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de ([213.148.129.14]) by mailrelay13.qsc.de; Sat, 21 Jan 2017 06:37:01 +0100 Received: from r56.edvax.de (port-92-195-83-137.dynamic.qsc.de [92.195.83.137]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id 758D93CC3F; Sat, 21 Jan 2017 06:35:12 +0100 (CET) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id v0L5ZBkN002064; Sat, 21 Jan 2017 06:35:11 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Sat, 21 Jan 2017 06:35:11 +0100 From: Polytropon To: Marco Beishuizen Cc: freebsd-questions@freebsd.org Subject: Re: Shutdown from WindowMaker when using Xdm Message-Id: <20170121063511.4efe3b77.freebsd@edvax.de> In-Reply-To: References: Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-cloud-security-sender: freebsd@edvax.de X-cloud-security-recipient: freebsd-questions@freebsd.org X-cloud-security-Virusscan: CLEAN X-cloud-security-disclaimer: This E-Mail was scanned by E-Mailservice on mailrelay13.qsc.de with C74FA69E1E9 X-cloud-security-connect: mx01.qsc.de[213.148.129.14], TLS=1, IP=213.148.129.14 X-cloud-security: scantime:.2448 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jan 2017 05:35:22 -0000 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, ...