Skip to content

Commit 7f4b819

Browse files
Update x2go-mate.sh
1 parent 3ceef9b commit 7f4b819

File tree

1 file changed

+66
-6
lines changed

1 file changed

+66
-6
lines changed

x2go-mate.sh

+66-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,68 @@
11
#!/bin/sh
22

3-
apt install ubuntu-mate-desktop && \
4-
apt-get install software-properties-common && \
5-
add-apt-repository ppa:x2go/stable && \
6-
apt-get update && \
7-
apt-get install x2goserver x2goserver-xsession && \
8-
apt-get install x2gomatebindings
3+
set -e
4+
5+
error() {
6+
echo ${RED}"Error: $@"${RESET} >&2
7+
}
8+
9+
setup_color() {
10+
# Only use colors if connected to a terminal
11+
if [ -t 1 ]; then
12+
RED=$(printf '\033[31m')
13+
GREEN=$(printf '\033[32m')
14+
YELLOW=$(printf '\033[33m')
15+
BLUE=$(printf '\033[34m')
16+
BOLD=$(printf '\033[1m')
17+
RESET=$(printf '\033[m')
18+
else
19+
RED=""
20+
GREEN=""
21+
YELLOW=""
22+
BLUE=""
23+
BOLD=""
24+
RESET=""
25+
fi
26+
}
27+
28+
29+
main() {
30+
31+
setup_color
32+
33+
34+
echo "${BLUE}Adding x2go PPA repo...${RESET}"
35+
36+
apt-get install software-properties-common
37+
38+
add-apt-repository ppa:x2go/stable
39+
40+
41+
echo "${BLUE}Updating apt package repository...${RESET}"
42+
43+
apt-get update
44+
45+
sleep 2
46+
47+
48+
echo "${BLUE}Intalling MATE desktop and x2go server...${RESET}"
49+
50+
apt-get install
51+
52+
53+
echo "${BLUE}Intalling x2go server...${RESET}"
54+
55+
apt-get install ubuntu-mate-desktop x2goserver x2goserver-xsession x2gomatebindings
56+
57+
58+
echo "${GREEN}MATE desktop and x2go installed successfully!${RESET}"
59+
}
60+
61+
main
62+
63+
# apt install ubuntu-mate-desktop && \
64+
# apt-get install software-properties-common && \
65+
# add-apt-repository ppa:x2go/stable && \
66+
# apt-get update && \
67+
# apt-get install x2goserver x2goserver-xsession && \
68+
# apt-get install x2gomatebindings

0 commit comments

Comments
 (0)