Bookwoorm Graphical Startup
From embeddedTS Manuals
Our X11 based images include a startup target for startx. This service launches startx automatically as root.
Startup by default launches "x-session-manager" which decides which startup software is run. By default, we have a target symlinked as x-session-manager:
/usr/bin/simple-x-session
This often looks similar to:
#!/bin/sh
matchbox-window-manager &
# Set the root window's name to "xsm-ready"
xsetroot -name "xsm-ready"
# Disable default 10 minute timeout
xset s off -dpms
# Wait for the window manager to be ready
while true; do
if xwininfo -root -name "xsm-ready" >/dev/null 2>&1; then
break
fi
sleep 0.1
done
# Set your application here. It must be run with 'exec'
# if this pid dies, the xserver will reset.
exec xterm
To replace xterm with your application, change the very end of this script to exec <yourapp>
. The "exec" is required to have your application replace the simple-x-session script's process. If this process exits, systemd will restart X11.
For embedded applications, users may want to disable the mouse cursor and title bar of their application. To do this the matchbox-window-manager
can be replaced with:
matchbox-window-manager -use_cursor no -use_titlebar no &