Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:zhonghuaren
fl-teachertool
fl_teachertool.cxx.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fl_teachertool.cxx.patch of Package fl-teachertool
diff -ur a/fl_teachertool.cxx b/fl_teachertool.cxx --- a/fl_teachertool.cxx 2009-11-04 08:15:37.000000000 +0530 +++ b/fl_teachertool.cxx 2009-11-10 18:27:30.000000000 +0530 @@ -690,7 +690,7 @@ return; } line=REALVNCVIEWER; - line += " -passwd /usr/local/etc/fl_teachertool/teacher/"+mommy->u_vector[x].ip+" -ViewOnly -FullColour -PreferredEncoding hextile "+mommy->u_vector[x].ip+" -name="+mommy->u_vector[x].uname+"-Monitor"+" &"; + line += " -passwd /etc/fl_teachertool/teacher/"+mommy->u_vector[x].ip+" -ViewOnly -FullColour -PreferredEncoding hextile "+mommy->u_vector[x].ip+" -name="+mommy->u_vector[x].uname+"-Monitor"+" &"; system(line.c_str()); //-------------------------------------------------------- @@ -715,7 +715,7 @@ return; } line=REALVNCVIEWER; - line += " -passwd /usr/local/etc/fl_teachertool/teacher/"+mommy->u_vector[x].ip+" -FullColour -PreferredEncoding hextile "+mommy->u_vector[x].ip+" -name="+mommy->u_vector[x].uname+"-Control"+" &"; + line += " -passwd /etc/fl_teachertool/teacher/"+mommy->u_vector[x].ip+" -FullColour -PreferredEncoding hextile "+mommy->u_vector[x].ip+" -name="+mommy->u_vector[x].uname+"-Control"+" &"; system(line.c_str()); } @@ -849,7 +849,7 @@ { case alive: line = VNCSNAPSHOT; - line=line + " -passwd /usr/local/etc/fl_teachertool/teacher/"+mommy->u_vector[x].ip+" -encodings hextile -allowblank "; + line=line + " -passwd /etc/fl_teachertool/teacher/"+mommy->u_vector[x].ip+" -encodings hextile -allowblank "; line=line + mommy->u_vector[x].ip +":0 "+"/tmp/snapshots/"+mommy->u_vector[x].ip+".jpg"; system(line.c_str()); //get snapshots line=CONVERT; @@ -861,12 +861,12 @@ break; case offline: - line="/usr/local/etc/fl_teachertool/offline.jpg"; + line="/etc/fl_teachertool/offline.jpg"; thumenu[x]->deactivate(); break; case xsession_dead: - line="/usr/local/etc/fl_teachertool/no-image.jpg"; + line="/etc/fl_teachertool/no-image.jpg"; thumenu[x]->deactivate(); break; } @@ -1211,7 +1211,7 @@ thumenu[x]->add("Refresh",0,cb_refresh,this); line = VNCSNAPSHOT; - line=line + " -passwd /usr/local/etc/fl_teachertool/teacher/"+mommy->u_vector[x].ip+" -encodings hextile -allowblank "; + line=line + " -passwd /etc/fl_teachertool/teacher/"+mommy->u_vector[x].ip+" -encodings hextile -allowblank "; line=line + mommy->u_vector[x].ip +":0 "+"/tmp/snapshots/"+mommy->u_vector[x].ip+".jpg"; //call the jpg file same as ip system(line.c_str()); //get snapshots @@ -1223,12 +1223,12 @@ line="/tmp/snapshots/thumb-"+mommy->u_vector[x].ip+".jpg"; break; case offline: - line="/usr/local/etc/fl_teachertool/offline.jpg"; + line="/etc/fl_teachertool/offline.jpg"; thumbut[x]->selected=True; thumbut[x]->color(FL_BLUE); break; case xsession_dead: - line="/usr/local/etc/fl_teachertool/no-image.jpg"; + line="/etc/fl_teachertool/no-image.jpg"; thumbut[x]->selected=True; thumbut[x]->color(FL_BLUE); break; @@ -1861,7 +1861,7 @@ */ ostringstream outss; - getstdout_ss(outss, "LANG=C netstat -t -e -n|grep :6001| grep ESTABLISHED |sed -e 's/:/ /g'| sed -e 's/ESTABLISHED/ESTABLISHED /' | awk '{print $9,$6}'|sort|uniq", "ERROR: netstat failed"); + getstdout_ss(outss, "LANG=C netstat -t -e -n| grep ESTABLISHED |sed -e 's/:/ /g'| sed -e 's/ESTABLISHED/ESTABLISHED /' | awk '{print $9,$6}'|sort|uniq", "ERROR: netstat failed"); istringstream inss(outss.str()); line=getstdout("echo $DISPLAY","Error: Could not get DISPLAY variable"); @@ -2146,12 +2146,12 @@ //make passwordfile on server and remote host //don't use echo with password as it's a security risk - //line = "echo "+password+" > /usr/local/etc/fl_teachertool/teacher/"+u_vector[i].ip; + //line = "echo "+password+" > /etc/fl_teachertool/teacher/"+u_vector[i].ip; //system(line.c_str()); - text2file(password, "/usr/local/etc/fl_teachertool/teacher/"+u_vector[i].ip); + text2file(password, "/etc/fl_teachertool/teacher/"+u_vector[i].ip); //line = "ssh root@" + u_vector[i].ip + " 'echo "+ password + " > /tmp/fl_tt_xvncpasswd' "; - line= "scp /usr/local/etc/fl_teachertool/teacher/"+u_vector[i].ip+" root@" + u_vector[i].ip+":/tmp/fl_tt_xvncpasswd"; + line= "scp /etc/fl_teachertool/teacher/"+u_vector[i].ip+" root@" + u_vector[i].ip+":/tmp/fl_tt_xvncpasswd"; //cout <<line<<endl; system(line.c_str()); @@ -2375,9 +2375,9 @@ atleastone=true; //check to see if file vncreflectorpass exists - ifstream f1("/usr/local/etc/fl_teachertool/teacher/vncreflectorpass"); - ifstream f2("/usr/local/etc/fl_teachertool/teacher/teacherpass"); - ifstream f3("/usr/local/etc/fl_teachertool/clientpass"); + ifstream f1("/etc/fl_teachertool/teacher/vncreflectorpass"); + ifstream f2("/etc/fl_teachertool/teacher/teacherpass"); + ifstream f3("/etc/fl_teachertool/clientpass"); if (f1 && f2 && f3 ) { f1.close(); @@ -2386,7 +2386,7 @@ } else { - fl_message("One or more of these files \n\n/usr/local/etc/fl_teachertool/teacher/vncreflectorpass \n/usr/local/etc/fl_teachertool/teacher/teacherpass \n/usr/local/etc/fl_teachertool/clientpass \n\ndoes not exist\nPlease follow setup procedure instructions for Fl_TeacherTool to ensure security"); + fl_message("One or more of these files \n\n/etc/fl_teachertool/teacher/vncreflectorpass \n/etc/fl_teachertool/teacher/teacherpass \n/etc/fl_teachertool/clientpass \n\ndoes not exist\nPlease follow setup procedure instructions for Fl_TeacherTool to ensure security"); return; } @@ -2394,7 +2394,7 @@ //okay to run more than once line =VNCREFLECTOR; line +=" "; - line +="-p /usr/local/etc/fl_teachertool/teacher/vncreflectorpass "; //chmod 600 owner root + line +="-p /etc/fl_teachertool/teacher/vncreflectorpass "; //chmod 600 owner root line +=HOSTINFOFILE; line +=" &"; //must use this += way of adding strings since operator+ is undefined for const char[] system(line.c_str());//okay to run more than once @@ -2417,7 +2417,7 @@ //teachertool-vnc not already running: Don't run more than once for teacher { line =TIGHTVNCVIEWER; - line +=" -passwd /usr/local/etc/fl_teachertool/teacher/teacherpass"; + line +=" -passwd /etc/fl_teachertool/teacher/teacherpass"; // for teacher chmod 600 owner root and teacher dir is root only access line +=" -encodings Hextile -bgr233 localhost:99 &"; system(line.c_str());//must have & or it hangs @@ -2426,7 +2426,7 @@ //should only be run if teacher does not have the process already - string temp(" -viewonly -passwd /usr/local/etc/fl_teachertool/clientpass -encodings Hextile -bgr233 localhost:99 "); // clientpass chmod 644 owner root readable by all + string temp(" -viewonly -passwd /etc/fl_teachertool/clientpass -encodings Hextile -bgr233 localhost:99 "); // clientpass chmod 644 owner root readable by all temp = TIGHTVNCVIEWER + temp; if (atleastone) @@ -2481,7 +2481,7 @@ line = "echo "+ u_vector[x-1].x11vnc_passwd +" > /root/fl_tt_xvncpasswd"; system(line.c_str()); line=REALVNCVIEWER; - line += " -passwd /usr/local/etc/fl_teachertool/teacher/"+u_vector[x-1].ip+" -ViewOnly -FullColour -PreferredEncoding hextile "+u_vector[x-1].ip+" -name="+u_vector[x-1].uname+"-Monitor"+" &"; + line += " -passwd /etc/fl_teachertool/teacher/"+u_vector[x-1].ip+" -ViewOnly -FullColour -PreferredEncoding hextile "+u_vector[x-1].ip+" -name="+u_vector[x-1].uname+"-Monitor"+" &"; system(line.c_str()); } } @@ -2513,7 +2513,7 @@ //launch viewer line = REALVNCVIEWER; - line += " -passwd /usr/local/etc/fl_teachertool/teacher/"+u_vector[pos-1].ip+" -FullColour -PreferredEncoding hextile "+u_vector[pos-1].ip+" -name="+u_vector[pos-1].uname+"-Control"+" &"; + line += " -passwd /etc/fl_teachertool/teacher/"+u_vector[pos-1].ip+" -FullColour -PreferredEncoding hextile "+u_vector[pos-1].ip+" -name="+u_vector[pos-1].uname+"-Control"+" &"; system(line.c_str()); } else @@ -2748,7 +2748,7 @@ //if true it's possible that another teacher is using broadcast { line =TIGHTVNCVIEWER; - line +=" -passwd /usr/local/etc/fl_teachertool/teacher/teacherpass"; + line +=" -passwd /etc/fl_teachertool/teacher/teacherpass"; line +=" -encodings Hextile -bgr233 localhost:99 &"; system(line.c_str());// start tightvncviewer of broadcast system("sleep 1s");// to allow vnc time to start @@ -2938,12 +2938,12 @@ } if (!foundroom) { - fl_message("Invalid room name. Please check /usr/local/etc/fl_teachertool.conf"); + fl_message("Invalid room name. Please check /etc/fl_teachertool.conf"); } } else { - fl_message("No rooms are configured in /usr/local/etc/fl_teachertool.conf"); + fl_message("No rooms are configured in /etc/fl_teachertool.conf"); } } @@ -3006,7 +3006,7 @@ */ system(("pkill -U "+u_vector[x-1].uname+" teachertool-vnc").c_str()); //restart regular tightvnc: no control tightvnc - string temp(" -viewonly -passwd /usr/local/etc/fl_teachertool/clientpass -encodings Hextile -bgr233 localhost:99 "); + string temp(" -viewonly -passwd /etc/fl_teachertool/clientpass -encodings Hextile -bgr233 localhost:99 "); temp = TIGHTVNCVIEWER + temp; execute(u_vector[x-1],temp); } @@ -3040,7 +3040,7 @@ //Note: u_vector is 0 based but nameoutP 1 based system(("pkill -U "+u_vector[x-1].uname+" teachertool-vnc").c_str()); //restart regular tightvnc: no control tightvnc - string temp(" -viewonly -passwd /usr/local/etc/fl_teachertool/clientpass -encodings Hextile -bgr233 localhost:99 "); + string temp(" -viewonly -passwd /etc/fl_teachertool/clientpass -encodings Hextile -bgr233 localhost:99 "); temp = TIGHTVNCVIEWER + temp; execute(u_vector[x-1],temp); } @@ -3074,12 +3074,12 @@ /* //Since Full control of vncreflector is password set - //in /usr/local/etc/fl_teachertool/teacher/vncreflectorpass (first password) + //in /etc/fl_teachertool/teacher/vncreflectorpass (first password) //second password is the view only password //The encrpyted copy of the full control password is - //located in /usr/local/etc/fl_teachertool/teacher/teacherpass (only readable by root) + //located in /etc/fl_teachertool/teacher/teacherpass (only readable by root) //The encrpyted copy of the view only password is located - //in /usr/local/etc/fl_teachertool/clientpass (readable by everyone) + //in /etc/fl_teachertool/clientpass (readable by everyone) //In order for spotlighting to work we need to run tightvnc viewer with //the encrpyted teacherpass file set as the passwd. But this process has to @@ -3105,7 +3105,7 @@ } filename="/tmp/"+filename; - line="cp -p /usr/local/etc/fl_teachertool/teacher/teacherpass "+filename+ " && sync"; + line="cp -p /etc/fl_teachertool/teacher/teacherpass "+filename+ " && sync"; //teacherpass should be already set to chmod 600 with owner root system(line.c_str()); line="chown "+u_vector[pos-1].uname+" "+filename+ " && sync"; Only in b: fl_teachertool.cxx~
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor