-
Notifications
You must be signed in to change notification settings - Fork 0
/
actions.py
111 lines (68 loc) · 1.99 KB
/
actions.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
import sys
from subprocess import call
import rbt_conf
import JLCsetup
import remote_install
from Tkinter import *
import tkMessageBox
import time
def new_setup(port):
port = str(port)
call(['clear'])
call("sudo ./resmake.sh " + port, shell=True)
call(['clear'])
#call("remote_install.sh", shell=True)
rbt_conf.launch()
def undo_setup():
call(['clear'])
call("sudo ./resundo.sh", shell=True)
rbt_conf.launch()
def rbt_now():
call("sudo reboot now", shell=True)
def rbt_ltr():
rbt_conf.launch()
sys.exit()
def stop():
JLCsetup.quit(0)
sys.exit(0)
def install(v, str3, str4, port):
str(port)
if v.get() == "vnc":
str3.set("Installing x11VNC...Please wait.")
vnc(port)
elif v.get() == "ssh":
str3.set("Installing SSH...Please wait.")
ssh()
elif v.get() == "both":
str3.set("Installing x11VNC and SSH...Please wait.")
vnc_ssh(port)
elif v.get() == "team":
str3.set("Installing Teamviewer...Please wait.")
str4.set("***NOT RECOMMENDED***")
teamviewer()
else:
tkMessageBox.showinfo("Selection Error", " Select an option to install ")
v.set("")
def vnc(port):
#install x11vnc
port = str(port)
tkMessageBox.showwarning("JLC Remote Setup", "Remember x11VNC requires port forwarding.")
call("sudo ./vnc_only.sh " + port, shell=True)
remote_install.stop()
def ssh():
#install ssh
tkMessageBox.showinfo("JLC Remote Setup", "Remember x11VNC requires port forwarding.")
call("sudo ./ssh.sh", shell=True)
remote_install.stop()
def vnc_ssh(port, ):
#install x11vnc
#install ssh
port = str(port)
tkMessageBox.showinfo("JLC Remote Setup", "Remember x11VNC requires port forwarding.")
call("sudo ./vnc_ssh.sh " + port, shell=True)
remote_install.stop()
def teamviewer():
#install teamviewer
tkMessageBox.showinfo("JLC Remote Setup", "Remember Teamviewer is NOT RECOMMENDED.")
call("teamviewer.sh", shell=True)
remote_install.stop()