1

I'm trying to VNC into a Mac OSX machine. I can SSH in fine. The VNC server is misbehaving, and I'm tempted to restart it. However I don't want to do that if someone is using it now. Is there any way to see from the command line if anyone else is logged in in VNC? Doing w shows no-one else logged in over SSH. Is there something like that for VNC?

Amandasaurus
  • 31,471
  • 65
  • 192
  • 253

2 Answers2

2

VNC mirrors an existing desktop. It does not constitute a login that would show up.

You can check with ps auxc whether a VNC instance is running. Some VNC servers start a process if a user is logged in, I think.

Or you can VNC to the box and see if the mouse pointer moves.

The only way someone can be using VNC in the background is if the machine is using fast user switching and the user himself has a VNC server running. But then you don't want to restart his VNC server.

Andrew J. Brehm
  • 1,611
  • 7
  • 37
  • 57
2

You could see who is connected via VNC by using netstat on the machine in question:

netstat -a | grep vnc

If any connections are established, the 5th column gives you the remote IP address of the connection.

Steve Folly
  • 575
  • 3
  • 12