Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

cclcfox lockpix behind 3d games

Help
kstan
2008-11-24
2013-04-17
  • kstan
    kstan
    2008-11-24

    Hi,
    I have 2 question need some expert help.
    [question 1]
    I'm trying implement ccl, however seems like when user open 3d games in full screen (tremulous, ppracer or etc games) it floating above the lockpix when the session is end.

    Is there any I could make the lock screen always on top?

    [question 2]
    How can I compile ccl in windows by myself?

    Thanks for support
    Ks

     
    • kstan
      kstan
      2008-11-25

      Hi,
      Due to nobody can give me positive answer, I'd change a bit of the code, so far so good. Here it is:

      [step 1 for cclcfox-0.71]
      I add new parameter '-islock', when this program start with this parameter, it will lock the screen immediately.
      Add this line at ~line 30 on main.cpp
      ////////////////////
      static bool islock = NULL;  #(below static char * myname = NULL;)
      ////////////////////

      Add this line at ~line 44 on main.cpp under cclcfox-0.71 (below "\t-nossl .....")
      ////////////////////
      "\t-islock: 1 = lock by default, 0=unlock by default.\n"
      ////////////////////

      Arround line 66, (withssl = FALSE;), add following line
      ////////////////////
          else if (!strcmp(argv[i],"-islock") )
            islock = true;
      ////////////////////

      Arround line 132 (below cclcfox->showInfo();), add 4 line below
      ////////////////////
        if(islock)
          cclcfox->lockScreen();
         else
          cclcfox->unlockScreen();
      ////////////////////

      [Step 2]
      Info (you can skip to [step2 start] if you don't want to read long story):
      I found that new full screen program (especially 3d games) always float on top of cclfox client, so when times up the client still can play their game without interrup by ccl client. To overcome this issue what I can do is kill and restart the ccl client when server trigger lockscreen. This activity involve change the cclcfox.cpp and create a background running program to restart the cclcfox client.
      *Caution! This change only work for linux.

      [step2 start]
      edit cclcfox.cpp
      add line below ~line 189 (below hideInfo());
      ////////////////////
      system("touch ~/.cclcfox/islock");
      ////////////////////

      add line below ~line 199 (below showInfo());
      ////////////////////
      system("rm ~/.cclcfox/islock");
      ////////////////////

      arround line 414, under the case CS_LOCKSCREENm change the code as below:
      ////////////////////
      // it will kill the program, tell my scrip to lock the screen at next start
      //I need to do in this way to force the cclcfox client floating on top of 3d games
           system("touch ~/.cclcfox/islock; killall -9 cclcfox");
          exit (1);
      //      lockScreen();
            break;
      ////////////////////

      [step 3]
      Auto run the scrip when system detect no cclcfox client running
      //////start/////
      #!/bin/bash

      COUNT=0;
      SERVER="192.168.0.100"
      ISLOCK=""
      USESSL="-nossl"
      PC="computer1"

      cclcfox -name $PC -host $SERVER $USESSL  &
      sleep 3
      echo start
      while [ 0 -eq 0 ]; do
      COUNT=`ps aux | grep "cclcfox -name" | grep -v grep | grep -v gedit | wc -l`
      echo "total $COUNT process"
      if [ $COUNT -ge 1 ]; then
      echo "skip"
      else
        if [ -f ~/.cclcfox/islock ]; then
         ISLOCK="-islock";
        else
         ISLOCK="";
        fi

        cclcfox -name  $PC -host $SERVER $USESSL $ISLOCK &

      fi
      sleep 3

      done
      ////stop//////////////

      Hope this help you all.
      Ks Tan

       
    • Hi i see u have already installed cclcfox please give me the steps you used do do this help needed urgently