Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Remotelab-RPi-Setup
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tobias Glaser
Remotelab-RPi-Setup
Commits
2f17a0a3
Commit
2f17a0a3
authored
2 years ago
by
tobiglaser
Browse files
Options
Downloads
Patches
Plain Diff
add tk and other dependencies
parent
339d7c05
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
setup.sh
+42
-29
42 additions, 29 deletions
setup.sh
with
42 additions
and
29 deletions
setup.sh
+
42
−
29
View file @
2f17a0a3
...
@@ -26,6 +26,10 @@
...
@@ -26,6 +26,10 @@
sudo
apt
-qq
update
sudo
apt
-qq
update
sudo
apt
-qq
upgrade
-y
-qq
sudo
apt
-qq
upgrade
-y
-qq
# Desktop Environment
echo
"Installing Desktop Environment"
sudo
apt
-qq
install
-qq
-y
lxde-core lxappearance
# create vnc users
# create vnc users
echo
"Creating VNC Users"
echo
"Creating VNC Users"
...
@@ -65,33 +69,36 @@
...
@@ -65,33 +69,36 @@
then
then
echo
" Creating autostart service."
echo
" Creating autostart service."
echo
"[Unit]
#
echo "[Unit]
Description=TightVNC remote desktop server
#
Description=TightVNC remote desktop server
After=network.target
#
After=network.target
#
[Service]
#
[Service]
User=pi
#
User=pi
Type=forking
#
Type=forking
ExecStart=/usr/bin/vncserver :1 -geometry 1440x900
#
ExecStart=/usr/bin/vncserver :1 -geometry 1440x900
ExecStop=/usr/bin/vncserver -kill :1
#
ExecStop=/usr/bin/vncserver -kill :1
#
[Install]
#
[Install]
WantedBy=multi-user.target"
>
vncserver.service
#
WantedBy=multi-user.target" > vncserver.service
for
i
in
$(
seq
1
$vncCount
)
do
echo
"[Unit]
echo
"[Unit]
Description=
1
TightVNC remote desktop server
Description=
$i
TightVNC remote desktop server
After=syslog.target network.target
After=syslog.target network.target
[Service]
[Service]
User=pi
1
User=pi
$i
Type=forking
Type=forking
PIDFile=/home/pi
1
/.vnc/%H:
2
.pid
PIDFile=/home/pi
$i
/.vnc/%H:
$i
.pid
ExecStartPre=-/usr/bin/vncserver -kill :
2
> /dev/null 2>&1
ExecStartPre=-/usr/bin/vncserver -kill :
$i
> /dev/null 2>&1
ExecStart=/usr/bin/vncserver :
2
-depth 16 -geometry 1600x800
ExecStart=/usr/bin/vncserver :
$i
-depth 16 -geometry 1600x800
ExecStop=/usr/bin/vncserver -kill :
2
ExecStop=/usr/bin/vncserver -kill :
$i
[Install]
[Install]
WantedBy=multi-user.target"
>
vncserver1.service
WantedBy=multi-user.target"
>
vncserver
$i
.service
# done
# echo "[Unit]
# echo "[Unit]
# Description=Start TightVNC server at startup
# Description=Start TightVNC server at startup
...
@@ -108,25 +115,30 @@
...
@@ -108,25 +115,30 @@
# [Install]
# [Install]
# WantedBy=multi-user.target" > vncserver.service
# WantedBy=multi-user.target" > vncserver.service
sudo mv
vncserver.service /etc/systemd/system/vncserver.service
# sudo mv vncserver.service /etc/systemd/system/vncserver.service
sudo mv
vncserver1.service /etc/systemd/system/vncserverA.service
sudo mv
vncserver
$i
.service /etc/systemd/system/vncserver
$i
.service
done
sudo
systemctl daemon-reload
sudo
systemctl daemon-reload
else
else
echo
" Autostart service already present."
echo
" Autostart service already present."
fi
fi
echo
" Testing service:"
echo
" Testing service:"
sudo
systemctl start vncserver
for
i
in
$(
seq
1
$vncCount
)
sudo
systemctl start vncserverA
do
VNC
=
$(
systemctl status vncserverA |
grep
-e
"Active: active (running)"
)
sudo
systemctl start vncserver
$i
done
VNC
=
$(
systemctl status vncserver1 |
grep
-e
"Active: active (running)"
)
if
[
"
$VNC
"
]
if
[
"
$VNC
"
]
then
then
echo
" Sucessful, enabling service!"
echo
" Sucessful, enabling service!"
sudo
systemctl
enable
vncserver
for
i
in
$(
seq
1
$vncCount
)
sudo
systemctl
enable
vncserverA
do
sudo
systemctl
enable
vncserver
$i
done
else
else
echo
"!Something went wrong! See status:"
echo
"!Something went wrong! See status:"
systemctl status vncserver
A
|
cat
systemctl status vncserver
1
|
cat
fi
fi
...
@@ -149,6 +161,7 @@
...
@@ -149,6 +161,7 @@
# Install user software
# Install user software
echo
"Installing letsgoING ArduinoControl"
echo
"Installing letsgoING ArduinoControl"
sudo
apt
-qq
install
-qq
-y
python3-pip python3-tk
sudo
-H
python3
-m
pip
install
-q
letsgoing-rpi-arduinocontrol
sudo
-H
python3
-m
pip
install
-q
letsgoing-rpi-arduinocontrol
echo
"Installing Arduino IDE."
echo
"Installing Arduino IDE."
...
@@ -157,7 +170,7 @@
...
@@ -157,7 +170,7 @@
# Create Shortcuts
# Create Shortcuts
echo
"Creating desktop and start menu shortcuts for ArduinoControl."
echo
"Creating desktop and start menu shortcuts for ArduinoControl."
wget
-qO-
http://letsgoing.org/img/personen/SMack.jpg
>
/home/pi/
Downloads/
SMack.jpg
wget
-qO-
http://letsgoing.org/img/personen/SMack.jpg
>
/home/pi/SMack.jpg
echo
"[Desktop Entry]
echo
"[Desktop Entry]
Encoding=UTF-8
Encoding=UTF-8
...
@@ -165,7 +178,7 @@
...
@@ -165,7 +178,7 @@
Name=Arduino Control
Name=Arduino Control
Exec=letsgoing-rpi-arduinocontrol
Exec=letsgoing-rpi-arduinocontrol
Comment=Control your Arduino from here!
Comment=Control your Arduino from here!
Icon=/home/pi/
Downloads/
SMack.jpg
Icon=/home/pi/SMack.jpg
Terminal=false
Terminal=false
Categories=Development;Engineering;Electronics"
>
arduinocontrol.desktop
Categories=Development;Engineering;Electronics"
>
arduinocontrol.desktop
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment