Autorun Moonlight on Raspberry Pi startup

Tetsuo

New Member
Joined
Jan 31, 2020
Messages
5
Reaction score
0
I searched for a solution to stream games from my gaming PC to my TV, and a Raspberry Pi seemed to tick most of the boxes. I used Steamlink app previously, but the app is being deactivated on Samsung TVs on the 30th of November 2023.

I purchased a RPi 4B, and installed the Sunshine server on the host PC. On the Pi, I installed Moonlight (on Debian 12, Bookworm). Things are running smoothly so far.

My question: How do I get Moonlight to run upon startup? I have auto log-in enabled. I also want Moonlight to run "Steamlink" immediately, if possible. Steamlink is added as a game/program in Moonlight - just easier to browse and add games for me.

What I have attempted is to add Moonlight as a service, and to add it to Autorun. When running it as a service (copy pasted stuff from the interwebs) my mouse on the Pi controls my Host PC mouse for some or the other reason. I tried adding it to the Autorun file, but nothing happened.

Can someone please assist? Kindly take note that my skill level with Linux, on a scale of 1 (worst) to 10 (best) is a 1. Therefore detailed instructions will be highly appreciated.
 
Edit your cron file.

Code:
crontab -e

If it is the first time you are editing your cron just hit enter, making sure that nano is selected and NOT vi/vim. Don't want another thread of "How do I exit vim?"

Add

Code:
@reboot <command to start your application goes here>

Hit CTRL+x to exit, follow prompts to save and exit the cron file.
 
The GUI should also have options to add auto start commands, don’t necessarily have to use Cron which likely any work if there is a GUI element anyway.

Search for “startup”. I know it’s there in Ubuntu so should be in Debian too.

Here’s the hardcore way.

 
Top
Sign up to the MyBroadband newsletter
X