diff --git a/profile b/profile index 13bf0c4..8982f23 100644 --- a/profile +++ b/profile @@ -33,14 +33,16 @@ if [ -d /etc/profile.d ]; then unset i fi -export DISPLAY=:1 -eval "while true;do - /usr/bin/startlxde-pi +if [ -z $DISPLAY ];then + export DISPLAY=:1 + eval "while true;do + /usr/bin/startlxde-pi + sleep 10 + done" & + sleep 10 -done" & - -sleep 10 -eval "pcmanfm --desktop --profile LXDE-pi; sleep 20; pcmanfm --desktop --profile LXDE-pi" & -lxpanelctl restart -sleep 10 -lxpanelctl restart + eval "pcmanfm --desktop --profile LXDE-pi; sleep 20; pcmanfm --desktop --profile LXDE-pi" & + lxpanelctl restart + sleep 10 + lxpanelctl restart +fi