Jump to content
LaunchBox Community Forums

Unattended DOSBox Autostart


Marc66FR

Recommended Posts

Hello all,

I installed DOSBox on a Raspberry Pi (running Raspberry Pi OS) and it works well when I start an interactive shell or ssh but it does not if I try to make it autostart at boot. What I am trying to achieve is:

  • Turn on my Raspberry
  • After the boot sequence, DOSBox starts and
  • Starts Windows 3.11
  • After 1 minute, a screensaver come up and this is what I'd like to constantly have running on my display

I installed DOSBox for a user called "admin" so I have a /home/admin/.dosbox folder with the config file and a /home/admin/DOSBox folder with Windows and my screen saver. Everything works fine when I launch it from the interactive shell as "admin" user

I added /usr/bin/dosbox to rc.local and it effectively starts DOSBox after boot, but it does so as "root" and there is no .dosbox folder created in the root user home folder, so I copied it from /home/admin and I still get the same result: my mount c /home/admin/DOSBox and autoexec are not executed; I'm stuck at the Z: prompt

I tried using "runuser -l admin -c /usr/bin/dosbox" in rc.local and I get an error that it tries to open a different shell/tty for admin, so that didn't work either. Well, actually, ps aux | grep dosbox shows it is running as admin but I don't see it on my Raspberry screen. Maybe I need to make it change tty to the one the admin DOSBox is running in, but I don't know how to do this.

I'm not a Linux expert nor a DOSBox expert and the whole purpose of this, is to make a birthday gift for my wife: a sort of picture frame that runs Johnny Castaway screensaver

Would anyone know how I can achieve the above?

Thank you in advance

Link to comment
Share on other sites

  • 1 year later...

Hey! That sounds like a cool project! Instead of using rc.local, you might want to try creating a systemd service. It gives you more control over running applications as specific users. Just set up a service for DOSBox that specifies it should run as the admin user after the boot.

Make sure your DOSBox config is set to point to the right directories for your files. That should help it start up correctly! 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...