[Coco] Does anyone know how to boot a Linux machine straight to a CoCo emulator?

Marc Charbonneau timebandit001 at gmail.com
Sat Dec 5 12:10:36 EST 2015


This is based on Debian 7 running LXDE. It was used to turn Linux machines
into unattended kiosks. If it doesn't work for you, let me know which
version of Debian and what display manager you are using and I will adjust
them for it.

*** Disclaimer : Use at your own risk, I am not responsible if this kills
your cat or make your house catch fire. ***

disable the login manager
# update-rc.d -f gdm remove

you may be using a different login manager, look in /etc/init.d/ to know
which one is present (gdm, kdm, ldm, mdm)

Add these lines to the file /etc/rc.local (before "exit 0")
# nano /etc/rc.local

Note : replace <username> with the user you want logged in

-- BEGIN --
su - <username> -c startx
poweroff
-- END --

This will start X window under the specified username. If X window stops,
the machine will poweroff.

to start a program automatically when X start,
add this script in : /home/<username>/.xsession
# nano /home/<username>/.xsession

-- BEGIN --
#!/bin/sh
# disable screensaver and DPMS screen blanking
xset -display :0 -dpms
xset -display :0 s noblank
xset -display :0 s noexpose
xset -display :0 s off
xset -display :0 s reset

cd /home/<username>

while :; do
        /path/to/executable
        echo "Automatically restarting program."
        sleep 1
done

-- END --

change owner of the script to <username>
# chown <username> /var/lib/.xsession

make this script executable
# chmod u+x /home/<username>/.xsession

VoilĂ  ! You have a single purpose Linux machine

Another solution, less radical, is to make it auto-login, then start your
emulator automatically. This way you keep access to the desktop so you can
use other programs. Pretty much every display manager ca be made to do this.


More information about the Coco mailing list