Sunny, On Wednesday 15 December 2004 17:56, Sunny wrote:
On Wed, 15 Dec 2004 17:28:04 -0800, Randall R Schulz wrote:
Sunny,
...
You showed this as your script:
<code> #!/bin/bash FILENAME=$1 wget --proxy=off http://somewhere.com/GetRandomImage -O "$FILENAME" date >> /home/sunny/tmp/refresh echo "$FILENAME" >> /home/sunny/tmp/refresh </code>
Although on my system the %f value has no spaces in it, I would not write a script that assumed that fact. I'd use this: ... FILENAME="$1" ...
Does that script work properly even if the argument has no suffix? I guess that since it retrieve an image from the Web and stores the result via wget's -O option, it should be fine. (That's really what it does, right? That's not just a sample you're using for illustration here, is it?)
Thats correct, -O option is the output file, so it will write in whatever is put here, even with no extension. The url returns a picture (jpg), there is just one random generator script.
The test case I showed to demonstrate that the script is ok is real.
Is the background-generating script in the default PATH you have at login time?
No, it is not, but I put the whole path in the text boxes, as I showed
Not necessarily. As I mentioned, the %f values generated by KDE do not include any suffix, be it ".png", ".jpg", ".gif" or anything else. Also, as I mentioned above, if for some reason (*) the %f value included spaces or shell meta-characters, your script would malfunction. (*) Might you have a space in your user name? there: Right.
...
I trust you enabled the "Use the following program for drawing the background", since without it the other relevant controls are disabled.
There is no way to add/edit the existing entries without enabling.
Exactly.
Did you select your entry from the list of background-generating programs?
Nonetheless, the desired entry from the list of background-generating commands must be selected.
I didn't add new entry. I edited the existing kwebdesktop, replacing the three command fields with my script (with full path to it) and only option %f. And the last one is without options as it was.
Does the preview work? Since you're not seeing any log entries, it's pretty clear your script isn't getting invoked. You should verify the setting of your command entry. In particular, make sure the path name is correct. Note, too, that you must have the command file name (accessible via PATH or an absolute path name) in the "Command:" and "Preview:" fields. Why there's an "Executable:" field, I don't know, since it appears to be completely redundant, to me.
Lastly, be sure in the main "Background" panel that you select "No picture" in the "Background" section.
Thats what I did.
...
Cheers Sunny
Randall Schulz