Is there a more graceful way of listing vncserver sessions than just getting the list of running PIDs?

How do you list your vncserver sessions?

This article says to do this:

$ cat ~/.vnc/*.pid
5910
6790
16589
21891
... and many more

Using this method, I could write a script to check each pid, but there has got to be something better.

Is there a better way? I'd like to see something like:

$ vncserver -l
Session User Started Status Blah
1 jess 3/24 19:00 Active ?
2 jess 3/21 14:00 Suspended ?

EDIT: For example. I have six sessions running, but I can only use one of them. All six show up as running processes. It would also be nice to see a list for other users too; I just found a server with 95 VNC sessions. I have no idea which ones are active.

5

2 Answers

I always use ps -ef | grep vnc, then pick out the parts I need from that.

1
ps -ef | grep `whoami` | grep vnc
1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like