# Following does not work, it builds etc. but the image is garbled:
FROM balenalib/raspberrypi4-64:buster as runtime
# This works just fine when using raspberrypi3 image:
# FROM balenalib/raspberrypi3:buster as runtime
# -----------------------------------------------------------------------------
# X-server
FROM runtime as xserver
RUN install_packages xserver-xorg-core xinit xterm
# X command https://www.x.org/releases/X11R7.7/doc/man/man1/Xserver.1.xhtml
RUN printf '\
#!/bin/bash \n\
exec /usr/bin/X -s 0 dpms -nolisten tcp "$@"\
' > /etc/X11/xinit/xserverrc
ENV DISPLAY=:0.0
CMD ["startx", "-fa", "Monospace", "-bg", "green", "-fg", "black"]
Results in:
X.Org X Server 1.20.4
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.9.0-8-arm64 aarch64 Debian
Current Operating System: Linux 7c553e35f63a 4.19.71 #1 SMP PREEMPT Wed Jan 15 21:00:39 UTC 2020 aarch64
Kernel command line: coherent_pool=1M 8250.nr_uarts=1 cma=64M cma=256M video=HDMI-A-1:1920x1080@60 smsc95xx.macaddr=DC:A6:32:23:4F:D2 vc_mem.mem_base=0x3f000000 vc_mem.mem_size=0x3f600000 dwc_otg.lpm_enable=0 console=tty1 console=ttyS0,115200 rootfstype=ext4 rootwait root=PARTUUID=f6718b57-02 rootwait
Build Date: 05 March 2019 08:11:12PM
xorg-server 2:1.20.4-1 (https://www.debian.org/support)
Current version of pixman: 0.36.0
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Mon Feb 3 16:26:27 2020
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
(II) modeset(0): Initializing kms color map for depth 24, 8 bpc.
Draw call returned Invalid argument. Expect corruption.
Results in: