Darrell,
I have a note to commit 77aed4a4. I'm afraid that used grep is dangerous. For example, my colleague has a login name 's' (yes, only one letter). Such grep would return unwanted results. I propose a change roughly as follows. This will make it possible to omit some grep and also condition.
ps -u $USER -o pid= -o comm= | grep -w kdesktop_lock | awk '{print $1}' | xargs -r kill -9
The second note is that this killing can be dangerous. If the machine is configured for multi-user login (multi-seat, xdmcp), the user could have multiple active sessions. Alternatively, user could have running some applications remotely - dcopserver would be active for remote session.