Ad Widget

Collapse

supported urls on the map by the host adding vnc:// ulr

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • krzysztof.tech
    Junior Member
    • Mar 2023
    • 8

    #1

    supported urls on the map by the host adding vnc:// ulr

    Hello, I have found a simple solution to add VNC web to the host on the map using Apache Guacamole. The link is below.

    https://www.zabbix.com/forum/zabbix-...nc-integration

    Now I've decided that it would be useful to add a link that automatically opens the VNC Viewer application.
    So I made changes to the Windows registry that added support for the VNC:// protocol to the system, meaning that if I enter the address vnc://127.0.0.1 in my browser,
    the application will open. Similarly, if I issue the command in Run, the application will open. The registry entry is shown below.


    Code:
    REGEDIT4
    
    [HKEY_CLASSES_ROOT\vnc]
    @="URL:VNC Protocol"
    "URL Protocol"="http://www.realvnc.com/"
    
    [HKEY_CLASSES_ROOT\vnc\DefaultIcon]
    @="C:\\Program Files\\uvnc bvba\\UltraVNC\\vncviewer.exe,0"
    
    [HKEY_CLASSES_ROOT\vnc\shell]
    
    [HKEY_CLASSES_ROOT\vnc\shell\open]
    
    [HKEY_CLASSES_ROOT\vnc\shell\open\command]
    @="C:\\Program Files\\uvnc bvba\\UltraVNC\\vncviewer.exe -connect %1"
    
    [HKEY_CLASSES_ROOT\vnc]
    @="URL:VNC Viewer Protocol"
    "URL Protocol"="http://www.realvnc.com/"
    
    [HKEY_CLASSES_ROOT\vnc\DefaultIcon]
    @="C:\\Program Files\\uvnc bvba\\UltraVNC\\vncviewer.exe,0"
    
    [HKEY_CLASSES_ROOT\vnc\shell]
    
    [HKEY_CLASSES_ROOT\vnc\shell\open]
    
    [HKEY_CLASSES_ROOT\vnc\shell\open\command]
    @="C:\\Program Files\\uvnc bvba\\UltraVNC\\vncviewer.exe"​
    I will now explain what these changes consist of. In the Windows registry, I added a new entry called "VNC" in the "HKEY_CLASSES_ROOT" key.
    Then, when adding a new entry, I set the value "URL:VNC Protocol" in the "HKEY_CLASSES_ROOT\VNC" key to the local VNC address, which in this case is "vncviewer.exe".
    In this way, if I type "vnc://127.0.0.1" in the browser or in Run, the "vncviewer.exe" application will be launched.



    And now, unfortunately, there is a problem. Zabbix by default only accepts http:// and https:// links, and it does not allow adding a vnc:// URL. I'm afraid it won't work without editing sysmap.php.

    I tried to use "Scripts" and use Webhooks, but I couldn't come up with anything sensible. Does anyone have any ideas for a small modification?


    Click image for larger version

Name:	vnc_zab.jpg
Views:	702
Size:	65.4 KB
ID:	461279
  • krzysztof.tech
    Junior Member
    • Mar 2023
    • 8

    #2
    Hello users, below is an improved registry entry for Windows 10/11. It is set by default to use UltraVNC viewer, so you need to install UltraVNC to use it.
    Regarding adding support for the vnc:// url link to the Zabbix map, follow these steps:

    Administration > General > Other > add "vnc" after a comma in the Valid URI schemes line.

    That's it. The VNC password is included in the registry entry. If you remove the "-password YOURPASSWORD" string,
    it will require a password when you connect.
    You can also add additional options such as: -notoolbar -nostatus -quickoption 3.

    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\vnc]
    "URL Protocol"=""
    @="URL:VNC Protocol"
    "DefaultIcon"="\"C:\\Program Files\\uvnc bvba\\UltraVNC\\vncviewer.exe\",1"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\vnc\shell]
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\vnc\shell\open]
    "FriendlyAppName"="VNC Viewer"
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\vnc\shell\open\command]
    @="cmd /V:ON /C set address=%1 && set address=!address:~6,-2! && \"C:\\Program Files\\uvnc bvba\\UltraVNC\\vncviewer.exe\" -connect !address!-password YOURPASSWORD -8greycolors"

    Comment

    • ralfs_k
      Junior Member
      • Mar 2024
      • 1

      #3
      Hi. I'm having problems with last part! vncviewer opens, but address field is blank. any ideas?

      Comment

      Working...