I wrote this very simple script at the end of my /etc/profile:
i=3 let key while [ $i -gt 0 ] ; do printf "\rPress 'q' to prevent starting X ($i)" read -rsn 1 -t 1 key # THE PROBLEM IS HERE if [[ $? == 0 ]] ; then break; fi i=$[$i-1] done if [[ $key != "q" ]]; then printf "\nStarting X..." exec startx fi
This script allows me to choose whether to start X or not when I log in. The same script works (without 'exec startx') as expected when I execute it by myself. But during profile script execution it stops on read command waiting for user input without a timeout, and after pressing any key I see the error: "not identifier: -t".