Restart xbmc with script?
|
7th Sep, 2013, 09:12 AM
Post: #1
|
|||
|
|||
Restart xbmc with script?
I recently installed retropie on Xbian. I need a script to possibly restart xbmc, without su permissions.
I will be launching this script via emulationstation and a keyboard will not be plugged in. I know xbmc can restarted with "sudo service xbmc start". But is there a way to do it without sudo? So I will not be prompted to type a password? I am open to any idea's. |
|||
7th Sep, 2013, 03:46 PM
Post: #2
|
|||
|
|||
RE: Restart xbmc with script?
Terminal xbian@xbian ~ $ cat xbres.sh #!/bin/bash service xbmc stop service xbmc start xbian@xbian ~ $ sudo cat /etc/sudoers | grep xbres xbian ALL=(ALL) NOPASSWD: /home/xbian/xbres.sh |
|||
7th Sep, 2013, 04:42 PM
Post: #3
|
|||
|
|||
RE: Restart xbmc with script?
(7th Sep, 2013 03:46 PM)kraleksandr Wrote:Thanks for that. Does the "service" command work for normal user's? I remember trying it I think as a normal user, and got command not found. Worked fine when I threw sudo in front of it. In any case, I will give this a test later. Thanks again. |
|||
7th Sep, 2013, 04:53 PM
Post: #4
|
|||
|
|||
RE: Restart xbmc with script?
(7th Sep, 2013 04:42 PM)Takenover83 Wrote: Thanks for that. Does the "service" command work for normal user's? I remember trying it I think as a normal user, and got command not found. Worked fine when I threw sudo in front of it. The "service" command will need a password. But please check the last 2 commands posted by kraleksandr: Terminal xbian@xbian ~ $ sudo cat /etc/sudoers | grep xbres xbian ALL=(ALL) NOPASSWD: /home/xbian/xbres.sh You can edit "/etc/sudoers" and allow your script to run without extra sudo command. |
|||
7th Sep, 2013, 05:58 PM
Post: #5
|
|||
|
|||
RE: Restart xbmc with script?
Thanks for clarifying. Just tested and it worked great.
|
|||
18th Mar, 2022, 02:21 PM
Post: #6
|
|||
|
|||
RE: Restart xbmc with script? | |||
« Next Oldest | Next Newest »
|
Possibly Related Threads... | |||||
Thread: | Author | Replies | Views: | Last Post | |
[Script] Play YouTube to XBMC from PC | brantje | 22 | 70,665 |
30th Mar, 2013 12:02 AM Last Post: brantje |
|
Auto restart XBMC if service is not responding or running | xraxor | 3 | 13,244 |
20th Mar, 2013 11:52 PM Last Post: CurlyMo |