Skip to content

Running GUI applications in LXD

Syed Sayem edited this page Apr 18, 2019 · 3 revisions

Getting Started

Clone this github repo:
git clone https://github.com/sayems/lxc.resources.git

top

 

Launch GUI container in LXD

Navigate to lxc.resources directory and then run the following command:

$ ansible-playbook ubuntu.yml

Now, wait for LXD container to be ready. This might take a while to complete.

top

 

Login to ubuntu container

You can now login to the ubuntu container by running the following command:

$ lxc exec ubuntu -- sudo --user ubuntu --login 

You can run glxgears to verify graphics hardware acceleration is working.

glxgears

top

 

Launch apps from LXD container

If you want to run Firefox from the container, run the following command:

$ lxc exec ubuntu -- sudo --login --user ubuntu firefox

top