Hello, This diff presents 'Halt' and 'Reboot' buttons on the xdm screen.
Other buttons could be added, such as 'Hibernate' & 'Suspend'. The message box remains after login.... but can be manually closed. Adapted from http://cafim.sssup.it/~giulio/other/Customization_XDM.html#starting-the-necessary-programs --- Xsetup_0~ Wed Aug 6 21:03:43 2014 +++ Xsetup_0 Tue Jun 28 13:51:23 2016 @@ -1,8 +1,25 @@ #!/bin/sh -# $OpenBSD: Xsetup_0,v 1.3 2010/03/28 09:33:02 matthieu Exp $ +# $OpenBSD: Xsetup_0,v 1.2 2016/06/28 13:24:23 craig Exp $ if [ "$DISPLAY" = ":0" -o "$DISPLAY" = ":0.0" ] then xconsole -geometry 480x130-0-0 -daemon -notify -verbose -fn fixed -exitOnFail + + # Show Halt and Reboot buttons: + ( + xmessage -buttons 'Halt:20,Reboot:21' ' System: ' + case $? in + 20) + exec halt -p + ;; + 21) + exec reboot + ;; + *) + print "xmessage closed on $(date)" + ;; + esac + ) & + fi #sxpm OpenBSD.xpm &
