Skip to content

Running a program in linux (debian) on startup

I would like to point out that I tried A LOT of different tutorials from the internet but they don’t seem to work…

Adding stuff to init.d, rc.local etc. for some reason it doesn’t work.

I’m really desperate to get this done, but I’m a total noob when it comes to linux.

when I type in “matchbox-keyboard” it runs just fine and as intended.

That’s literally all I want, but I’d like to run it every time so when I turn my raspberry pi on, I won’t have to connect a keyboard and a mouse to initialize on-screen keyboard.

Is there a simple way to get this done, something like dropping the program into autostart folder in windows?

I have no experience with linux at all, I don’t know how to write scrips and all that stuff and all I want is to run this “matchbox-keyboard” after every reboot…

Please help me, I’m really desperate and I can’t figure it out. Spent all day doing it and still nothing…



The simplest way is to drop in a new cronjob (a cronjob is a task that is scheduled to run at a particular time):

crontab -e

This allows you to edit your cron file. Instead of putting in a time, use @reboot. So you should have a new line in your cronjob file that looks like this:

@reboot matchbox-keyboard

The cronjobs run in a different environment from your login environment, so you may need to use the full path to the program. I’m also not familiar with the matchbox-keyboard program, but it looks like it will run fine since it can run as a background process.

User contributions licensed under: CC BY-SA
10 People found this is helpful