PDA

View Full Version : Execute plugin



Patrick Dixon
2005-02-03, 12:38
-----Original Message-----
From: discuss-bounces (AT) lists (DOT) slimdevices.com
[mailto:discuss-bounces (AT) lists (DOT) slimdevices.com]On Behalf Of kdf
Sent: 03 February 2005 18:13
To: Slim Devices Discussion
Subject: [slim] Execute plugin
"you must make sure that your scripts executable by the user running
slimserver.
use --d_plugins and --d_stdio for debugging."

It tries to Execute: C:\Program Files\Slimserver\server\scripts\test.bat and
fails with the message: The filename, directory name, or volume label syntax
is incorrect.

The line: system("\'$runScript\'"); in: my %selectFunctions seems to be the
problem. If I change it to: system $runScript it runs the script
correctly - but I still can't get scripts to run on Power ON/OFF, Stop,
Start, & File Open (although apart from the first I'm not 100% sure how to
command them).

Quoting Patrick Dixon <patrickdixon (AT) btinternet (DOT) com>:

> Thanks Kevin.
>
> Yes ... I read the web description. But I couldn't get it to execute a
test
> batch file in Windows - even after I'd fixed the typo-bug. I assigned the
> batch file to "Power" and pushed the Power button on the SlimsSoft
remote -
> it switched it off, but didn't run the batch file.
>
> "Also includes web settings form to choose scripts." - How?

its not a typo...the getDisplayName is for 6.0, which is all I'm using now
and
thus means an update of the plugin when I also fixed a problem dealing with
spaces in file names.

server settings->plugins.

you must make sure that your scripts executable by the user running
slimserver.
use --d_plugins and --d_stdio for debugging.

-kdf

kdf
2005-02-03, 13:08
Quoting Patrick Dixon <patrickdixon (AT) btinternet (DOT) com>:

>
>
> -----Original Message-----
> From: discuss-bounces (AT) lists (DOT) slimdevices.com
> [mailto:discuss-bounces (AT) lists (DOT) slimdevices.com]On Behalf Of kdf
> Sent: 03 February 2005 18:13
> To: Slim Devices Discussion
> Subject: [slim] Execute plugin
> "you must make sure that your scripts executable by the user running
> slimserver.
> use --d_plugins and --d_stdio for debugging."
>
> It tries to Execute: C:\Program Files\Slimserver\server\scripts\test.bat and
> fails with the message: The filename, directory name, or volume label syntax
> is incorrect.
>
> The line: system("\'$runScript\'"); in: my %selectFunctions seems to be the
> problem. If I change it to: system $runScript it runs the script
> correctly - but I still can't get scripts to run on Power ON/OFF, Stop,
> Start, & File Open (although apart from the first I'm not 100% sure how to
> command them).

that is the old syntax...which doesn't work when a user insists on filenames
with spaces....bit stuck there I'm afraid.

did you go to the activate screen and turn it on?

also, please use the d_plugins and d_stdio debugging, that way you should be
seeing command callback info in the log that will at least show if the plugin
is in fact trapping events.

-kdf

kdf
2005-02-03, 22:45
Hi Patrick,

I've taken a closer look at the Execute plugin. it seems that the line endings
were also a mess. I've resynced with my cvs copy and posted a new version
online. i've fixed getDisplayName so that it should work with both 5.4 and 6.0
builds, and taken the quotes off $runscript.

I only managed a bit of time to test, but it does seem to be trapping events
properly under windows. the script for power is set to run at power ON and not
OFF.

let me know if you need anything else.

cheers,
kdf

Jeff Shanholtz
2005-02-04, 09:42
On Thu, 03 Feb 2005 21:45:21 -0800, kdf wrote:

