-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvncserver-start
52 lines (48 loc) · 1.16 KB
/
vncserver-start
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
#!/bin/bash
export USER=$(whoami)
HEIGHT=0
WIDTH=0
CHOICE_HEIGHT=5
BACKTITLE="AndroNix vncserver resolution selection"
TITLE="vncserver-start"
MENU="Escolha uma das seguintes resolucoes:"
export PORT=1
OPTIONS=(1 "Iniciar vncserver com resolucao automatica/dinamica"
2 "Iniciar vncserver com resolucao QHD"
3 "Iniciar vncserver com resolucao FHD"
4 "Iniciar vncserver com resolucao HD-ready"
5 "Iniciar vncserver com resolucao e portas customizadas")
CHOICE=$(dialog --clear \
--backtitle "$BACKTITLE" \
--title "$TITLE" \
--menu "$MENU" \
$HEIGHT $WIDTH $CHOICE_HEIGHT \
"${OPTIONS[@]}" \
2>&1 >/dev/tty)
clear
case $CHOICE in
1)
echo "Resolucao automatica/dinamica selecionada"
GEO="" vnc
;;
2)
echo "Resolucao QHD Selecionada"
GEO="-geometry 2560x1440" vnc
;;
3)
echo "Resolucao FHD Selecionada"
GEO="-geometry 1920x1080" vnc
;;
4)
echo "Resolucao HD-ready selecionada"
GEO="-geometry 1280x720" vnc
;;
5)
echo "Escolha uma resolucao/porta"
echo "Digite uma resolucao no formato LARGURAxALTURA da tela. Exemplo 1920x1200"
read custom
echo "Digite uma porta. Exemplo 2"
read port
GEO="-geometry $custom" PORT=$port vnc
;;
esac