Execute sh script on Connect & Disconnect

Forum / NoMachine for Linux / Execute sh script on Connect & Disconnect

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #47805
    Oscar18
    Participant

    Hello,

    I would like to run a custom script when a session/connection is open, and immediately after is closed.

    The script I would like to be executed on server site.

    Which cfg I should configure node.cfg or server.cfg? I did on both but it does not run I’m afraid.

    Also which lines I should configure? There are multiple

    To me it makes sense based on my requirement to be UserScriptAfterSessionStart & UserScriptAfterSessionDisconnect

    example of my lines is UserScriptAfterSessionDisconnect “/usr/NX/scripts/custom/runApplicationEnd.sh”

    The runApplicationEnd.sh has nx:nx owner permissions

    #47842
    Britgirl
    Keymaster

    Hi,

    scripts in server.cfg need to be executed as ‘user nx’ by nxserver. Scripts in node.cfg are executed as the user who starts the session of the nxnode process.

    It could be that you don’t have permissions to execute, use this for example:
    sudo chmod 555 /usr/NX/scripts/custom/runApplicationEnd.sh

    Can you tell us what you want to achieve with the script? Maybe send us the script as well, along with your server.cfg and node.cfg files. Send them to forum[at]nomachine[dot]com.

Viewing 2 posts - 1 through 2 (of 2 total)

Closed because the user did not provide further feedback. Please notify us if you confirm that it is resolved or open a new topic if you have the same problem.