Web Terminal

Hi @zynthiners!

What do you think of having terminal access to your zynthian from the webconf?

Simply update and enjoy !! :wink:

13 Likes

Regarding security …
It’s clear that this doesn’t improve security for sure … but the password is still needed.
Perhaps we should think about HTTPS with a self-signed certificate …

2 Likes

HTTPS would be good for sure. Passwords over plain HTTP is such a glaring violation of what people are taught that even when it doesn’t actually matter (such as in your household network) and you perfectly well know it doesn’t, it still feels dirty and wrong :sweat_smile:

1 Like

yep that works …
It’s on the system menu …

It might be handy, but I think I’d prefer web access to the gui.

I use vnc …

Well, I use putty or mobixterm for console but that doesn’t mean I wouldn’t like it built into the web interface…

Changing to HTTPS is almost trivial. The problem is that we have to use a self-signed certificate, what makes every browser to display red-alert screens, adding security exceptions, etc…

Regards,

Yup. It’s more really annoying that browsers make using self-signed certificates look (much) worse than no encryption at all. OTOH certbot should make getting and automatically refreshing a free, trusted certifate relatively easy: https://certbot.eff.org/lets-encrypt/debianbuster-apache
Not speaking out of experience with cerbot though.

Hi @pmatilai!
Letsencrypt (certbot) or any other trusted CA can’t sign certificates for “local” names. It’s a feature of the system and it can’t be in other way. I would like that browsers omit the “red alert” screens and simply ask for adding a security exception when it’s for a “.local” name, but i don’t think this happen in the short term :wink:

Anyway, i just enabled the HTTPS on webconf, and added some lines for generating a self-signed certificate on every zynthian. Simply update and and point your browser to:

https://zynthian.local

Please, note that the unencrypted interface is still available on port 80 and you have to explicitly point your browser to the “https://” for using the encrypted version.

Enjoy!

3 Likes

I almost love it! It is nice and responsive on a RPi3 connected to same network router (laptop on wifi). I can’t test with the RPi4 because it is busy benchmarking… The reason I don’t give this full marks is because the terminal spans below the height of my browser window so I have to scroll to see the bottom where I am typing. I think that needs resolving. Also if you logout, e.g. ctrl+d you can’t get back in which is rather frustrating.

HTTPS isn’t so good for me. The display goes awry:

Reload! Ctrl-F5

It should fit any display size. Could you send the browser’s console log?

Why did you that? I can’t see a use case for this… anyway, i will try yo fix it!

Regards!

Oh, right. I must admit I was only thinking about my own case here: my home network is a private subdomain under a public domain, which is a case where Let’s Encrypt would work AIUI. But of course private domains with local DNS and all likely isn’t the most common scenario :smile:

Thanks a lot for the HTTPS option!

Still see same screen corruption.

It initially displays within the browser’s window but as I add content to the terminal its vertical height increases. Browser console output is empty whilst the screen is growing. I get the following when it first opens but no more web browser console output:

resize: 23.68 9.83025 847 1170 34 118

If I type reset into the console and it returns to normal size that fits the window. I have to create content, e.g. many ls commands that cause scrolling for several lines before the console size starts to increase. This is with Chrome on Windows.

Someone will always do something you think odd. It has been a constant conversation throughout my career:

Call it force of habit. Call it inquisitiveness. Call it an attempt to break it before someone else (less tolerant) finds the issue. I am here to find work for you… :smile:.

5 Likes

Can we chip this into the top of the webpage …?

I am also seeing a lot of unexpected line wrapping.

Beware of English accepting gifts … :smiley:

This problem exist on chrome only and it’s due to cache conflicts. Please, insist with CTRL-F5.
It worked for me.

Firefox works perfectly OK! It’s chrome again … i’m trying to solve it, but it seems that the error is deeply buried on some exoteric JS library. Use Firefox until twe have a solution :wink:

Regards,