0

I am developing an application that uses x11vnc in the background and I would like to know how many users are currently connected. I have reviewed the list of commands but I have not found anything for that purpose.

Any ideas?

2
  • This looks like it might provide some insight... unix.stackexchange.com/questions/94711/how-many-remote-users – David Yockey Jun 3 '19 at 12:28
  • Thank you! I finally used this code: netstat -anpt | grep SERVER_PORT | grep 'ESTABLISHED' | grep -c 'tcp' That is, filters the number of connections established with my VNC server (usually SERVER_PORT is 5900) and then counts the number of times that "tcp" appers in these results (which is 1 per client). – Javi Jun 4 '19 at 14:50
0

You can use the next interface

x11vnc -query client_count -display :0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.