It might be better to make this check more generic:
`if [ -f '/etc/X11/Xwrapper.config' ]; then`

or just