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
75d208ed
Commit
75d208ed
authored
2 years ago
by
tobiglaser
Browse files
Options
Downloads
Patches
Plain Diff
desktop and vnc files
parent
2f17a0a3
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
desktop-shortcuts/arduinocontrol.desktop
+9
-0
9 additions, 0 deletions
desktop-shortcuts/arduinocontrol.desktop
setup.sh
+17
-63
17 additions, 63 deletions
setup.sh
vnc/vncserver.service
+14
-0
14 additions, 0 deletions
vnc/vncserver.service
vnc/xstartup
+10
-0
10 additions, 0 deletions
vnc/xstartup
with
50 additions
and
63 deletions
desktop-shortcuts/arduinocontrol.desktop
0 → 100644
+
9
−
0
View file @
75d208ed
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=Arduino Control
Exec=letsgoing-rpi-arduinocontrol
Comment=Control your Arduino from here!
Icon=/home/pi/SMack.jpg
Terminal=false
Categories=Development;Engineering;Electronics
\ No newline at end of file
This diff is collapsed.
Click to expand it.
setup.sh
+
17
−
63
View file @
75d208ed
...
...
@@ -49,6 +49,7 @@
sudo chown
-R
$myuser
:
$myuser
/home/
$myuser
/.vnc
sudo chmod
0600 /home/
$myuser
/.vnc/passwd
# thx https://askubuntu.com/questions/328240/assign-vnc-password-using-script
sudo cp
vnc/xstartup /home/
$myuser
/.vnc/xstartup
echo
" VNC Password:
$mypasswd
"
...
...
@@ -60,64 +61,28 @@
echo
" Installing tightvnc."
sudo
apt
-qq
install
-qq
-y
tightvncserver
echo
" Copy start up script."
for
i
in
$(
seq
1
$vncCount
)
do
echo
" Checking for autostart service."
VNC
=
$(
systemctl status vncserver
)
VNC
=
$(
systemctl status vncserver
$vncCount
)
if
[
-z
"
$VNC
"
\
-o
-n
"
$(
echo
$VNC
|
grep
"not found"
)
"
\
-o
-n
"
$(
echo
$VNC
|
grep
"Active: failed"
)
"
]
# empty -> could not be found
then
echo
" Creating autostart service."
# echo "[Unit]
# Description=TightVNC remote desktop server
# After=network.target
#
# [Service]
# User=pi
# Type=forking
# ExecStart=/usr/bin/vncserver :1 -geometry 1440x900
# ExecStop=/usr/bin/vncserver -kill :1
#
# [Install]
# WantedBy=multi-user.target" > vncserver.service
for
i
in
$(
seq
1
$vncCount
)
do
echo
"[Unit]
Description=
$i
TightVNC remote desktop server
After=syslog.target network.target
[Service]
User=pi
$i
Type=forking
PIDFile=/home/pi
$i
/.vnc/%H:
$i
.pid
ExecStartPre=-/usr/bin/vncserver -kill :
$i
> /dev/null 2>&1
ExecStart=/usr/bin/vncserver :
$i
-depth 16 -geometry 1600x800
ExecStop=/usr/bin/vncserver -kill :
$i
[Install]
WantedBy=multi-user.target"
>
vncserver
$i
.service
# done
# echo "[Unit]
# Description=Start TightVNC server at startup
# After=syslog.target network.target
#
# [Service]
# Type=forking
# User=pi%i
# PIDFile=/home/pi%i/.vnc/%H:%i.pid
# ExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1
# ExecStart=/usr/bin/vncserver :%i -depth 16 -geometry 1600x800
# ExecStop=/usr/bin/vncserver -kill :%i
#
# [Install]
# WantedBy=multi-user.target" > vncserver.service
# sudo mv vncserver.service /etc/systemd/system/vncserver.service
sudo mv
vncserver
$i
.service /etc/systemd/system/vncserver
$i
.service
done
for
i
in
$(
seq
1
$vncCount
)
do
cat
vnc-config/vncserver.service |
\
sed
-e
"s/USER/
$vncBaseName$i
/"
|
\
sed
-e
"s/NUM/
$i
/"
>
vncserver
$i
.service
sudo mv
vncserver
$i
.service /etc/systemd/system/vncserver
$i
.service
done
sudo
systemctl daemon-reload
else
echo
" Autostart service already present."
...
...
@@ -172,24 +137,14 @@
wget
-qO-
http://letsgoing.org/img/personen/SMack.jpg
>
/home/pi/SMack.jpg
echo
"[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=Arduino Control
Exec=letsgoing-rpi-arduinocontrol
Comment=Control your Arduino from here!
Icon=/home/pi/SMack.jpg
Terminal=false
Categories=Development;Engineering;Electronics"
>
arduinocontrol.desktop
#start menu
sudo cp
arduinocontrol.desktop /usr/share/applications/
sudo cp
desktop-shortcuts/
arduinocontrol.desktop /usr/share/applications/
#desktops
for
i
in
$(
seq
1
$vncCount
)
do
sudo mkdir
-p
/home/pi
$i
/Desktop/
sudo cp
arduinocontrol.desktop /home/pi
$i
/Desktop/
sudo cp
desktop-shortcuts/
arduinocontrol.desktop /home/pi
$i
/Desktop/
done
echo
"Creating desktop shortcuts for Arduino IDE."
...
...
@@ -209,7 +164,6 @@
# Camera Stuff...
#sudo systemctl daemon-reload ?
#python3 -m pip install --upgrade --force-reinstall Pillow
# https://gist.github.com/melissacoleman/8e6bf42089ccb2a5ee60c0bea26c2061
# sudo userdel -r -f pi5
...
...
This diff is collapsed.
Click to expand it.
vnc/vncserver.service
0 → 100644
+
14
−
0
View file @
75d208ed
[Unit]
Description
=
NUM TightVNC remote desktop server
After
=
syslog.target network.target
[Service]
User
=
USER
Type
=
forking
PIDFile
=
/home/USER/.vnc/%H:NUM.pid
ExecStartPre
=
-/usr/bin/vncserver -kill :NUM > /dev/null 2>&1
ExecStart
=
/usr/bin/vncserver :NUM -depth 16 -geometry 1600x800
ExecStop
=
/usr/bin/vncserver -kill :NUM
[Install]
WantedBy
=
multi-user.target
\ No newline at end of file
This diff is collapsed.
Click to expand it.
vnc/xstartup
0 → 100644
+
10
−
0
View file @
75d208ed
#!/bin/sh
xrdb
"
$HOME
/.Xresources"
xsetroot
-solid
grey
-cursor_name
left_ptr
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &
# Fix to make GNOME work
export
XKL_XMODMAP_DISABLE
=
1
#/etc/X11/Xsession
/usr/bin/startlxde
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