I use the libvncclient, to build a viewer, in which i try to integrate a specific hotkeys which do a bit of scripting, that are done as menu options, such as enable taskmanager
,'run cmd' for window, and 'open terminal,'update repos' etc. I need to detect the operating system info, but i don't see anything to get this info from in rfb proto
rfbClient *client = new client();
if(!ConnectToRFBServer(client,client->serverHost,client->serverPort))
return FALSE;
if (!InitialiseRFBConnection(client))
return FALSE;
I looked trough the rfbclient.h
and rfbClient structure doesn't hold any callback/or field that stores this info, as well as there is no apis for that it seems. But in rfc there is this thing https://www.rfc-editor.org/rfc/rfc6143#section-7.3.2
After receiving the ClientInit message, the server sends a ServerInit message. This tells the client the width and height of the server's framebuffer, its pixel format, and the name associated with the desktop:
Richardson & Levine Informational [Page 11]
RFC 6143 The Remote Framebuffer Protocol March 2011
+--------------+--------------+------------------------------+
| No. of bytes | Type [Value] | Description |
+--------------+--------------+------------------------------+
| 2 | U16 | framebuffer-width in pixels |
| 2 | U16 | framebuffer-height in pixels |
| 16 | PIXEL_FORMAT | server-pixel-format |
| 4 | U32 | name-length |
| name-length | U8 array | name-string |
+--------------+--------------+------------------------------+
But it seems that libvnc doesn't handle that, is there any way that this info could be taken?