No permission to execute script

Hi all,

I have created a FVWM script to poll every 5 seconds my devices (e.g floppy, cdrom, etc) but as I restart FVWM I get every time an error in .xsession-errors:[FVWM][executeModule]: <<ERROR>> Execution of module failed: /home/tf/.fvwm/script/FvwmScript-Mount-Check Permission denied

Here’s my script:[code]Init
Begin
exec $[fvwm_script]/mountcheck.sh
End

PeriodicTasks
Begin
If (RemainderOfDiv (GetTime) 5)==0 Then
Do {exec $[fvwm_script]/mountcheck.sh}
End
End[/code]

I start it with+ I Function MountCheck
in the StartFunction of FVWM

Function:[code]###########

MountCheck function

###########
DestroyFunc MountCheck
AddToFunc MountCheck

  • I $[fvwm_script]FvwmScript-Mount-Check
    [/code]

Is the script uncompleted? Or is in another part something wrong?

I am newbie with FVWM script … :blush:

Best Regards,

TF

That should be:

Do {Exec $[fvwm_script]/mountcheck.sh}

You should ensure this shell script is “chmod 700”, so as to have execute permissions.

Why? That seems like a waste – creating a single line function when you can just do:

AddToFunc StartFunction I Module FvwmScript $[fvwm_script]/FvwmScript-Mount-Check

This also goes onto fix your error below in that you need the ‘Module FvwmScript’ part before hand.

I am also curious as to what this $[fvwm_script] expands to. I’d be interested in why you’re not just relying on $[FVWM_USERDIR].

– Thomas Adam

It is set to 744.

Done. You’re right. With+ I Function MountCheckthe permission error occurs.

My FVWM script is now:[code]Init
Begin
Do {Exec $[fvwm_script]mountcheck.sh}
End

PeriodicTasks
Begin
If (RemainderOfDiv (GetTime) 5)==0 Then
Begin
Do {Exec $[fvwm_script]mountcheck.sh}
End
End[/code]
But after restarting FVWM I get this error now:code: Cause of next X Error.
Error: 2 (BadValue (integer parameter out of range for operation))
Major opcode of failed request: 1 (CreateWindow)
Minor opcode of failed request: 0
Resource id of failed request: 0x0
Leaving a core dump now[/code]

What’s happening now ?? :frowning: Where can I find the core dump? And how can I interpret it?

Because I haven’t knew about $[FVWM_USERDIR]. Therefore I have created this $[fvwm_script]
$[fvwm_script] => SetEnv fvwm_script $[HOME]/.fvwm/script/

Regards,

TF

That’s FVWM which crashed? See:

edulinux.homeunix.org/fvwm/fvwmchanfaq.html#df3

– Thomas Adam

Hi Thomas,

FVWM hasn’t crashed at any time. It works fine as ever :slight_smile: . I think this problem comes from FvwmScript. I have reduced the script toInit Begin #Do {Exec $[fvwm_script]mountcheck.sh} End
but the null error occurs allthough :frowning:

At the moment I haven’t enough time to check this issue as in the link you’ve posted is described. If I have more time I will give the dump a try again.

As a workaround I have created a cronjob running the mountcheck.sh every minute to check the devices periodically . This works good enough for me at the moment. But a shorter poll would be better …

Thanks for helping anyway :blush: :wink:

Best Regards,

TF