Realvnc disable local keyboard: Is it possible to block local mouse and keyboard input when using Teamviewr?

vnc — Key mappings in RealVNC client



Ask Question


Asked


Modified
5 years, 2 months ago


Viewed
45k times


19

New! Save questions or answers and organize your favorite content.
Learn more.

I am using RealVNC viewer on Windows. I sometimes find it very difficult to shift from VNC to Windows. I have to use F8 -> Minimize and then Alt + Tab. I wish I had more flexibility. Can the following key combinations be somehow enabled?

  1. Win + D -> I see my Windows desktop.
  2. Alt + Tab switches between VNC and Windows applications.
  3. Ctrl + Tab switches between VNC subwindows.
  • vnc
  • vnc-viewer
  • vnc-server






1

I found two solutions:

1 (from: http://www.realvnc.com/products/viewerplus/1.0/docs/af1069655.html)

Configuring your keyboard

By default, and with the exception of CTRL-ALT-DELETE and the function
key used to open the shortcut menu, key presses affect the host
computer and not the client. To reverse this behavior for the
application-level keys listed below, turn off Pass special keys
directly to VNC Server. Note this property is on the Inputs tab.

Affected keys/combinations: WINDOWS (also known as START), PRINT
SCREEN, ALT-TAB, ALT-ESCAPE, CTRL-ESCAPE.

2 (from: http://www.physnet.uni-hamburg.de/physnet/vnc/winvncviewer.html)

Keystrokes such as Ctrl-Esc and Alt-Tab may be interpreted at the
local (viewer) machine. If you want to send them to the remote
machine, you can use the options on the viewer menu to send individual
Ctrl-down, Ctrl-up, Alt-down and Alt-up keystrokes. For example, to
type Ctrl-Esc on the remote machine, send Ctrl-down using the menu,
press Esc, and then send Ctrl-up (or just tap the Ctrl key) to release
the Ctrl key at the remote end.






1

I am running the Gnome Desktop on the VNC Server, so I followed these steps to implement the two solutions recommended by user1403360:

  1. Turn off Viewer -> Options -> Inputs -> «Pass special keys directly to VNC Server» (i.e. parameter SendSpecialKeys=FALSE)

    Alt+Tab will now switch between Windows applications

  2. In Gnome Desktop -> Preferences -> KeyboardShortcuts, change «Move between windows using a popup window» => Ctrl+Tab

    Ctrl+Tab will now switch between VNC sub-windows






1

Commandline Parameters — UltraVNC VNC OFFICIAL SITE, Remote Desktop Free Opensource


Our website is made possible by displaying online advertisements to our visitors.

Please consider supporting us by disabling your ad blocker.






-help, -? or -h
Print a help message.
-listen [port]
Start the VNCviewer in listen mode. If port is specified, the viewer listens on that port instead of 5900 default port.
example vncviewer listen non standard port 80
vncviewer.exe -listen 80
-dsmplugin filename.dsm
example1: vncviewer.exe host -dsmplugin msrc4plugin.dsm
example2: vncviewer.exe host -dsmplugin securevncplugin.dsm

-proxy host:port
the proxy is not your office proxy, is ultravnc repeater proxy.

the proxy/repeater mode I (distributor) repeater must be on your lan
«%:\programfiles%\UltraVNC\vncviewer.exe» -proxy host:5901 -connect hostname
«%programfiles%\UltraVNC\vncviewer.exe» -proxy distributor:5901 -connect host -dsmplugin filename.dsm

proxy/repeater mode II (with ID number)
«%:\programfiles%\UltraVNC\vncviewer. exe» -proxy host:5901 ID:1234
«%programfiles%\UltraVNC\vncviewer.exe» -proxy host:5901 ID:1234 -dsmplugin filename.dsm»

-autoacceptincoming
Auto  Accept Incoming connection (no SC server info)
-autoacceptnodsm
server connection set without encryption, there no message is NOT encrypted while vncviewer listen with dsmplugin
-autoreconnect [DelayInSeconds]
-autoreconnect (default value 3 seconds)
example: autoreconnect after 15 seconds
vncviewer.exe -autoreconnect 15 -connect hostname
commandline autoreconnect
default=3
value is number of seconds between reconnects This allow to set a bigger timeout between reconnect intervals this function is blocked by repeater for viewer.»
%programfiles%\ultravnc\vncviewer.exe» -autoreconnect 30 -connect hostname::5900 -quickoption 3 -dsmplugin SecureVNCPlugin.dsm
-reconnect x (warning) not yet available by command line) only gui
This is the number of times a reconnect is made before the viewer
close the connection.
-disablesponsor
remove the sponsor of vncviewer message error
-fttimeout sec
Filetransfer timeout sec [1-60]
-keepalive sec
Interval to send a keepalive message
-askexit
Open a dialogbox on exit » do you realy want to quit»
-restricted
remove options from system menu ( Filetransfer, chat ….)
-viewonly
Do not send local keyboard or mouse events to the remote computer.
-nostatus
Don’t show the status window while connecting.
-nohotkeys
Do not enable hot keys (like CTRL+ALT+F9 for full screen mode etc.). Can be useful in case of conflict with other installed software hotkeys.
-notoolbar
Do not display the toolbar.
-autoscaling
Automatically scale the viewer window so that the remote screen fits at best your local screen size.
-fullscreen
Display viewer in full screen mode.
-noauto
Disable auto mode. Required for using the color options below or saving a custom configuration (otherwise the settings from quick options always override).
-8bit, -256colors, -64colors, -8colors, -8greycolors, -4greycolors, -2greycolors
Set the color depth. Fewer colors can significantly reduce the required bandwidth.
Note: Grey colors only work with 32 bits color screen resolution. 16 or 24 bits color resolutions just don’t work with grey colors.
-shared
Share the server with other viewers, i.e. allow several viewers to connect simultaneously to the server.
-swapmouse
Swap left and right button of the mouse.
-nocursor
Do not display any local dot mouse cursor.
-dotcursor
Display the local dot mouse cursor.
-normalcursor
Display the normal local mouse cursor.
-belldeiconify
not used
-emulate3
Emulate a 3-button mouse.
-noemulate3
Do not emulate a 3-button mouse.
-nocursorshape
don’t change cursor chapes
-noremotecursor
«.» is used as remote cursor
-scale A/B
Scale the display by the factor A/B.
-emulate3timeout Timeout
emulate 3 button mouse with 2 buttons
-emulate3fuzz Emul3Fuzz
emulate 3 button mouse with 2 buttons
-disableclipboard
Do not transfer clipboard content.
-delay delay
debug option
-loglevel loglevel
Set the loglevel. This can range from 0 (minimal) to 10 (maximum logging).
-console
Open a console window for log output.
-logfile filename
Log to the file specified by filename.
-config filename
Read the configuration from filename.
-register
Record the path to the VNC viewer and the type of the .vnc files in the registry
-encoding encoding
Encoding is either raw, rre, corre, hextile, zlib, zlibhex, tight or ultra. Encodings are described here.
-compresslevel level
Use specified compression level (0..9) for «tight» and «zlib» encodings (Tight encoding specific). Level 1 uses minimum of CPU time and achieves weak compression ratios, while level 9 offers best compression but is slow in terms of CPU time consumption on the server side. Use high levels with very slow network connections, and low levels when working over high-speed LANs. It’s not recommended to use compression level 0, reasonable choices start from the level 1. 2).
-quickoption n
Select a quickoption. Modem option is default
1 = AUTO (auto select best settings, this never use ultra experimental maybe «forever»)
2 = LAN (> 1Mbit/s) Max Colors
3 = MEDIUM (> 128Kbit/s )- 256 Colors
4 = MODEM (19K — 128Kbit/s) — 64 Colors
5 = SLOW (< 19Kbit/s) 8 Colors
6 = (custom ?) N/A (not available and fail)
7 = ULTRA (> 2Mbit/s) — Experimental (still experimental after 2 years)

