Пример #1
0
 def receive(self,encodec=False,teacherIP=''):        
     self.destroyProcess(self.procRx) 
     my_login = MyUtils.getLoginName()
     isLTSP = (MyUtils.isLTSP()!='')
     if my_login == 'root': NetworkUtils.cleanRoutes()              
     command = 'vlc -I dummy ' 
     if isLTSP:
         command +=  ' --no-overlay --vout=xcb_x11 '
     command +=  '--quiet --video-on-top --skip-frames --sout-display-delay=1100  --sub-track=0 --no-overlay '
     
     command +='  -f  rtp://@239.255.255.0:'
     command += self.port 
     logged=MyUtils.logged_user()
     if not isLTSP and my_login != 'root':
         self.procRx=subprocess.Popen(command, stdout=subprocess.PIPE,shell=True)
         MyUtils.launchAs("xset s off",my_login)
     else:    
         if logged !='root':
             self.procRx=MyUtils.launchAs(command, logged)
             MyUtils.launchAs("xset s off",logged)                
         else:        
             self.procRx=MyUtils.launchAsNobody(command)
               
     MyUtils.dpms_on()        
     Actions.disableKeyboardAndMouse(False)
Пример #2
0
    def startdelayedViewer(self,target):        

        passwd=tempfile.mkstemp()[1]
        self.createVNCPassword(self.readPasswd, passwd)
        command='xvncviewer -UseLocalCursor=0 -LowColourLevel=1 -ViewOnly -MenuKey Super_R  -Shared  -Fullscreen -passwd '
        command += passwd 
        command += ' ' + target +':' + self.clientport
        self.procViewer=MyUtils.launchAsNobody(command)      
        MyUtils.dpms_on()