In KDE, you can add a lock applet to Kicker, or simply choose to lock from the KMenu. I'd presume a similar applet exists for Gnome.\n\nXScreensaver usually handles locking, so an alternative would be to turn on the screen saver password, and set a mouse-activation corner for your saver.