if [ -f /usr/bin/Xvesa ] ; then #format of each line: 1024x768x16 #For some Tecra (8000) and Portege laptops, avoid Xvesa hang by substituting an # Xmodes list known to work; also enable 800x600 and 1024x768 by # adding "timing: .. (VESA)" lines for them in the ddcprobe listing. #rerwin if grep -q 'oem: MagicGraph 256 AV 44K PRELIMINARY' /tmp/ddcprobe.txt;then echo -e "640x480x16\n640x480x24\n800x600x16\n800x600x24\n1024x768x16\n1024x768x24" > /tmp/Xmodes.txt echo -e "timing: 800x600@85 Hz (VESA)\ntiming: 800x600@60 Hz (VESA)" >> /tmp/ddcprobe.txt #Append 800x600 resolution grep -q 'timing: 1024' /tmp/ddcprobe.txt && echo -e "timing: 1024x768@85 Hz (VESA)\ntiming: 1024x768@60 Hz (VESA)" >> /tmp/ddcprobe.txt #Append 1024x768 resolution else #End of special treatment of Tecra 8000s. #rerwin Xvesa -listmodes 2>&1 | cut -f 2 -d ' ' | grep --extended-regexp 'x16$|x24$' | sort --field-separator=x --numeric-sort > /tmp/Xmodes.txt fi #rerwin else