> Hi Patrick,
>
> I've taken a closer look at the Execute plugin. it seems that the line endings
> were also a mess. I've resynced with my cvs copy and posted a new version
> online. i've fixed getDisplayName so that it should work with both 5.4 and 6.0
> builds, and taken the quotes off $runscript.
>
> I only managed a bit of time to test, but it does seem to be trapping events
> properly under windows. the script for power is set to run at power ON and not
> OFF.
>
> let me know if you need anything else.
>
> cheers,
> kdf

Kevin, I just grabbed your most recent version and I still can't execute my
scripts (server is RH9, client is softsqueeze, scripts are owned by
slimserver). I've tried my scripts with and without spaces and it doesn't
work either way, and they do execute directly from a console. The plugin
does report that it is executing a script but it simply doesn't (I'm trying
to run it from the plugin menu rather than on an event). Any suggestions?

kdf
2005-02-04, 10:16
Quoting Jeff Shanholtz <jeffsubs (AT) shanholtz (DOT) com>:


> Kevin, I just grabbed your most recent version and I still can't execute my
> scripts (server is RH9, client is softsqueeze, scripts are owned by
> slimserver). I've tried my scripts with and without spaces and it doesn't
> work either way, and they do execute directly from a console. The plugin
> does report that it is executing a script but it simply doesn't (I'm trying
> to run it from the plugin menu rather than on an event). Any suggestions?

try getting rid of the spaces in the filenames. up until today I had changed it
to help with spaces, but that seemed to cause new problems.

-kdf

kdf
2005-02-04, 10:18
> Kevin, I just grabbed your most recent version and I still can't execute my
> scripts (server is RH9, client is softsqueeze, scripts are owned by
> slimserver). I've tried my scripts with and without spaces and it doesn't
> work either way, and they do execute directly from a console. The plugin
> does report that it is executing a script but it simply doesn't (I'm trying
> to run it from the plugin menu rather than on an event). Any suggestions?

erk..sorry...guess I should hav read slowly :))

try running from command line, temporarily chmod all the scripts to a+x and turn
on d_plugins and d_stdio. Make sure that you have at least once gone into the
plugin where it says "press PLAY to activate".

other than that...there is little I can suggest.
-kdf

Jeff Shanholtz
2005-02-04, 12:17
On Fri, 04 Feb 2005 09:18:41 -0800, kdf wrote:

>> Kevin, I just grabbed your most recent version and I still can't execute my
>> scripts (server is RH9, client is softsqueeze, scripts are owned by
>> slimserver). I've tried my scripts with and without spaces and it doesn't
>> work either way, and they do execute directly from a console. The plugin
>> does report that it is executing a script but it simply doesn't (I'm trying
>> to run it from the plugin menu rather than on an event). Any suggestions?
>
> erk..sorry...guess I should hav read slowly :))
>
> try running from command line, temporarily chmod all the scripts to a+x and turn
> on d_plugins and d_stdio. Make sure that you have at least once gone into the
> plugin where it says "press PLAY to activate".
>
> other than that...there is little I can suggest.
> -kdf

I tried all of that. I even tried putting an echo statement in one of my
scripts to see if that would appear in the output (I assume I would have
seen it in d_stdio, and of course I turned on d_plugins as well). Here's
all I got:

2005-02-04 11:00:50.8791 path: /usr/local/slimserver/scripts
2005-02-04 11:00:50.8794 file: /usr/local/slimserver/scripts/LightsOff
2005-02-04 11:00:50.8797 Executing: /usr/local/slimserver/scripts/LightsOff

Too bad you are out of ideas. I was thinking you use linux but maybe not,
and maybe this plugin just works in windows. Oh well. Thanks for trying to
help. Maybe I'll again raise the issue of dedicating a button on my remote
to running a script - that's what I would really prefer to do anyway.

kdf
2005-02-04, 12:25
Quoting Jeff Shanholtz <jeffsubs (AT) shanholtz (DOT) com>:

