+ # Resolution / Rotation stuff
+ mkdir -p "$${CFGROOT}/etc/X11/Xsession.d/"
+ printf 'xrandr --size 800x480\n' >"$${CFGROOT}/etc/X11/Xsession.d/10display_resolution"
+ printf '%s\n' "$$display_ws5inch_rotation" >"$${CFGROOT}/etc/X11/Xsession.d/20touch_rotation"
+ # Correct DPI scaling, although application support is mediocre
+ mkdir -p "$${CFGROOT}/etc/X11/Xresources/"
+ printf 'Xft.dpi: 180\n' >"$${CFGROOT}/etc/X11/Xresources/dpi_resolution"
+ # Workaround for applications that do not handle DPI scaling correctly
+ -sed -i 's;^Exec=;Exec=env GDK_DPI_SCALE=.5 ;' \
+ $${CFGROOT}/usr/share/applications/chromium*.desktop \
+ $${CFGROOT}/usr/share/applications/firefox*.desktop \
+ $${CFGROOT}/usr/share/applications/exo-web-browser.desktop