Sys Process Execute Command

jbunel
2018-04-13
2020-04-02
  • jbunel

    jbunel - 2018-04-13

    Hello evrybody.
    there is many post about the SysProcess library and particulary about the "Execute Command".

    I 've follow some exemple read in this forum and it works fine on my Raspberry pi, but only the command which doesn't need to be execute in the graphic interface.

    I explain :
    First i adjust the CODESYSControl.cfg to

    [SysProcess]
    Command=AllowAll
    

    If i try to excute :

    command1 := 'reboot';
    "SysProcess SysProcess Execute Command2(pszCommand:=command1 ...)
    

    it works fine

    and if i try to excute :

    command1 := 'leafpad';
     "SysProcess SysProcess Execute Command2(pszCommand:=command1 ...)
    

    nothing append

    if run the command 'leafpad' in the rasbperry command terminal, it works.

    So is it possible to execute command or program with graphic interface.

    Thank you.

     
  • eschwellinger

    eschwellinger - 2018-04-13

    Hi,
    if this is >=3.5SP11 there is the section for doing this in /etc/CODESYSControl_User.cfg

    so move your setting/section from /etc/CODESYSControl.cfg to /etc/CODESYSControl_User.cfg

    BR
    Edwin

     
  • jbunel

    jbunel - 2018-04-16

    Hi Edwin.
    I use the last one so : 3.5.12.20

    I tried to move the setting

    [SysProcess]
    Command=AllowAll
    

    from /etc/CODESYSControl.cfg to /etc/CODESYSControl_User.cfg.
    but same result.

    it seems that the runtime process does not have the rights to execute graphical applicaton

     
  • Frank Wenzel

    Frank Wenzel - 2020-01-27

    Do we have a solution for that until now?

     
  • ferrim

    ferrim - 2020-04-01

    Same problem here...

     
  • eschwellinger

    eschwellinger - 2020-04-02

    which plc and which version?

     
  • eschwellinger

    eschwellinger - 2020-04-02

    Hi,
    we had a similar problem to execute VLC player, for us the solution was:
    sudo -u pi DISPLAY=:0 vlc /home/pi/Videos/CODESYS.mp4

     
  • ferrim

    ferrim - 2020-04-02

    Thank you very much, your advice works fine!

     

Log in to post a comment.