Skip to main content
Better formatting.
Source Link
syb0rg
  • 8.2k
  • 4
  • 38
  • 51

I have a Raspberry Pi running Raspbian that I want to auto-login and then automatically run a little program that uses the GPIO, so it needs to be run as root.

I have auto login-login working as per http://www.opentechguides.com/how-to/article/raspberry-pi/5/raspberry-pi-auto-start.htmlthis website.

What is the best way to run a program that needs GPIO?

  Is it adding the pi user to sudoers permissions? Or would adding a line with sudo <run_program> to the bottom of the ~/.bashrc file? I would guess the second so that the pi user can't do any other damage?

I have a Pi running Raspbian that I want to auto-login and then automatically run a little program that uses the GPIO, so it needs to be run as root.

I have auto login working as per http://www.opentechguides.com/how-to/article/raspberry-pi/5/raspberry-pi-auto-start.html

What is the best way to run a program that needs GPIO?

  Is it adding the pi user to sudoers permissions? Or would adding a line with sudo <run_program> to the bottom of the ~/.bashrc file? I would guess the second so that the pi user can't do any other damage?

I have a Raspberry Pi running Raspbian that I want to auto-login and then automatically run a program that uses the GPIO as root.

I have auto-login working as per this website.

What is the best way to run a program that needs GPIO? Is it adding the pi user to sudoers permissions? Or would adding a line with sudo <run_program> to the bottom of the ~/.bashrc file? I would guess the second so that the pi user can't do any other damage?

Tweeted twitter.com/#!/StackRaspi/status/421332416624877569
Source Link
mirams
  • 3.9k
  • 4
  • 17
  • 22

Automatically run a program as root for GPIO?

I have a Pi running Raspbian that I want to auto-login and then automatically run a little program that uses the GPIO, so it needs to be run as root.

I have auto login working as per http://www.opentechguides.com/how-to/article/raspberry-pi/5/raspberry-pi-auto-start.html

What is the best way to run a program that needs GPIO?

Is it adding the pi user to sudoers permissions? Or would adding a line with sudo <run_program> to the bottom of the ~/.bashrc file? I would guess the second so that the pi user can't do any other damage?