After install LxdMosaic xterm not working

I wish to use Xterm.js to connect to a LXC container.

"LXDMosaic: Shell closed, if this is un-expected it could be:

  • A network error
  • The instance was turned off
  • LXDMosaic is missbehaving
  • You’re trying to use a shell not installed (I.E bash instead of ash)"

I am not really understanding the steps to connect this and how to do this via the API. Just looking at it makes my head spin…

Can anybody give me an idea on how I can implement this, what steps i must take etc?


What image are you using? If you change the shell in the top right hand corner does it work? I’ll take a look, see if I can fix it.

LXDMosaic handles the proxying itself so it can do advanced things like record sessions and control the timeout. Others seem to be happy leaving the proxying up to HaProxy / Nginx (at a cost of loosing some advanced features they could implement).

If you just want a simple PHP script to get you started I wrote one here (you should be able to adapt it to your language).

What image are you using? → Мy image is ubuntu:22.04
If you change the shell in the top right hand corner does it work? → No if i change shell does nothing

LxdMosaic is installed on ubuntu container 22.04 and hes not behind proxy only host machine and forwarded port 4444.

the xterm not working even after installation

if you can guide me what are the settings to try and what are the required packages for it to run, I will be very grateful. In general, it is clear to me, and I did not find any instructions for xterm, should it start by itself after the installation of LХDMosaic, or should additional settings be made?

It should do it by itself, I think there was a bug in the latest tagged version that prevent it running on the non standard ports (I.E you’ve forwaded it to 4444, if you can forward to port 443 it will probably work). I’ve fixed this but not tagged a release with the fix (there’s a SNAP bug and i’ve been very busy).

1 Like

Thanks for the quick reply. In my case, the situation with port 443 is a little different and it is used because of this, it has been changed to 4444. My request is that if this bug is fixed, let us know here. and one last question. Once you fix it how could we do an update?

If you want to patch it in yourself, you can copy what’s done here.

Upgrade instructions.

Release thread.

1 Like

thx you very much you are the best

this tested and worked →