Difference between revisions of "Script remote desktop"

From
Jump to: navigation, search
(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 #...")
 
Line 1: Line 1:
 +
<pre>
 
#!/bin/bash
 
#!/bin/bash
 
# Loop without an end
 
# Loop without an end
Line 14: Line 15:
 
done
 
done
 
# End Loop
 
# End Loop
 +
</pre>

Revision as of 10:32, 1 November 2019

#!/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