Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make it easier to customize default host, password, port in the url via code #1159

Open
arjitc opened this issue Oct 31, 2018 · 12 comments · May be fixed by #1428
Open

make it easier to customize default host, password, port in the url via code #1159

arjitc opened this issue Oct 31, 2018 · 12 comments · May be fixed by #1428

Comments

@arjitc
Copy link

arjitc commented Oct 31, 2018

Is there anyway to pre-load / load the information (host, port, password) into the vnc.html page via PHP ?

This is possible with the vnc_light.html file but seems quite tricky with the vnc.html as it loads all the information from ui.js

Thanks!

@samhed
Copy link
Member

samhed commented Oct 31, 2018

No, the only way is to either alter the javascript or to use fragment or query parameters.

@CendioOssman
Copy link
Member

I think there might be ways we can make this easier and more obvious. We want people to be able to customise things after all.

E.g. instead of just having <script src="app/ui.js"> like we do now, we could do:

<script type="module">
import UI from "./app/ui.js";
// Change this to force specific settings
// UI.forceSetting('host', 'server.example.com');
UI.start();
</script>

@arjitc
Copy link
Author

arjitc commented Nov 5, 2018

Hi,
@CendioOssman -- yes, your example would be perfect!

The vnc_lite is very easy to implement but the features lack a lot, while vnc.html has a lot of features, better UI and more work put into it by the noVNC team as well! This would help to make the implementation into other projects very easy as well.

@CendioOssman CendioOssman changed the title using vnc.html without having host, password, port in the url bar? make it easier to customize default host, password, port in the url via code Jan 11, 2019
@samhed samhed added this to the v1.2.0 milestone May 7, 2019
@juanjoDiaz
Copy link
Contributor

You can already pass the host/port/etc can be set from the fragment or query string.

The password would be not-too-good security-wise to allow it to be picked from the fragment (although it would be trivial to implement). But it can be very easily set by simply adding UI.setPassword('<MY_PASSWORD>') right after UI.start();.

So what's actually missing here?

@arjitc
Copy link
Author

arjitc commented Jul 20, 2019

So just to clarify -- would this be possible (it was possible in the old version),

host = WebUtil.getConfigVar('host', '<?php echo $vnc_host; ?>');
port = WebUtil.getConfigVar('port', '<?php echo $vnc_port; ?>');
password = WebUtil.getConfigVar('password', '<?php echo vnc_password; ?>');

In the old version, these 3 values were set via PHP on our end and it would just auto-connect upon the page loading.

@CendioOssman
Copy link
Member

Not easily right now, no.

@arjitc
Copy link
Author

arjitc commented Jul 22, 2019

Ah -- would be nice to have it that way, I think(?) currently, the parameters can be passed in the URL, but then that saves in the browser history etc which isn't ideal, the other way at least via PHP/Sessions, you can control / wipe the variable values if the user isn't authenticated etc.

@pm-pm
Copy link

pm-pm commented Oct 29, 2019

I also like a better way to configure noVNC.
In the moment i modify the ui.js (for each node). Not nice but working.

        // const host = UI.getSetting('host');
        // const port = UI.getSetting('port');
        // const path = UI.getSetting('path');
        const host = 'novnc.myserver.com';
        const port = '443';
        const path = 'websockify?token=abc';

##

        // UI.rfb.resizeSession = UI.getSetting('resize') === 'remote';
        UI.rfb.resizeSession = 'remote';

@arjitc
Copy link
Author

arjitc commented Aug 25, 2020

@CendioOssman -- Just saw the pull-request for this feature, thank you! :)

btw Internet Explorer is EOL in 2021, might be worth making this a optional feature/branch for now which can be enabled right away? :)

@CendioOssman
Copy link
Member

Oh? That would be a welcome EOL. :)

Do you have any official reference from Microsoft that we can use?

Unfortunately I don't see a good way of making this optional, so we'll likely have to wait until we can ignore IE. :/

@CendioOssman
Copy link
Member

So I found the announcement:

https://techcommunity.microsoft.com/t5/microsoft-365-blog/microsoft-365-apps-say-farewell-to-internet-explorer-11-and/ba-p/1591666

In short, Internet Explorer is not getting EOL:d anytime soon. However Microsoft will not be supporting it for new web pages, instead considering it a tool for legacy sites.

So I think that is good enough for us to move forward with dropping IE support.

@samhed
Copy link
Member

samhed commented Sep 7, 2020

So I think that is good enough for us to move forward with dropping IE support.

It will be a glorious day

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants