Difference between revisions of "Script remote desktop"
(Created page with "#!/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 #...") |
|||
| (One intermediate revision by the same user not shown) | |||
| 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> | ||
#!/bin/bash | #!/bin/bash | ||
# Loop without an end | # Loop without an end | ||
| Line 14: | Line 29: | ||
done | done | ||
# End Loop | # End Loop | ||
| + | </pre> | ||
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