Auto run shell script at boot time for Beaglebone Black


#1

Hello,

I want to auto-run the shell script which in Debian 9 consisted of a GUI program using QT and python program on Beaglebone black as soon as Beglebone black starts without asking for login id and password.

I have gone through all websites but none of the solutions works for me.

Following are Websites I search and implemented the solutions,

  1. https://unix.stackexchange.com/questions/330399/run-shell-script-after-reboot-in-beaglebone-black

  2. https://www.engineersgarage.com/contribution/autorun-python-script-beaglebone-black-boot

from the second link, I succeed to run the program but it is running at background and the Display shows nothing.

I am not getting how can I start my Qt application which is varied using CAN protocol program in python so it can be displayed on the LCD screen.

If someone knows it please help me.


#3

@Neha9, I’ve had good luck with openbox and slim, i’ve got a full project writeup here:

https://www.digikey.com/eewiki/display/linuxonarm/FLIR+Lepton+on+BeagleBone+Black+and+Green

But the important bits are:

https://www.digikey.com/eewiki/display/linuxonarm/FLIR+Lepton+on+BeagleBone+Black+and+Green#FLIRLeptononBeagleBoneBlackandGreen-Setupbasicwindowmanager

Note, unclutter removes the mouse cursor, feh set’s the background…

Then configure slim:

https://www.digikey.com/eewiki/display/linuxonarm/FLIR+Lepton+on+BeagleBone+Black+and+Green#FLIRLeptononBeagleBoneBlackandGreen-ConfigureSLIMforautologin

Then setup the autostart application:

https://www.digikey.com/eewiki/display/linuxonarm/FLIR+Lepton+on+BeagleBone+Black+and+Green#FLIRLeptononBeagleBoneBlackandGreen-Leptonqtapplication

Regards,


#4

Hello Sir,

Thanks for the reply.

I wanted to tell detail about the project,

Debian 9 installation for BBB:-

https://eewiki.net/display/linuxonarm/BeagleBone+Black

Cross-compilation of Qt in BBB:-

https://wiki.qt.io/BeagleBone_Black_Beginners_Guide

CAN implementation in BBB:-

http://www.thomas-wedemeyer.de/beaglebone-canbus-python.html

I have completed this work and my only issue is autorun this QT application.

As you gave me a link which says for installation but I have already done with it and just need the solution for autorun.

Can you help me with this?


#5

@Neha9, ‘autorun’ is windows manager specific, thus it will vary between window manager’s. In my last post, I gave you all the details you’d need to configure ‘slim/openbox’ which is one of the lightest xorg based window manager, perfect for quick boot-up into an application.

If you are unable to use ‘slim/openbox’, please let us know what login manager & window manager you are actually using so we can help you with your problem.

Regards,


#6

Hello Sir,

I install slim in beaglebone black,now my default display manager is slim and as i run my application i am unable to see qt application on screen.

Please help me.


#7

It also looks like your stuck in16bit mode, which distribution is it, jessie, stretch, or buster?

Modify your app start in:

/home/debian/.config/openbox/autostart

and have it dump it’s output to a file to see why it’s not starting.

Regards,


#8

Hello Sir,

For now will you please tell me how to restore my original login screen .

I need to know how to remove slim as default display manger and restore original one.

Please do help me.


#9

@Neha9

sudo apt update ; sudo apt remove slim --purge 

Regards,


#10

Hello Sir,

Thanks for the reply.

when I ran following command:

sudo ./update_kernel.sh --lts-4_14

I get following error:

E: Internal Error, No file name for linux-image-4.4.145-bone23:armhf

My kernel version install before is 4.4.133-bone22

Please suggest solution.


#11

Okay that is weird…

Do it help if you run “git pull” in the /opt/scripts/tools directory?

Otherwise just run:

wget http://repos.rcn-ee.net/debian/pool/main/l/linux-upstream/linux-image-4.4.145-bone23_1stretch_armhf.deb
sudo dpkg -i linux-image*.deb
sudo reboot

Regards,