noVNC/docs
mloginov 719e1df166
update novnc (#16)
* Use theme-color to color address bar in browsers

This makes the address bar on mobile browsers match the background. Note
that it requires a valid certificate and a non-dark mode set on the
device. Not supported on desktop browsers.

* Interrupt AltGr sequence detection on focus lost, fixes #1880

* Stop creating sinon sandbox early

sinon might not be loaded at this point, which can cause tests to fail.

We could create the sandbox in one of the hooks instead, but let's
remove the sandbox completely to stay consistent with our other tests.

* Manually load sinon and chai

karma-sinon-chai is not compatible with Chai 5+, and Karma is no longer
being updated.

Load sinon and chai manually instead, until we can have a long term plan
in place.

* Add test for AltGr abort on blur

* Let browser construct URL string for us

Likely a lot safer for corner cases than us trying to figure this out
ourselves.

* Allow relative WebSocket URLs

This can be very useful if you have multiple instances of noVNC, and you
want to redirect them to different VNC servers.

The new default settings will have the same behaviour as before for
systems where noVNC is deployed in the root web folder.

* Handle all settings via UI.getSetting()

Makes sure everything behaves the same way, even if there is no visible
UI for a settings.

* Merge UI startup in to a single routine

Makes it easier to see how things are connected.

* Handle disabling settings without label

* Add Zlib encoding

* Add H.264 decoder

This adds an H.264 decoder based on WebCodecs.

* Fix host and port via query string

We need to call initSetting() even if we don't have any interesting
default to set, as that is what checks if values have been provided as a
query string.

Fixes 96c76f7.

* Add unit tests for H.264 decoder

* Fix sQpushBytes sending the beginning of the array multiple times

* Let fake WebSocket handle large sends

Dynamically grow the recorded send buffer if the test needs to send a
lot of data.

* Fix tests for large WebSocket sends

These failed to test that the data was correctly split as they only
checked the first chunk transmitted.

Use random values to avoid the risk of aligning our test data with the
split boundaries and hence allowing false positives.

* Make it easier for downstream to modify settings

Expose a simple and stable API to override default settings, and force
settings that users shouldn't be able to change.

* Load settings from web server

Make it even easier to customize things by loading the settings from
separate configuration files.

* Fix typos in Russian translation

* Fix handling of VideoDecoder.isConfigSupported()

It returns an object with details, not just a simple boolean.

* Use common H.264 check in tests

Avoid duplicating this logic in multiple places.

* Raise JavaScript version requirement

So that we can use await at module top level.

* Do a real H.264 test decode to determine support

Firefox is buggy and reports support for H.264 but then throws errors
once we actually try to decode things. Detect this early by doing a
quick test decode of a single frame.

* Handle exceptions from VideoDecoder.flush()

These are not supposed to happen according to the specification, but
Firefox has some bug and throws them anyway.

* Detect broken Firefox H.264 decoder

The Firefox H.264 decoder on Windows might simply just refuse to deliver
any finished frames. It also doesn't deliver any errors.

Detect this early by expecting a frame after flush() has completed.

* Update zh_CN.po

* Consistently use "sentence case" style

Try to be more consistent in how we capitalize things. Both the "Title
Case" and "Sentence case" styles are popular, so either would work.
Google and Mozilla both prefer "Sentence case", so let's follow them.

* Also adjust to "sentence case" in translations

This would have resolved itself automatically on the next translation
update, but this commit will reduce unnecessary noise in that change.

* Update Japanese translation

* Replace node-getopt with commander for args

node-getopt isn't maintained and nodejs has started complaining about
deprecated features in it.

* Replace po2json with pofile

The former doesn't seem to be properly maintained and nodejs gives
deprecation warnings.

* Fix resizes back to initial remote session size

Since the expected client size wasn't updated when the browser window
resized, noVNC didn't resize the canvas properly when going back to
the exact same dimensions.

Fixes issue #1903

* Comment different resize functions in rfb.js

* Standardize on 4 space-indentation in CSS files

This is what we use in every other file in noVNC. It also much more
common for a CSS file in general. By standardizing on 4 spaces we can
avoid indentation mistakes.

* Increase padding of buttons and inputs

Gives them a more modern and spacious look.

* Add margin between label and input in noVNC_panel

To make stuff feel less cramped, lets add some margin here.

As of comitting this, it only affects the logging-level select dropdown
in the settings, but this is a general rule of thumb. It doesn't apply
to checkboxes or radios since they have a margin by default, and their
label to the left.

* Create CSS variables for common noVNC-colors

* Move mouse event help functions to broader scope

These functions can be used elsewhere in the tests. We want to use these
in the dragging tests in the future instead of directly calling private
methods.

* Add unit test for wheel + buttons pressed

* Split button click with dragging test

* Move mouse move flushing to separate function

* Dispatch mouse events in dragging unit tests

This makes our tests reflect the real world better, as we now send real
mouse events instead of calling private methods directly.

* Check for correct button events in dragging tests

Previously, these unit tests did not check which events were sent to the
server, only how many events were sent. This commit adds checks to see
that the expected button events are sent.

* Move gesture event help functions to broader scope

This is needed if we want to test gestures with dragging.

* Add tests for dragging with gestures

There were no test for viewport dragging using gesture previously, so
let's add some.

Note that there currently are some viewport dragging behaviours that we
don't want to have, so some tests have commented out what our desired
behaviour should be.

* Use MouseEvent.buttons for button state tracking

Instead of keeping track of button states ourselves by looking at
MouseEvent.button, we can use the MouseEvent.buttons which already
contains the state of all buttons.

* Don't send mouse events when dragging viewport

We don't want to send any mouse events to the server when dragging the
viewport. Instead, we treat them as a client-only operation.

* Flush mouseMove when initiating viewport dragging

We want to flush pending mouse moves before we initiate viewport
dragging.

Before this commit, there were scenarios where the _mouseButtonMask
would track a released button as being down.

* Move sendFbuMsg() to broader scope

This is needed if we want to use this function elsewhere in our tests.

* Add support for forward and back mouse buttons

This commit implements the extendedMouseButtons pseudo-encoding, which
makes it possible to use the forward and back mouse buttons.

* Also test Ctrl+AltGr, as that is what browsers use

Modern browsers now send the odd sequence of Ctrl+AltGr, rather than the
raw Ctrl+Alt, or the fully adjusted just AltGr.

Make sure we have a test for this scenario and don't break it.

* Remove bold styling tags in vnc.html

We aren't emphasizing important information with bold tags anywhere
else, so we shouldn't do it here either.

* Standardize on 6px or 12px border-radius

This results in a few things becoming slighly more rounded, for example
the controlbar, the settings panel and buttons/inputs. Increased
rounding gives a more friendly feel.

* Get rid of gradients on buttons and inputs

Lets make things more flat and modern.

* Differentiate buttons from text inputs

By making buttons grey with bold text, they are easy to distinguish from
text inputs.

* Redesign select dropdown arrow

Makes it more of a "V"-shape rather than a triangle, suits better in the
new spacier select-buttons.

* Redesign checkboxes and radiobuttons

Makes them bigger and gets rid of their borders. The change also allowed
for some shared styling between them.

* Add indeterminate styling to checkboxes and radios

This is used when the control is neither checked or unchecked.

* Rework how buttons react to :hover and :active

Instead of having two different types of effects (hover had a different
color, and active had a 3d-effect simulating a pressed button), we now
have an increasing activation-level. That means the button goes a bit
dark for hover, and then even darker when pressed.

There is also a variant that goes lighter for each activation level,
that can be used when the initial color is dark.

With this change, we can get rid of special :hover and :active styling
for the connect button and the control bar buttons. We can use the same
activation level principle for all buttons.

* Make buttons flat by removing borders

Gives a more clean look that fits well with the new checkboxes and
radios. The old border was mostly used to contribute to a 3d-effect,
that was used for :active. That :active-styling has been replaced by
activation levels.

* Fix :disabled styling of file-selector-button

By applying the rule to the button within the input, we effectively
applied the opacity twice - making the button almost disappear. Applying
the opacity to the input element is enough.

* Put specific :disabled rules with its element

It makes more sense to group rules per element type.

* Move general :disabled rules to common top section

Start with general stuff, followed by specific things.

* Support 'disabled' attribute on labels

Note that the :disabled selector only works on inputs, buttons and the
like.

The current method of applying .noVNC_disabled to the settings
labels is still used. This support is added mostly for completeness.

Note that when a label wraps an input, only the label should have the
disabled attribute. Otherwise the effect applies twice to the input.

* Capitalize CSS section headings

Makes them easier to distinguish from regular comments.

* Keep CSS for different input elements together

By moving the CSS for select buttons to the bottom, we keep a more
logical ordering of the elements.

* Avoid 2 borders when focus-visible on text inputs

By having the focus-visible outline overlapping the regular border
things look a bit more sane on text input elements.

* Add some sane default CSS for textareas

* Remove number picker's increase/decrease buttons

We can't style them, and they don't fit the noVNC CSS style - we are
better off without them.

* Standardize on ellipsis-type text-overflow

* Add minimum width to buttons

This ensures they aren't too small, even if the text label is short.

* Pointer cursor on buttons & grab on sliders

This makes buttons and slider stand out more.

* Add styling for color pickers

Note that no color picker elements are currently in use, this is for
completeness.

* Make interface airier by increasing line-height

Modern interfaces are less cramped, this makes noVNC feel more up to
date.

Note that this required some adjustments on noVNC_headings and
noVNC_connect_button since the text now takes up more height than the
images.

* Add styling for toggle switches

These are a type of checkbox that is suitable for ON/OFF-type switches.

* Utilize toggle switch in settings

These settings are well suited to use toggle switches. This makes these
settings more approachable and user-friendly.

* Add styling for checked options in select boxes

* Add styling for multi-select lists

This is a type of select box that doesn't appear like a button, but more
like a textarea that lists options. It is not currently used, but added
for completeness.

* Make range slider thumbs circular

Fits better with the new slightly rounded and spacious style. The track
was made slightly thicker to ensure proper centering of the new thumb.

* Only color the left part of the range track

Makes it easier to envision the value is selected.

* Make text in panel headings bold

Makes the heading pop a bit more in the new airier layout.

* Fix spacing between elements in dialogs

Dialogs have had text inputs and buttons cramped together without space
between, this fixes that.

* Tweak design of noVNC connect button

Make the color contrast with the background and the button more rounded.
The goal is to make the button stand out.

* Fix settings panel layout on small screens

Both labels and inputs protruded outside the panel on for example a
phone in portrait mode. This commit fixes that by allowing wrapping and
setting a max-width.

Since the --input-xpadding variable is now used in two different CSS
files, it was moved to constants.css.

* Add exceptions for CSS validator false positives

Some new CSS incorrectly give errors from validator.w3.org. Issues were
opened in that repo, so hopefully we can remove these exceptions soon.

I searched for alternative validators, but couldn't find a different one
that had a simple API like this one.

In order to reliably detect & handle these exceptions we unfortunately
need to make the validator output parsing quite a bit more complicated.

* Make the background of expanded settings lighter

A very slight change to the background color, to make the contrast
better with the light-grey input elements.

* Update README.md with ExtendedMouseButtons feature

* Use less technical phrasing in README

* Add helper for ExtendedDesktopSize in tests

* Make resizeSession setting test more realistic

We shouldn't expect a resize request to be sent if the container didn't
change size first.

* Include SetDesktopSize responses in tests

There might be subtle changes in behaviour, so we should mimic what a
real server does.

* Better resize rate limiting

Be more aggressive with resizing, limiting it to once ever 100 ms
instead of after a 500 ms idle period. This gives a more responsive user
experience.

* chore: fix some typos

Signed-off-by: tianzedavid <cuitianze@aliyun.com>

* Update translation template file

* Update Swedish translations

* Update README.md with H.264 encoding support

* noVNC 1.6.0 beta

* Upgrade to websockify 0.13.0 in snap package

* Let browser handle parsing of URLs before relaying

We don't want to assign a path directly to url.pathname that contains a
search query, since this causes '?' at the beginning of the query to be
URL-encoded to '%3F'. Instead use URL() to parse the path for us.

* Update French translation

* Update Dutch translation

* Update generated json files for new translations

* noVNC 1.6.0

* Fix appearance of extra key buttons

Since the extra keys panel is quite narrow in width, a max-width style
resulted in the buttons almost disappearing. That rule was only intended
for elements inside the settings panel.

Broken by commit 14f9ea5880.

Another minor error that is also fixed by this commit is that the
clipboard textarea no longer incorrectly gets a left margin of 6px.

Fixes #1946.

* Update comment reference missed in previous commit

Should have been part of f0a39cd357

* Only include valid translations in .json files

Fuzzy translations might be incorrect, and obsolete translations aren't
used anywhere.

* Close VideoFrame after H.264 detection

Otherwise browser will complain when it is garbage collected.

* Fix typo in error-handler.js

* Fix typo in Portuguese translation for "Show extra keys"

* Document new behaviour of host/port/encrypt/path

This changed in 96c76f7, but we forgot to adjust the documentation for
the parameters.

* Document new JSON settings files

This mechanism was added in 438e5b3, but we forgot to document it.

* Disable setting showDotCursor in RFB constructor

This has been deprecated for around six years now. Let's remove the
deprecation warning and disable setting showDotCursor via the options
parameter.

* initial

* fixed js imports

* fixed html import paths

* override defaults and add host and port

* fixed locales path

* link fixes

* replace config paths with cdn

---------

Signed-off-by: tianzedavid <cuitianze@aliyun.com>
Co-authored-by: Samuel Mannehed <samuel@cendio.se>
Co-authored-by: leedagee <61650578+leedagee@users.noreply.github.com>
Co-authored-by: Pierre Ossman <ossman@cendio.se>
Co-authored-by: Mark Peek <mark@peek.org>
Co-authored-by: Andri Yngvason <andri@yngvason.is>
Co-authored-by: Tomasz Kalisiak <tomasz.kalisiak3@gmail.com>
Co-authored-by: dim5x <dim5x@yahoo.com>
Co-authored-by: wxtewx <181315147@qq.com>
Co-authored-by: NNN1590 <nnn1590@nnn1590.org>
Co-authored-by: Adam Halim <adaha@cendio.se>
Co-authored-by: Alexander Zeijlon <aleze@cendio.se>
Co-authored-by: tianzedavid <cuitianze@aliyun.com>
Co-authored-by: Zeijlon (ThinLinc Team) <122010116+ThinLinc-Zeijlon@users.noreply.github.com>
Co-authored-by: Martine & Philippe <martineke.breizh@gmail.com>
Co-authored-by: Harold Horsman <haroldhorsman@gmail.com>
Co-authored-by: Liao Peiyuan <peiyuan@generalagents.com>
Co-authored-by: leandro ostruka <leandro.sakae@hotmail.com>
2025-05-22 10:12:21 +01:00
..
API-internal.md update novnc (#16) 2025-05-22 10:12:21 +01:00
API.md Use JavaScript highlighting for Synax sections 2022-12-27 15:03:32 +01:00
EMBEDDING.md update novnc (#16) 2025-05-22 10:12:21 +01:00
LIBRARY.md update novnc (#16) 2025-05-22 10:12:21 +01:00
LICENSE.BSD-2-Clause License clarification: HTML,CSS,images,fonts under permissive licenses. 2012-06-24 16:29:44 -05:00
LICENSE.BSD-3-Clause License clarification: HTML,CSS,images,fonts under permissive licenses. 2012-06-24 16:29:44 -05:00
LICENSE.MPL-2.0 License clarification: HTML,CSS,images,fonts under permissive licenses. 2012-06-24 16:29:44 -05:00
LICENSE.OFL-1.1 Converted to unix line endings 2013-01-31 11:24:04 +01:00
flash_policy.txt Add manual flash policy socat server info. 2010-10-10 18:59:02 -05:00
links include/canvas.js: fix changeCursor data format. 2011-01-18 23:22:25 -06:00
notes Enable noVNC to become Browserifiable 2016-09-16 15:49:51 -04:00
novnc_proxy.1 update novnc (#16) 2025-05-22 10:12:21 +01:00
rfb_notes Cleanup. Move note files into docs/. 2010-05-01 15:59:52 -05:00
rfbproto-3.3.pdf Add RFB specs and move *.js files into include/ 2010-03-31 19:43:09 -05:00
rfbproto-3.7.pdf Add RFB specs and move *.js files into include/ 2010-03-31 19:43:09 -05:00
rfbproto-3.8.pdf Add RFB specs and move *.js files into include/ 2010-03-31 19:43:09 -05:00