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.

Autostart Program without root privileges

Featured Replies

Hi @all,

 

i built this:

 

https://www.instructables.com/DIY-Lyric-Monitor-for-Stage/ running armbian-OS.

 

In order to have an external power switch, i made this:

 

 

using pin 7 and gnd and it works! the script is successfully doing a shutdown. but, to run that program ("pushbuttons.c" compiled to "pushbuttons") in anything other than root, he wants the password. and i really dont know how to add it to autostart (in "settings"), because i dont know how to fill in the "command" field. like "sudo ./program"? Thank you so much für any help.

 

13 часов назад, orangepinoob756 сказал:

In order to have an external power switch, i made this:

 

13 часов назад, orangepinoob756 сказал:

using pin 7 and gnd and it works! the script is successfully doing a shutdown.

Do you want to make an external power switch in this way?
Do you want to send a signal to one of the pins of connector 40?
Do you want the device to turn off?

But at the same time, will the 5V power supply to the device be sold?
There are pitfalls here.
Are you interested in knowing them?
And how will the external activation of the device be carried out?

  • Author

Hi, thank you for answering!

 

All of those pitfalls are solved. My only problem is: How will the program (file named "pushbuttons") that launches the shutdown-script be launched at every startup? the account that starts by default in the pre-made armbian-image is not root. and as i am no expert in linux, i dont know how it is going to be implemented in the autostart list? which command should be given? the gui lets me choose the autostart-program, but at launch, it won't load.

My gut feeling was using systemd to run the script, that way root, or in this case systemd issues the commands.

If it is to be run at startup just enable the service and specify `After` and `required` options.
Not sure how you call the script, but you can probably play around it.

https://www.freedesktop.org/software/systemd/man/systemd.service.html

 

Bonus is you get access to journalctl that logs what is going on, extremely useful when debugging.

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.