Lately, I have been using a Docker server Linux laptop. On the laptop, I do all; programming, browsing, using Twitter, using Slack, and seeing YouTube. So, I have been running an X Server in a container and using GUI directly.(It’s not directory :)
I will explain the how-to.
0. My laptop is
Ubuntu Server 16.04.3 LTS (64bit)
1. build a container that has an X server and X clients.
- The “xserver-xorg-legacy” is needed to run startx from a normal user.
- The sed script that editing “/etc/X11/Xwrapper.config” is also needed to run startx from normal a user.
2. run the container with the options.
--privilegedoption is needed to display GUI.
/run/udevis needed to use mouse and keyboard.
/run/systemdare needed to use systemd. If you do not need systemd, the options are needless.
--shm-sizeoption sets the shared memory size. To using applications such as Google Chrome, it’s the needs the large size of shared memory. The default value is only 64MB!
3. My REAL settings
My REAL settings are below:
- docker-x11-base: an X server, X clients, and standard tools.
- docker-x11-wm: docker-x11-base + window manager.
- docker-desktop: docker-x11-wm + my favorite applications.
I am updating them as necessary, cheers.