How to tell if someone is connected via vnc
Olivier Robert
robby57 at gmail.com
Thu Jan 31 14:05:28 UTC 2008
Hi,
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
Olivier
2008/1/31, Henning Larsen <hennlar at start.no>:
>
> Thanks for the answer :)
>
>
> I have made a file "ww" that is executable containing:
>
> "netstat -an | grep ESTABLISHED | grep -v 127.0.0.1".
>
> 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 at redhat.com
> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20080131/243c474b/attachment-0001.htm>
More information about the fedora-list
mailing list