Difference between revisions of "Sudo"
From Box Of Stops Online Help
Boxofstops (Talk | contribs) |
Boxofstops (Talk | contribs) |
||
Line 1: | Line 1: | ||
Typically Box Of Stops must be run as the [[wikipedia:Superuser|Superuser]], to give it the rights it needs on the Raspberry Pi. | Typically Box Of Stops must be run as the [[wikipedia:Superuser|Superuser]], to give it the rights it needs on the Raspberry Pi. | ||
+ | |||
+ | This is done by using the '''sudo''' command. For example when [[Starting]] and [[Stopping]] Box Of Stops. | ||
+ | |||
+ | == Is sudo necessary? == | ||
For those interested, the reasons for this are: | For those interested, the reasons for this are: | ||
* The web interface (e.g. '''<nowiki>http://192.168.1.128</nowiki>''') runs on port 80. Only the superuser is allowed port numbers below 1024. | * The web interface (e.g. '''<nowiki>http://192.168.1.128</nowiki>''') runs on port 80. Only the superuser is allowed port numbers below 1024. | ||
− | |||
* To enable access to the [[Gpio button|Gpio ports]] | * To enable access to the [[Gpio button|Gpio ports]] | ||
+ | * To edit /etc/rc.local, to enable auto start | ||
− | + | All these values can be changed from the [[Application properties]] though. If you are interested to avoid using the sudo command, then change the '''server.port''' value to a number above 1024 (e.g. 8080), and override the '''pi.input.pins''' and '''auto.start''' properties to no value: | |
+ | server.port = 8080 | ||
+ | pi.input.pins = | ||
+ | auto.start = | ||
+ | |||
+ | Box Of Stops can then be started without the '''sudo''': | ||
+ | java -jar boxofstops.jar | ||
+ | |||
+ | Then to connect from the browser, add the alternative port after a colon, e.g. : | ||
+ | <nowiki>http://192.168.1.128:8080</nowiki> |
Revision as of 18:48, 8 October 2016
Typically Box Of Stops must be run as the Superuser, to give it the rights it needs on the Raspberry Pi.
This is done by using the sudo command. For example when Starting and Stopping Box Of Stops.
Is sudo necessary?
For those interested, the reasons for this are:
- The web interface (e.g. http://192.168.1.128) runs on port 80. Only the superuser is allowed port numbers below 1024.
- To enable access to the Gpio ports
- To edit /etc/rc.local, to enable auto start
All these values can be changed from the Application properties though. If you are interested to avoid using the sudo command, then change the server.port value to a number above 1024 (e.g. 8080), and override the pi.input.pins and auto.start properties to no value:
server.port = 8080 pi.input.pins = auto.start =
Box Of Stops can then be started without the sudo:
java -jar boxofstops.jar
Then to connect from the browser, add the alternative port after a colon, e.g. :
http://192.168.1.128:8080