Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

Restart xbmc with script?
Thank you for your donation

Thread Closed 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
Restart xbmc with script?
7th Sep, 2013, 09:12 AM
Post: #1
Takenover83 Offline
Registered
Posts: 14
Joined: Sep 2013
Reputation: 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.
Find all posts by this user
7th Sep, 2013, 03:46 PM
Post: #2
kraleksandr Offline
Registered
Posts: 238
Joined: Feb 2013
Reputation: 9
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
Just run "sudo /home/xbian/xbres.sh" and your XBMC will (re)start.
Find all posts by this user
7th Sep, 2013, 04:42 PM
Post: #3
Takenover83 Offline
Registered
Posts: 14
Joined: Sep 2013
Reputation: 1
RE: Restart xbmc with script?
(7th Sep, 2013 03:46 PM)kraleksandr Wrote:  
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
Just run "sudo /home/xbian/xbres.sh" and your XBMC will (re)start.
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.
Find all posts by this user
7th Sep, 2013, 04:53 PM
Post: #4
namtih Offline
Tester
Posts: 269
Joined: Dec 2012
Reputation: 28
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.
Find all posts by this user
7th Sep, 2013, 05:58 PM
Post: #5
Takenover83 Offline
Registered
Posts: 14
Joined: Sep 2013
Reputation: 1
RE: Restart xbmc with script?
Thanks for clarifying. Just tested and it worked great.
Find all posts by this user
18th Mar, 2022, 02:21 PM
Post: #6
eirawalker Offline
Banned
Posts: 1
Joined: Mar 2022
RE: Restart xbmc with script?
However, one of the problems with retropie is that sometimes it doesn't want to start up correctly and will stay stuck at the logo screen. venge io taming io
Find all posts by this user
« Next Oldest | Next Newest »
Thread Closed 


Possibly Related Threads...
Thread: Author Replies Views: Last Post
  [Script] Play YouTube to XBMC from PC brantje 22 72,727 30th Mar, 2013 12:02 AM
Last Post: brantje
  Auto restart XBMC if service is not responding or running xraxor 3 13,704 20th Mar, 2013 11:52 PM
Last Post: CurlyMo

  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 14th May, 2025, 04:23 AM Powered By MyBB, © 2002-2025 MyBB Group.