Make the fix for bug 1473632 work on more linux distros.

This commit is contained in:
Tomas Groth 2015-09-04 10:01:07 +01:00
parent fec061782b
commit 1dcbc6837c
1 changed files with 5 additions and 1 deletions

View File

@ -104,7 +104,11 @@ def get_vlc():
if is_linux() and 'nose' not in sys.argv[0] and get_vlc():
import ctypes
try:
x11 = ctypes.cdll.LoadLibrary('libX11.so')
try:
x11 = ctypes.cdll.LoadLibrary('libX11.so.6')
except OSError:
# If libx11.so.6 was not found, fallback to more generic libx11.so
x11 = ctypes.cdll.LoadLibrary('libX11.so')
x11.XInitThreads()
except:
log.exception('Failed to run XInitThreads(), VLC might not work properly!')