I'm using kde 1.1.1 and running kdm. I want to customize the shutdown and reboot options that appear as button items from kdm. I see that I can choose different commands using kdmconfig.
This is my problem: my lab computer also runs Windows95 (a problem in and of itself, of course!) with which a lab colleague of mine does some analysis. The computer runs linux at all times except when he uses it to run Windows. Sometimes, I am using the computer remotely from my office at the same that he needs to reboot into Windows. I've instructed him to always call me first before rebooting out of kdm, but he consistently forgets, which boots me off the system in the middle of doing something. I realize I could just disable shutdown and reboot so that he couldn't do this, but that's not what I want. I want him to be able to reboot, but not if someone (i.e., me) is logged on. What's the best way to do this? The only way I can think of is to link shutdown to some script which runs "who" or something like that to see if someone is logged on, and if so, disallow him to reboot (in which case he gets on the phone, calls me, and we arrange something). I don't know how to write such a script. So, could someone either provide a nice, clean script, or alternatively a better solution? Ideally, the script would pop up a console window or something telling him who's logged on if it can't reboot.