check if X is available

Related to rhbz#920206

Signed-off-by: Jakub Filak <jfilak@redhat.com>