-position x y w h

REMARK
Commandline options are Merged with the default saved settings.
Sample:
if you save viewonly as default -> a viewer started with a commandline option will always be «viewonly».

Setting up remote access to Windows using noVNC / Sudo Null IT News

This guide is about how to set up noVNC for remote access to Windows computers.

Why noVNC?

— Windows has a «native» tool for remote access — Remote Desktop Connection. But it is not available in all versions of Windows — for example, not in the Home edition.
— There are also many VNC servers and clients for any version of Windows. But to use them, you need to install a VNC client. And there are times when you can’t put anything (restriction of rights), or it’s undesirable so as not to leave traces on someone else’s computer.
— There is also Chrome Remote Desktop, which on the client side only needs an extension in the browser. But I had a case where the Chrome protocol was blocked by the organization (almost everything was blocked there), and noVNC uses regular HTTP and therefore worked.

As far as I know, noVNC is the only tool that allows you to connect to a remote computer without installing any client — just a browser is used.
There is also SPICE, but I did not find a server for it under Windows.

As a result of this tutorial, we will be able to simply open the link in the browser, enter the password and use the remote system.

A prerequisite is port forwarding, or the white IP of the remote computer. You can also use VNC repeater. But this is already beyond the scope of this article.

General scheme

First, we will put a regular VNC server on port 5900.

