run a script at startup with a stock BBB

Hello,

I’m trying to figure out how to run a script at start up on my new BeagleBone Black. I created a something.desktop file in my /home/root/.config/autostart/ directory, but the script it references doesn’t get executed. I am trying to make this BBB run completely unattended. It will startup, ping a server which will give it a command to execute, and then it will execute that command. Currently, what I want to do is run chromium with the -kiosk parameter so it opens a full screen browser to the URL I specify. I already have this fully functioning on a raspberry pi, but the hardware isn’t reliable.

Also, I have noticed that nothing gets rendered to the screen until I tap the ALT key after starting up. I’m not sure why it does that, but if I just boot it unattended, it doesn’t send a video signal to the screen. It also goes to sleep after a little while, and I need to wake it up with a keyboard press.

And finally, I need to figure out how to do all this either via SSH or command line, since I don’t have a way to plug in both a mouse AND keyboard at the same time. No USB hub available.

On an unrelated note, are there any pre-compiled SD card images I can just use WinDiskImager to flash a microSD card with to boot something like raspbian for the pi? The wiki for the BBB is confusing as hell and I can’t figure out what I do and don’t need to do to load another OS on this thing.

You can make a systemd service for your script:

http://patrakov.blogspot.com/2011/01/writing-systemd-service-files.html

http://kezhong.wordpress.com/2011/11/19/creating-my-own-systemd-service-files-on-fedora-16x86_64/

On an unrelated note, are there any pre-compiled SD card images I can just use WinDiskImager to flash a microSD card with to boot something

You can use the beaglebone white images for the sd card. You’ll have to delete the MLO file on the emmc to prevent booting from the emmc.

-Brandon