Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using tigthvnc server on linux machine. Often my clients are closing their vncviewrs from close button ('X'), and not exiting gracefully their sessions from OS. How can I terminate the server when they do that?

share|improve this question

You can run VNC from your inetd daemon. RealVNC's Xvnc(1) man page has a section entitled "USAGE WITH INETD" that should help you do what you want, e.g. launch Xvnc servers on demand and kill Xvnc sessions when they are closed.

You may also want to check your specific distribution. Some Linux distros have explicit support for running VNC out of inetd. Fedora and Red Hat used to be among them, but since I no longer use either one, I'm not sure if that remains the case.

Either way, this should definitely get you pointed in the right direction.

share|improve this answer

You can use xautolock to do so by using the -killer option.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .