How to run a graphical application from STAF

2012-10-18
2013-06-12
  • Grant McCord
    Grant McCord
    2012-10-18

    Hello all,

    I am trying to run a graphical application from STAF but am running into an issue where it won't display anything in the active user session.

    > gnome-mplayer
    opens the gnome player application

    >staf local process start command "gnome-mplayer"  RETURNSTDOUT RETURNSTDERR WAIT
    does not. States it cannot open display.

    Anyone done anything like this and how did you solve it?

    Thanks!
    Grant

     
  • Grant McCord
    Grant McCord
    2012-10-18

    If i kill STAFProc  - then restart it , the command then works. Seems to have something to do with how STAFProc is started. Looks like it needs to be started from the session which will receive the program command - very close to how Windows works.

     
  • Sharon Lucas
    Sharon Lucas
    2012-10-18

    Right, it has to do with if you are starting STAFProc as a Windows service.  If so, when configuring this, did you select the logon option 'Local System' and check 'Interact with Desktop' so that commands run via STAF can interact with the desktop?  This is mentioned in section "11. Starting STAFProc during system reboot", sub-section "11.3 Windows" in the STAF Installation Guide at http://staf.sourceforge.net/current/STAFInstall.pdf.

    When starting STAFProc manually after logging on, this issue won't occur.