Auto run shell script at boot time for Beaglebone Black



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,



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.


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

But the important bits are:

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

Then configure slim:

Then setup the autostart application:



Hello Sir,

Thanks for the reply.

I wanted to tell detail about the project,

Debian 9 installation for BBB:-

Cross-compilation of Qt in BBB:-

CAN implementation in BBB:-

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?


@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.



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.


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

Modify your app start in:


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



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.



sudo apt update ; sudo apt remove slim --purge 



Hello Sir,

Thanks for the reply.

when I ran following command:

sudo ./ --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.


Okay that is weird…

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

Otherwise just run:

sudo dpkg -i linux-image*.deb
sudo reboot