> On Fri, 04 Feb 2005 09:18:41 -0800, kdf wrote:
>
> >> Kevin, I just grabbed your most recent version and I still can't execute
> my
> >> scripts (server is RH9, client is softsqueeze, scripts are owned by
> >> slimserver). I've tried my scripts with and without spaces and it doesn't
> >> work either way, and they do execute directly from a console. The plugin
> >> does report that it is executing a script but it simply doesn't (I'm
> trying
> >> to run it from the plugin menu rather than on an event). Any suggestions?
> >
> > erk..sorry...guess I should hav read slowly :))
> >
> > try running from command line, temporarily chmod all the scripts to a+x and
> turn
> > on d_plugins and d_stdio. Make sure that you have at least once gone into
> the
> > plugin where it says "press PLAY to activate".
> >
> > other than that...there is little I can suggest.
> > -kdf
>
> I tried all of that. I even tried putting an echo statement in one of my
> scripts to see if that would appear in the output (I assume I would have
> seen it in d_stdio, and of course I turned on d_plugins as well). Here's
> all I got:
>
> 2005-02-04 11:00:50.8791 path: /usr/local/slimserver/scripts
> 2005-02-04 11:00:50.8794 file: /usr/local/slimserver/scripts/LightsOff
> 2005-02-04 11:00:50.8797 Executing: /usr/local/slimserver/scripts/LightsOff

is LightsOff the full filename? what is the full script? I'll try it out
myself this weekend.

> Too bad you are out of ideas. I was thinking you use linux but maybe not,

I do. I just wrote the thign 2 years ago based on a user request. I only ever
tested basic function, and it would run a script when I pressed PLAY.

> and maybe this plugin just works in windows.

I still have no idea if it works on windows. So far, i now have a list of bugs
that DO need fixing.

-kdf

Jeff Shanholtz
2005-02-04, 12:42
On Fri, 04 Feb 2005 11:25:24 -0800, kdf wrote:

>> 2005-02-04 11:00:50.8791 path: /usr/local/slimserver/scripts
>> 2005-02-04 11:00:50.8794 file: /usr/local/slimserver/scripts/LightsOff
>> 2005-02-04 11:00:50.8797 Executing: /usr/local/slimserver/scripts/LightsOff
>
> is LightsOff the full filename? what is the full script? I'll try it out
> myself this weekend.

Yes, it is the full filename. I removed the space so I could rule that out
as the problem.

I thought it might help to try running the script from the console as user
slimserver, but I don't know how to log in as that user (is the password
publicly known?).

kdf
2005-02-04, 13:01
Quoting Jeff Shanholtz <jeffsubs (AT) shanholtz (DOT) com>:

> On Fri, 04 Feb 2005 11:25:24 -0800, kdf wrote:
>
> >> 2005-02-04 11:00:50.8791 path: /usr/local/slimserver/scripts
> >> 2005-02-04 11:00:50.8794 file: /usr/local/slimserver/scripts/LightsOff
> >> 2005-02-04 11:00:50.8797 Executing:
> /usr/local/slimserver/scripts/LightsOff
> >
> > is LightsOff the full filename? what is the full script? I'll try it out
> > myself this weekend.
>
> Yes, it is the full filename. I removed the space so I could rule that out
> as the problem.
>
> I thought it might help to try running the script from the console as user
> slimserver, but I don't know how to log in as that user (is the password
> publicly known?).

that, I dont know. The way I get aorund that is chmod a+x (only temporarily).
change it back after the test.
-kdf

Aaron Zinck
2005-02-04, 14:19
> I still have no idea if it works on windows. So far, i now have a list of
bugs
> that DO need fixing.

Just thought I'd chime in and mention that the *old* version of the execute
script plugin (got it off the site before kdf updated it a month or so ago)
is working just fine on my windows machine as long as I don't run slim as a
service. I use it to launch Rhapsody.


"kdf" <slim-mail (AT) deane-freeman (DOT) com> wrote in
message news:1107545124.4203cc24aeec4 (AT) callisto (DOT) deane-freeman.com...
Quoting Jeff Shanholtz <jeffsubs (AT) shanholtz (DOT) com>:

