-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
satyendra pandey
committed
Feb 6, 2018
0 parents
commit aa297f0
Showing
4 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#Virtual Screen | ||
|
||
**1) You have to run Server.py and keep Test.sh in server. | ||
**2) And to see interface You have to run Interface.py on your user desktop. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import os | ||
|
||
# use following command to kill the bash process | ||
# kill `ps -ef | grep bash Test.sh | awk '{ print $2 }'` | ||
|
||
os.system('nohup bash Test.sh &') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
while true; | ||
do | ||
gnome-screenshot -p -f '/var/www/html/1.png'; | ||
sleep 2; | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import cv2, urllib, time, os | ||
import numpy as np | ||
|
||
print "Connecting..." | ||
|
||
ip = "Put IP of that computer Here" | ||
|
||
try: | ||
req = urllib.urlopen('http://' + ip + '/1.png') | ||
print "Connected" | ||
|
||
while True: | ||
req = urllib.urlopen('http://' + ip + '/1.png') | ||
arr = np.asarray(bytearray(req.read()), dtype=np.uint8) | ||
img = cv2.imdecode(arr,-1) | ||
cv2.imshow('Desktop-2',img) | ||
k = cv2.waitKey(10) | ||
if k == 27: | ||
break | ||
time.sleep(2) | ||
|
||
except: | ||
print "Can't Connect NOW" |