Executor - SSH
#1
I've looked for a thread for the Executor addon and can't find one.

I've made a few scripts that use SSH to execute some commands on a remote linux box and run perfectly fine from the command line. When I try to execute the scripts from within XBMC with Executor they don't seem to run.

Examples...

Code:
#!/bin/bash
ssh 192.168.1.67 "vlc -vvv pvr:// :pvr-device="/dev/video0" :pvr-norm=pal :pvr-frequency=503250 --sout '#standard{access=http,mux=ps,dst=192.168.1.67:8080/tv.asf}' -Idummy"

Code:
#!/bin/bash
ssh 192.168.1.67 "killall -9 vlc"

Code:
#!/bin/bash
ssh 192.168.1.67 "sudo reboot"

I've set things up so a password isn't required, well, it isn't required from the command line, could this be the issue?
Reply
#2
Have a look into Addon I do execute commands over ssh as well

The function is called OSrun and can be found here :

http://code.google.com/p/swiss-army-knif...b/Linux.py

Regards Hans
Reply
#3
try using /bin/bash <script file>
Reply
#4
spiff Wrote:try using /bin/bash <script file>

In what sense?

If I run /bin/bash <script file> from the command line the script works fine, it's executing it from within XBMC with Executor that fails.
Reply
#5
When I say it fails, there's no errors on screen it's just that the action at the other end doesn't happen. The XBMC log says it was executed successfully.

Code:
15:06:57 T:3077674880 M:1388019712   DEBUG: LIRC: Update - NEW at 10899023:000000037ff07bdd 00 OK mceusb (OK)
15:06:57 T:3077674880 M:1388019712   DEBUG: OnKey: 11 pressed, action is Select
15:06:57 T:3077674880 M:1388019712   DEBUG: RunScriptWithParams - calling plugin Executor('plugin://plugin.program.executor/','-1','?do=program&id=remote.sh')
15:06:57 T:3077674880 M:1388019712    INFO: initializing python engine.
15:06:57 T:3077674880 M:1388019712   DEBUG: new python thread created. id=33
15:06:57 T:2848988016 M:1388019712   DEBUG: thread start, auto delete: 0
15:06:57 T:2848988016 M:1388019712   DEBUG: Python thread: start processing
15:06:57 T:2807028592 M:1388019712   DEBUG: Thread 2807028592 terminating (autodelete)
15:06:57 T:2848988016 M:1388019712  NOTICE: -->Python Interpreter Initialized<--
15:06:57 T:2848988016 M:1388019712   DEBUG: Process - The source file to load is /home/xbmc/.xbmc/addons/plugin.program.executor/default.py
15:06:57 T:2848988016 M:1388019712   DEBUG: Process - Setting the Python path to /home/xbmc/.xbmc/addons/plugin.program.executor:/usr/lib/xbmc/addons/script.module.pil/lib:$
15:06:57 T:2848988016 M:1388019712   DEBUG: Process - Entering source directory /home/xbmc/.xbmc/addons/plugin.program.executor
15:06:57 T:2848988016 M:1388019712    INFO: Scriptresult: Success
15:06:57 T:2848988016 M:1388019712    INFO: Python script stopped
15:06:57 T:2848988016 M:1388019712   DEBUG: Thread 2848988016 terminating
15:06:57 T:3077674880 M:1388019712   DEBUG: python thread 33 destructed
15:07:07 T:3077674880 M:1387884544    INFO: Python, unloading python24.dll because no scripts are running anymore
15:07:07 T:3077674880 M:1387884544   DEBUG: UnloadExtensionLibs, clearing python extension libraries
15:07:07 T:3077674880 M:1387884544   DEBUG: Unloading: strop.so
15:07:07 T:3077674880 M:1387884544   DEBUG: Unloading: _socket.so
15:07:07 T:3077674880 M:1387884544   DEBUG: Unloading: _ssl.so
15:07:07 T:3077674880 M:1387884544   DEBUG: Unloading: time.so
15:07:07 T:3077674880 M:1387884544   DEBUG: Unloading: python24-i486-linux.so
Reply
#6
Solved thanks to spiff whilst on the IRC Channel

You need to edit the progams.cfg file in /.xbmc/userdata/addon_data/plugin.program.executor/

Code:
[Script Name]
exec = /bin/bash /path.to.sript/script.sh
Reply

Logout Mark Read Team Forum Stats Members Help
Executor - SSH0