[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: How to tell if someone is connected via vnc


I would check for established VNC connections this way:

netstat -tape | grep ESTABLISHED | grep Xvnc

As for warning connected users. If you see there is an established vnc session on port 5902, you could simply do:

export DISPLAY=:2.0; xmessage -center -timeout 60 -file shutdown.txt > /dev/null 2>&1

You could create a list of established connections, translate it to active displays (5902 -> 2.0 | 5903 -> 3.0 ...) and send out a message.

Hope it helps

2008/1/31, Henning Larsen <hennlar start no>:
Thanks for the answer :)

I have made a file "ww" that is executable containing:

"netstat -an | grep ESTABLISHED | grep -v".

Is this sufficient to tell if any are connected / logged in?
Is there any way to tell people logged in via vnc that I am going to
reboot the system? something like 'wall'?

Henning Larsen

fedora-list mailing list
fedora-list redhat com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]