I split the shellscript in two. The first one catches the data from the website. The second one prepares the date and updates the icon in the button.
If the first script is run by root (from a cronjob), it checks all users with an uid >= 1000, if there is a config (town, key) in the ~/.meteo/ directory. If yes, download the data. If no, skip.
If this script is called by a user (from the Button…), it only checks for this user.
And the $FVWM_USERDIR isn’t passed to this script… :-/
There is a sudo-call für the second script, and i needed the option -E to pass the environment to the shell.
Now it works without Error, because the second script knows the FVWM_USERDIR.
[EDIT]
But only, if i call the script from the xterm…
From a cronjob, not.
Is there a posibillity to get the FVWM_USERDIR in the shellscript? Because i use another Userdir like in Fvwm-Crystal or Nightshade…
[/EDIT]
scientific
You have to export your new userdir before login. See bin/fvwm-nightshade. You have to do the same for your directory]
export FVWM_USERDIR=$HOME/.what-ever-directory
[/code]
It was another thing… Using sudo -E in the script. Because sudo discards the environment… And there is a sudo-command in my script.
I changed the whole thing. There is no need for a cronjob, which doesn’t get the Environment of a running fvwm-session… I start the script from an FvwmScript periodically.