Then we will put noVNC and WebSockify on port 5901.

WebSockify is a kind of proxy that, on the one hand, can talk to VNC, which we have on port 5900, and on the other hand, it can broadcast this to the browser via a web socket, which we will have on port 5901.
noVNC is just an html application, or as it is called today Single Page Application, which will work in the client browser and “speak” with WebSockify on the server.

In fact, there are VNC servers in nature that can immediately connect via websockets:

— MobileVNC, but it is paid (10 Euro per device)
— There is a LibVNCServer library that supports websockets, and theoretically works under Windows, but I have not found any ready-made server for Windows with this library.

In this case, WebSockify is no longer needed.

Install VNC

The VNC protocol itself is standardized, so theoretically any VNC server can be used.

I first tried installing TightVNC, but noVNC had some authentication issues with it. I think that it was possible to figure it out, but I installed UltraVNC (carefully, they have tons of ads there, real links are at the bottom of the page) and it all worked.

Most VNC servers that support Windows will most likely work.

I put the VNC server on port 5900. Don’t forget to set a password for the VNC connection. UltraVNC will not let you connect until you set a password.

Check that the VNC server is running by connecting to it using a VNC client from another computer or smartphone.

noVNC and WebSockify

We create a folder in a place convenient for ourselves, and upload it there:

— unpack the zip archive noVNC
— unpack the zip archive WebSockify

Target to be something like this:

Now run the command prompt with administrator rights:

Run WebSockify:

 c:\> cd c:\noVNC\websockify
c:\noVNC\websockify> websockify. exe 5901 127.0.0.1:5900 --web c:\noVNC\noVNC-master
WARNING: no 'resource' module, daemonizing support disabled
websocket server settings:
  - Listen on :5901
  - Flash security policy server
  - webserver. Web root: c:\noVNC\noVNC-master
  - No SSL/TLS support (no cert file)
  - proxying from :5901 to 127.0.0.1:5900
 

The first parameter above is the port noVNC will listen on: 5901 . This port needs to be made available to clients.

The second parameter is the IP and port where the VNC server is located: 127.0.0.1:5900

The third parameter —web instructs noVNC to serve the contents of the directory c:\noVNC\noVNC-master over HTTP (s). By default, noVNC only gives a VNC web socket, but this option allows you to have an HTTP server on the same port.

In the directory c:\noVNC\noVNC-master rename the file vnc.html to index.html so that it is given by default.

The noVNC client should now be available on port 5901:

Also try opening the noVNC page from another computer/smartphone to make sure it is accessible from the outside. If not, then check:

— that your Windows Firewall does not block external connections to this port,
— that your router correctly redirects requests to this port to the correct computer; Google «port forwarding» if needed.

We connect (Connect), enter the VNC password and see the desktop of the remote computer!

If something went wrong, the errors should show up in our console.

You can stop the noVNC server by pressing Ctrl-C in the console. The configuration described above works over HTTP (and over WS).

Add SSL with self-signed certificate

Adding SSL is optional. You can create a self-signed certificate like this:

 openssl req -new -x509 -days 365 -nodes -out self.pem -keyout self.pem 

For Windows, openssl can be found here.

As a result, we get the self.pem file, which must be pointed to when starting noVNC:

 c:\noVNC\websockify> websockify. exe 5901 127.0.0.1:5900 --web c:\noVNC\noVNC-master --cert =c:\noVNC\self.pem 

Now we have HTTPS and WSS (WebSocket Secure) working. For WSS in the settings (Settings) you need to specify Encrypt. Interestingly, noVNC uses the same port for HTTP and HTTPS — it «knows how» to distinguish between requests and respond correctly.

Since the certificate is self-signed, the browser will need to accept this certificate.

Let’s Encrypt

I have no instructions on how to set up the system so that Let’s Encrypt automatically generates a certificate specifically for our system. This would require noVNC to run on port 80, which is certainly possible but can be inconvenient, and find a way to integrate certbot so that these files are published to the correct directory. I think it’s possible, but I didn’t. If you finish — share in the comments.

In my case, I already have a home server with NGINX and DDNS name that is configured to automatically receive a certificate from Lets Encrypt.

You can run something similar for yourself. There are instructions for setting up Let’s Encrypt for Linux and Windows.

So for noVNC I just use the existing pem -files generated for nginx .