> On Fri, 04 Feb 2005 09:18:41 -0800, kdf wrote:
>
> >> Kevin, I just grabbed your most recent version and I still can't
execute
> my
> >> scripts (server is RH9, client is softsqueeze, scripts are owned by
> >> slimserver). I've tried my scripts with and without spaces and it
doesn't
> >> work either way, and they do execute directly from a console. The
plugin
> >> does report that it is executing a script but it simply doesn't (I'm
> trying
> >> to run it from the plugin menu rather than on an event). Any
suggestions?
> >
> > erk..sorry...guess I should hav read slowly :))
> >
> > try running from command line, temporarily chmod all the scripts to a+x
and
> turn
> > on d_plugins and d_stdio. Make sure that you have at least once gone
into
> the
> > plugin where it says "press PLAY to activate".
> >
> > other than that...there is little I can suggest.
> > -kdf
>
> I tried all of that. I even tried putting an echo statement in one of my
> scripts to see if that would appear in the output (I assume I would have
> seen it in d_stdio, and of course I turned on d_plugins as well). Here's
> all I got:
>
> 2005-02-04 11:00:50.8791 path: /usr/local/slimserver/scripts
> 2005-02-04 11:00:50.8794 file: /usr/local/slimserver/scripts/LightsOff
> 2005-02-04 11:00:50.8797 Executing:
/usr/local/slimserver/scripts/LightsOff

is LightsOff the full filename? what is the full script? I'll try it out
myself this weekend.

> Too bad you are out of ideas. I was thinking you use linux but maybe not,

I do. I just wrote the thign 2 years ago based on a user request. I only
ever
tested basic function, and it would run a script when I pressed PLAY.

> and maybe this plugin just works in windows.

I still have no idea if it works on windows. So far, i now have a list of
bugs
that DO need fixing.

-kdf

kdf
2005-02-04, 14:36
Quoting Aaron Zinck <azinck3 (AT) ufl (DOT) edu>:

> > I still have no idea if it works on windows. So far, i now have a list of
> bugs
> > that DO need fixing.
>
> Just thought I'd chime in and mention that the *old* version of the execute
> script plugin (got it off the site before kdf updated it a month or so ago)
> is working just fine on my windows machine as long as I don't run slim as a
> service. I use it to launch Rhapsody.

Good to know! Are you using the events at all, or just manually triggering the
script by pressing PLAY? The latter should work, but I'd be surprised if the
former does.

-kdf

Aaron Zinck
2005-02-04, 14:51
I'm manually triggering the script by pressing play. I did very quickly
play around with it trying to use it with the events but the results seemed
slightly erratic and not in line with what I had expected (though it may
have been user error and I really didn't spend more than about 1 minute
using it this way as manually triggering the scripts falls more in line with
the way I want to use the plugin). It's worthing noting, though, that
despite what seemed like erratic behavior my scripts would indeed execute
when the events were triggered.

Just for documentation's sake I should mention that I'm running the (rather
old now) Dec. 3rd 2004 nightly since it's the last nightly I have that still
works properly with Realslim. I'm running it on win2k.



"kdf" <slim-mail (AT) deane-freeman (DOT) com> wrote in
message news:1107553016.4203eaf85f43c (AT) callisto (DOT) deane-freeman.com...
Quoting Aaron Zinck <azinck3 (AT) ufl (DOT) edu>:

> > I still have no idea if it works on windows. So far, i now have a list
of
> bugs
> > that DO need fixing.
>
> Just thought I'd chime in and mention that the *old* version of the
execute
> script plugin (got it off the site before kdf updated it a month or so
ago)
> is working just fine on my windows machine as long as I don't run slim as
a
> service. I use it to launch Rhapsody.

Good to know! Are you using the events at all, or just manually triggering
the
script by pressing PLAY? The latter should work, but I'd be surprised if
the
former does.

-kdf