[FreeNX-kNX] Changes in nxserver

Bastian Kames kames at ibg-monforts.de
Fri Jul 20 10:56:26 UTC 2007


Hi,

I do some changes in the nxserver script. It just small but very nice for 
viewiing on which server a user ist connect. 

Output

Server     Display Username        Remote IP       Session ID
---------- ------- --------------- --------------- --------------------------------
nx1     1030    kames  172.16.9.255    0F554AEF278EDB98795EA537FA95E641



Now the code

Line 272


session_list_user()
{
        echo "NX> 127 Sessions list of user '$1'"
        echo
        echo "Server     Display Username        Remote IP       Session ID"
        
echo "---------- ------- --------------- --------------- --------------------------------"
        for i in $NX_SESS_DIR/running/*
        do
                [ -f $i ] || break
                if egrep -q "^userName=$1$" $i
                then
                        CMDLINE=$(session_get_cmdline $i)
                        echo -e "$(getparam sessionName)\t$(getparam 
display)\t$(getparam userName)\t$(getparam foreignAddress)\t$(getparam
 sessionId)"
                fi
        done
}



Line 323


session_list_all()
{
        echo "NX> 127 Sessions list:"
        echo
        echo "Server     Display Username        Remote IP       Session ID"
        
echo "---------- ------- --------------- --------------- --------------------------------"
        for i in $NX_SESS_DIR/running/*
        do
                [ -f $i ] || break
                CMDLINE=$(session_get_cmdline $i)
                echo -e "$(getparam sessionName)\t$(getparam 
display)\t$(getparam userName)\t$(getparam foreignAddress)\t$(getparam 
sessionId)"
        done
}


Bastian







More information about the FreeNX-kNX mailing list