Config noVNC_control_bar on right side by default

59 views
Skip to first unread message

John Wong

unread,
Apr 24, 2025, 11:38:41 PMApr 24
to noVNC
HI all,

I would like to config 'noVNC_control_bar' on right side by default.
Is it possible?   which files need to modify?
Thank you.

Avito Bot

unread,
Apr 26, 2025, 4:07:10 AMApr 26
to noVNC
Я тоже это искал, не нашёл

пятница, 25 апреля 2025 г. в 07:38:41 UTC+4, johnw...@gmail.com:

Pierre Ossman

unread,
Apr 28, 2025, 6:50:25 AMApr 28
to no...@googlegroups.com, John Wong
Unfortunately, that is not currently exposed as a setting you can modify
as an admin. You'd need to modify the source code in app/ui.js in that case.

Are you seeing an issue with the current default, and letting users
control this?

Regards,
--
Pierre Ossman Software Development
Cendio AB https://cendio.com
Teknikringen 8 https://twitter.com/ThinLinc
583 30 Linköping https://facebook.com/ThinLinc
Phone: +46-13-214600

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

John Wong

unread,
Apr 29, 2025, 2:18:26 AMApr 29
to noVNC
No issue,  just personal preference.
Do you mind to show me example, how to modify the code to achieve it?  (eg: like swap left|right in ui.js ...)?
Thank you.

Johnw

unread,
May 23, 2025, 5:00:17 PMMay 23
to no...@googlegroups.com
On 4/29/25 2:18 PM, John Wong wrote:
> No issue,  just personal preference.
> Do you mind to show me example, how to modify the code to achieve it?  (eg: like swap left|right
> in ui.js ...)?
> Thank you.
>
> oss...@cendio.com在 2025年4月28日星期一下午6:50:25 [UTC+8]寫道:
>
> On 25/04/2025 05:38, John Wong wrote:
> > HI all,
> >
> > I would like to config 'noVNC_control_bar' on right side by default.
> > Is it possible? which files need to modify?
> > Thank you.
> >
>
> Unfortunately, that is not currently exposed as a setting you can modify
> as an admin. You'd need to modify the source code in app/ui.js in that case.
>
> Are you seeing an issue with the current default, and letting users
> control this?
>
> Regards,
> --
> Pierre Ossman Software Development
> Cendio AB https://cendio.com <https://cendio.com>
> Teknikringen 8 https://twitter.com/ThinLinc <https://twitter.com/ThinLinc>
> 583 30 Linköping https://facebook.com/ThinLinc <https://facebook.com/ThinLinc>
> Phone: +46-13-214600 <tel:+46%2013%2021%2046%2000>
>
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
>
> --
> You received this message because you are subscribed to a topic in the Google Groups "noVNC" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/novnc/xKp2cVARoSA/
> unsubscribe <https://groups.google.com/d/topic/novnc/xKp2cVARoSA/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to
> novnc+un...@googlegroups.com <mailto:novnc+un...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/novnc/760204d8-aede-4a04-a833-
> a8399466fe60n%40googlegroups.com <https://groups.google.com/d/msgid/novnc/760204d8-aede-4a04-
> a833-a8399466fe60n%40googlegroups.com?utm_medium=email&utm_source=footer>.

This one seems to works, thanks.

diff --git a/app/noVNC/noVNC-1.6.0/app/ui.js b/app/noVNC/noVNC-1.6.0/app/ui.js
index 3c18d1f..c71d9fc 100644
--- a/app/noVNC/noVNC-1.6.0/app/ui.js
+++ b/app/noVNC/noVNC-1.6.0/app/ui.js
@@ -55,6 +55,11 @@ const UI = {
UI.customSettings.mandatory = {};
}

+ // Set default controlbar position to right
+ if (UI.customSettings.defaults.controlbar_pos === undefined) {
+ UI.customSettings.defaults.controlbar_pos = 'right';
+ }
+
// Set up translations
try {
await l10n.setup(LINGUAS, "app/locale/");
@@ -107,7 +112,8 @@ const UI = {
}

// Restore control bar position
- if (WebUtil.readSetting('controlbar_pos') === 'right') {
+ const controlbarPos = WebUtil.readSetting('controlbar_pos', 'right');
+ if (controlbarPos === 'right') {
UI.toggleControlbarSide();
}

Regards,
John.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages