Difference between revisions of "Script remote desktop"
Line 1: | Line 1: | ||
+ | in /home/pi/config/autostart | ||
+ | |||
+ | <pre> | ||
+ | [Desktop Entry] | ||
+ | Name=Autostart-Script | ||
+ | Comment=Kommentar | ||
+ | Type=Application | ||
+ | Exec=/home/pi/startrdp.sh | ||
+ | Terminal=false | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | in Datei /home/pi/startrdp.sh: | ||
+ | |||
<pre> | <pre> | ||
#!/bin/bash | #!/bin/bash |
Latest revision as of 11:15, 1 November 2019
in /home/pi/config/autostart
[Desktop Entry] Name=Autostart-Script Comment=Kommentar Type=Application Exec=/home/pi/startrdp.sh Terminal=false
in Datei /home/pi/startrdp.sh:
#!/bin/bash # Loop without an end while : do # For details see man of rdesktop rdesktop -f -z -a 24 -x broadband -k de -r sound:local -u "UUSER" -p "PASSWORD" 172.17.112.17 # After disconnect check for xsession lxalive=$(ps -ae|grep lxsession); # Do $lxalive exists? if [ ! -n "$lxalive" ]; then # You have to do init 0 with sudo, because you are logged in as user pi sudo init 0 fi #EndIf done # End Loop