Looking for tips/help on forwarding X for an application in LXD-Container

I want to turn this application into a LXC-able image/application… so that is eventually can be instantiated with juju deploy… but I am stuck… namely on the way to forward X.

This is the application in question :

https://download2.interactivebrokers.com/installers/ibgateway/stable-standalone/ibgateway-stable-standalone-linux-x64.sh

it installs fine on my baremetal ubuntu 20.04 environment… but if I want to get a more manageable approach for down the road… I think I need to roll this into a juju charm, but unsure where to begin forwarding the graphical UI… so that it can be fully installed and logged into once installed.

thank you

If you really mean LXC (see also: Comparing LXD vs. LXC) that might be more difficult (but maybe also not :smile:, see below) , but for LXD there are solutions:
https://blog.simos.info/discussion-on-running-x11-applications-from-within-lxd-system-containers/

If you are really using LXC:

  • The above methods might be modifyable for LXC, but that might be more complicated.
  • You might consider switching to LXD, as Juju can also use LXD: https://juju.is/docs/lxd-cloud
1 Like

No, LXD is what I meant… I got to hear from one of the guys at Canonical about LXD and the LXC relationship and I sometimes get thrown off. I’ll follow this link and give it a shot!

Some more info:
If you are searching for already set-up solutions, you might search:

1 Like

is there a keyword you use to find these profiles other than “LXD profile” ?

I am just trying to get comfortable with LXD so I can use it with Juju as I “juju-fy” my backend… so no full desktop experiences needed at this time

There are too many ways to get a graphical program to run in a LXD container.
If you do not require GPU hardware acceleration, you can even use ssh -X.
That is, ssh -X to the container that has the tool, then run the tool. The output for the window should appear on your desktop.

Thank you Simos, I knew of -X but worried since my goal is eventual juju charm deployment, will SSH -X impede that goal? Feels like I still need to forward X without SSHing…

I am hoping to juju deploy “app_name” on LXD, and the GUI will pop up and I can login.

I am not familiar with juju deploy. What happens under the hood when you run that comment?
I suppose you get to run something in the container (good). Do you also get to run something on the host?

I am not an expert on Juju nor juju charms, but there is what is called a Controller… which usually resides as its own VM in the target cloud (in my case LXD) … you can likely execute something in that controller… but no not the host …

https://juju.is/docs/deploying-applications#heading--configuring-at-deployment-time

Perhaps it would work just to get the node up… and I then SSH -X to complete the setup… but I am aiming for a more automated solution which requires less input from the end user (because it won’t be someone ssh savy)