In order to protect the SD card in an application which may suffer a sudden loss of power I am attempting to mount the root in read-only mode.
In the working (read-write) system our full-screen application gets launched by the automatic X log-in executing an LXDE auto-start script.
I've got the system running, mostly, by the previously suggested /etc/fstab table:
proc /proc proc defaults 0 0 /dev/mmcblk0p1 /boot vfat defaults 0 2 /dev/mmcblk0p2 / ext4 defaults,noatime 0 1 tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0 tmpfs /var/log tmpfs defaults,noatime,mode=0755 0 0 tmpfs /var/lock tmpfs defaults,noatime,mode=0755 0 0
My problem lies in getting the X application up and running. LXDE complains about not being able to create an .xauthority file. So I added the following kludge (note the access mode!):
tmpfs /var/lib/lightdm tmpfs defaults,noatime,mode=1777 0 0
Unfortunately the auto-start still does not work, leaving me staring at the lightdm-greeter screen. Attempting to actually log in swiftly returns me to the same prompt, and curiously the logs seem to be silent about what the failure might be.
My next attempt was to forgo the window manager entirely through a custom .xsession or .xinitrc. While this works when manually executing startx it does not log on automatically for the pi user. I fear my attempts to fiddle with the global /etc/X11/xinit/xinitrc also met with little success.
The next idea was to replace the default lightdm-greeter script by linking to the auto-start script in /usr/share/xgreeters and editing /ect/ligthdm/ligthdm.conf with alternate greeter-user and greeter-session settings. This fails with a "Greeter closed communication channel" message. Presumably there is a protocol of some sort which a proper greeter is expected to implement.
Any suggestions? I suspecft this is child's play to anyone with actual experience of Unix administration but it's got me bashing my head against a wall.