sdegler

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: Manage clipboard behavior via login script #41886
    sdegler
    Participant

    Here’s what we came up with:

    1. we have a beforeuserlogin script that edits a template server.cfg and replaces server.cfg.
    2.  The script reloads the config after mofifying server.cfg.

    !/bin/bash

     

    ip=$1

    LOG=/tmp/nomachinebeforeloginscript.log

     

    if [ “$ip” = “X.Y.Z.A” ]; then     # this is our external gateway

    echo sed ‘s/#%EnableClipboard%/EnableClipboard client/’ >> $LOG

    sed  ‘s/#%EnableClipboard%/EnableClipboard client/’ < /usr/NX/etc/server.cfg.template > /usr/NX/etc/server.cfg 2>> $LOG

    echo “result code of sed is ‘$?'” >> $LOG

    else

    echo sed ‘s/#%EnableClipboard%/EnableClipboard both/’ >> $LOG

    sed ‘s/#%EnableClipboard%/EnableClipboard both/’ < /usr/NX/etc/server.cfg.template > /usr/NX/etc/server.cfg 2>> $LOG

    echo “result code of sed is ‘$?'” >> $LOG

    fi

    /etc/NX/nxserver –configupdate

    echo “result code of nxserver is ‘$?'” >> $LOG

    exit 0

     

    in reply to: Manage clipboard behavior via login script #41854
    sdegler
    Participant

    I should have said I want to dynamically modify cut and paste for users.   When they go direct, they should have the equivalent of EnableClipboard both, but when they come in from a gateway, I want them to only have EnableClipboard client.

     

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