Let’s Encrypt creates the following files:

 cert.pem: Your domain's certificate
chain.pem: The Let's Encrypt chain certificate
fullchain.pem: cert.pem and chain.pem combined
privkey.pem: Your certificate's private key 

On Ubuntu, you can find them at this path: /etc/letsencrypt/live/your_domain_name

You need to copy (combine) fullchain.pem and privkey.pem into one file, for example, let’s call it encrypt.pem , and we will use this file for noVNC .

Of course, this will only work if nginx server and noVNC are on the same domain. Ports may vary.

And don’t forget that certificates are only valid for a few months, and then you need to copy the updated files.

Adding noVNC as a Windows service

Download the zip archive and unpack the files from there so that they are in the same folder as the websockify.exe file, that is, in our case, in c:\noVNC\websockify .

At startup, the service will use the parameters from the file noVNCConfig.ini . Here is an example of my config:

 5901 127.0.0.1:5900 --web C:\noVNC\noVNC-master --cert=c:\noVNC\encrypt.pem 

In the console launched with administrator privileges, create a new service:

 sc create "noVNC Websocket Server" binPath= "c:\noVNC\websockify\noVNC Websocket Service.exe" DisplayName= "noVNC Websocket Server" 

If you need to delete the service, then like this:

 sc delete "noVNC Websocket Server" 

Open services (Control Panel → Administrative Tools → Services) and start noVNC Websocket Server. Also here you can configure the service to start every time with Windows:

Known bugs

Keyboard layout

I found that the Russian keyboard layout works in a rather unusual way:
If Russian is selected for the client, then keystrokes are not transmitted to the remote computer at all.

Therefore, in order to print in Russian on a remote computer:

— the English layout must be selected on the client
— the Russian layout must be selected on the remote system

Clipboard

The clipboard (clipboard) works through a button in the browser (in the screenshot above), that is, you can put something there and pick it up on a remote system, or vice versa. And it (for me) does not know how to work with Russian letters.

VNC — remote access to a computer over a network / Sudo Null IT News

Introduction to VNC. The material is aimed at an inexperienced user.

VNC is a widely used method for remotely accessing a computer’s desktop over a network. The keystrokes and mouse movements performed by the user on their own computer are transmitted over the network to a remote computer and perceived by him actions with his own keyboard and mouse. Information from the screen of the remote computer is displayed on the screen of the user’s computer. Working via VNC over the Internet with a remote computer located on the opposite side of the world looks to the user as if this computer is directly in front of him. VNC is especially convenient when working with a graphical interface — with the desktop and desktop programs for Windows, Linux and other operating systems.

1. VNC client on a user’s Windows computer with an open VDS (virtual server) desktop running Ubuntu 9.10.

For novice users, administering a Unix server via VNC will be much easier than using the command line via SSH or a web-based control panel. GUI programs tend to be well structured and more intuitive to understand than instructional editing configuration files. Server administration looks almost the same as setting up the desktop version of the operating system, be it Linux or Windows. You can even install a similar version of the operating system on your own computer for training, and proceed to VDS / VPS administration after the basic principles of system configuration are understood.

To administer your own server via VNC, it is enough for a user to be able to work with a graphical window interface and have a basic understanding of the main components of the operating system — the file system, the network, the operation of services (daemons).

A server program (VNC server) must be running on the remote computer, which acts as a keyboard, mouse and monitor, and communicates with the user’s computer. Access to the VNC server can be password protected.

A client program (VNC client, VNC viewer) must be running on the user’s computer, which transmits information about keystrokes and mouse movements to a remote computer, receives an image from it and displays it on the screen. VNC clients exist for Windows, Linux, FreeBSD, MacOS, and many other platforms. There are also VNC clients for PDAs and mobile phones. When starting the VNC client, it is enough to specify the DNS name or IP address of the remote computer, and the password if access to the VNC server is password protected.

Most of the data transmitted via VNC is graphical information displayed on the screen. Operation requires a bandwidth of 32 Kbps to 2 Mbps. For comfortable work in full color mode with a screen resolution of 1024×768, the channel speed should be 1-2 Mbps. With a decrease in the quality of graphics, with a decrease in the number of colors, and with some additional optimization methods, a speed of 128 Kbps can provide acceptable convenience. The channel is fully occupied only when updating large areas of the screen, when printing text, the traffic is noticeably less, and the rest of the time the channel is practically not used. If there are large packet transmission delays during transmission over the channel (slow links, satellite communications, long distances), this causes a deterioration in the response time to keystrokes and mouse movements, which significantly reduces the comfort of work.