Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Is there some shell script inside /boot that runs on startup?

Featured Replies

Is there some shell script file inside /boot directory that gets called on system startup? Alternatively, is there any way to make such a script run by modifying only files inside /boot (like some config setting)?

Edited by check

Armbian still supports /etc/rc.local startup way:

 

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

YOUR_COMMAND

exit 0

 

i have installed a minimal Armbian OS on my s905 box with the intention of running a python3 program directly at startup. Since this program makes use of Tkinter i had to install an Xfse Desktop in order for Tkinter to function. I am able to run my python3 program from command line after the Desktop comes up.

 

I have included my python command namely:

python3 -m bCNC

 

as suggested above before the "exit 0" line in the rc.local file.

 

This did not appear to have any effect at all. the system just  boots to the Desktop. I actually am not interested at all in using this system for anything besides my program.

 

Can i have some advice on what I can do to get this to work?

@going,

 

since my last message I continued investigating and I have managed to get it to work. I had tried the "&" suggestion but that did not work in my case probably for the following reason.

 

bCNC uses graphics through Tkinter which in itself requires a GUI to be already invoked. It seems rc.local, and I also suspect crontab, are started before the GUI is invoked so I think this is why my program did not start. Of course it would have helped if I had been given some error message!

 

The solution was to create a .desktop file at ~/.config/autostart/ . The bCNC.desktop file needs to contain the EXEC line formatted as follows:

Exec=/usr/bin/python3 /home/xxx/.local/bin/bCNC

 

Note that the full path is required and, strangely, the "-m" option needs to be removed.

 

regards

Well, you DID ask for a way to run a script, not a gui desktop application.

Glad you figured it out.

 

On 3/7/2024 at 5:23 PM, xuraax said:

Note that the full path is required and, strangely, the "-m" option needs to be removed.

 

Did you check what that option does?

 

Quote

     -m module-name
             Searches sys.path for the named module and runs the  correspond‐
             ing  .py file as a script. This terminates the option list (fol‐
             lowing options are passed as arguments to the module).

 

And you removed the invocation of bCNC so, not that strange.

Edited by bedna

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.