On Mon, 16 Jun 2003 22:46:52 +0100 (BST) "Dan Hatton" dan.hatton@btinternet.com wrote:
There are instructions at http://neilt.org/computing/xdmshutdownbutton.html.
Thanks for that Dan. I have modified the files as this webpage suggests and, happily, now get a "Reboot" and "Shutdown" button on the xdm login screen and these buttons work as expected; however they remain on the screen forever rather than disapearing when I have logged in.
The webpage suggests two lines to add to /etc/X11/xdm/Xstartup which should kill off these buttons once I have logged in:
pid=$(cat /var/run/xdmshutdown.pid 2>/dev/null) test "$pid" && kill -9 $pid 2>/dev/null
The webpage says that the first line stores the PID of xdmshutdown in the variable $pid and the second line tests to see if $pid contains a value and then kills the process number $pid (the shutdown button script).
If I cat /var/run/xdmshutdown.pid once I have logged on and compare this with a ps -ax I can see that this file does indeed contain the process ID of the shutdown buttons. If I then type:
kill -9 `cat /var/run/xdmshutdown.pid`
in a console window as root then the Shutdown buttons disappear.
The two lines however do not seem to work within /etc/X11/xdm/Xstartup. Any ideas what is going wrong?
Ian.