Linux equivalent of the Windows Start folder

I want to run a program when my embedded Linux desktop is running, just like Windows launches programs in the Startup folder. How can i do this?

Specifically, my target hardware is Beaglebone Black, Debian variant (rev C board). The window manager is standard.

+3


source to share


2 answers


On Linux these are called init scripts and usually sit in /etc/init.d

. How they should be defined differs between different distributions, but today many use the Linux Standard Base (LSB) Init Script format.



Good readings on this: https://wiki.debian.org/LSBInitScripts https://www.debian-administration.org/article/28/Making_scripts_run_at_boot_time_with_Debian

+3


source


There are several ways to run the program, it turns out. LXDE - window manager - supports autostart of .desktop files in ~ / .config / autostart or / etc / xdg / autostart - hooray!

http://wiki.lxde.org/en/Autostart

Except ... although I can run a simple program as a proof of concept this way, when I try to run mine, it fails. I can't figure out why. File



.xsession-errors.old

contains X server errors ("resource temporarily unavailable").

Now I use a different mechanism - running the code from a shell script (this is necessary because I need to specify the working directory for the program). This uses the "autostart" file in / etc / xdg / lxsession / and at least it works. Good. I either have to "sleep 5" before starting, or the startup prefix with the @ symbol, which forces me to retry if it fails. It looks a bit like it depends on my code is out of place at the time the autorun mechanism finds it. I cannot find a way to ensure it starts up. It's just a bunch of smelly stuff.

0


source







All Articles