[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
howtos:misc:lxc [2018/10/19 22:00 (UTC)] – mralk3 | howtos:misc:lxc [2019/12/28 02:27 (UTC)] – Add running GUI applications montagdude | ||
---|---|---|---|
Line 145: | Line 145: | ||
==== Custom Container Boot Process ==== | ==== Custom Container Boot Process ==== | ||
- | In order to customize the boot process you can add or modify the init scripts listed in **/ | + | In order to customize the boot process you can add or modify the init scripts listed in / |
==== Sharing Directories with the Host ==== | ==== Sharing Directories with the Host ==== | ||
Line 156: | Line 156: | ||
Note that the second path intentionally lacks a leading slash. This is because it is a relative path -- relative to the container' | Note that the second path intentionally lacks a leading slash. This is because it is a relative path -- relative to the container' | ||
+ | |||
+ | ==== Running GUI Applications ==== | ||
+ | |||
+ | Without taking additional steps, it will not be possible to run GUI applications installed in the container. The simplest way to accomplish this is to run them using SSH with X forwarding to the host. However, there are still a few steps required to make this happen. In the container, in / | ||
+ | |||
+ | < | ||
+ | X11Forwarding yes | ||
+ | X11UseLocalhost yes | ||
+ | </ | ||
+ | |||
+ | This will allow X forwarding via SSH from the container. (Note: X11UseLocalhost yes is required; otherwise X will give an error about the DISPLAY not existing.) It is also necessary to bind-mount the host's / | ||
+ | |||
+ | < | ||
+ | lxc.mount.entry = / | ||
+ | </ | ||
+ | |||
+ | Next, restart the container. Upon restart, use `lxc-ls --fancy` to determine the container' | ||
+ | |||
+ | < | ||
+ | ssh -Y user@IP appname | ||
+ | </ | ||
+ | |||
+ | This is probably the simplest way to run GUI apps in the container. However, more advanced usage is possible, including using LXC to " | ||
+ | |||
+ | [[https:// | ||
====== See Also ====== | ====== See Also ====== | ||
Line 166: | Line 191: | ||
[[https:// | [[https:// | ||
+ | |||
+ | [[https:// | ||
====== Sources ====== | ====== Sources ====== |