From 28965f45ae705ecac1264ee9aa1f2a7e60352b35 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 17 Sep 2017 08:51:12 +0530 Subject: [PATCH] Linux: Fix regression that broke using calibre on some VNC servers --- src/calibre/gui2/main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/main.py b/src/calibre/gui2/main.py index 6240c59369..38264661dd 100644 --- a/src/calibre/gui2/main.py +++ b/src/calibre/gui2/main.py @@ -112,9 +112,10 @@ def init_qt(args): app = Application(args, override_program_name=override) app.file_event_hook = EventAccumulator() try: - from PyQt5.Qt import QX11Info - is_x11 = QX11Info.isPlatformX11() + is_x11 = app.platformName() == 'xcb' except Exception: + import traceback + traceback.print_exc() is_x11 = False # Ancient broken VNC servers cannot handle icons of size greater than 256 # https://www.mobileread.com/forums/showthread.php?t=278447