diff --git a/setup/build_environment.py b/setup/build_environment.py index 4c3a9a9438..749fea8a6e 100644 --- a/setup/build_environment.py +++ b/setup/build_environment.py @@ -174,8 +174,8 @@ elif isosx: openssl_inc_dirs = [os.path.join(SSL, 'include')] openssl_lib_dirs = [os.path.join(SSL, 'lib')] else: - QT_DLLS += ['Qt5DBus', 'Qt5XcbQpa'] - # PYQT_MODULES += ('QtDBus',) + QT_DLLS += ['Qt5DBus', 'Qt5XcbQpa', 'Qt5X11Extras'] + PYQT_MODULES += ('QtX11Extras',) ft_inc_dirs = pkgconfig_include_dirs('freetype2', 'FT_INC_DIR', '/usr/include/freetype2') ft_lib_dirs = pkgconfig_lib_dirs('freetype2', 'FT_LIB_DIR', '/usr/lib') diff --git a/src/calibre/gui2/main.py b/src/calibre/gui2/main.py index 0220a74352..a068bfdde8 100644 --- a/src/calibre/gui2/main.py +++ b/src/calibre/gui2/main.py @@ -98,7 +98,15 @@ def init_qt(args): override = 'calibre-gui' if islinux else None app = Application(args, override_program_name=override) app.file_event_hook = EventAccumulator() - app.setWindowIcon(QIcon(I('library.png', allow_user_override=False))) + try: + from PyQt5.Qt import QX11Info + is_x11 = QX11Info.isPlatformX11() + except Exception: + is_x11 = False + # Ancient broken VNC servers cannot handle icons of size greater than 256 + # http://www.mobileread.com/forums/showthread.php?t=278447 + ic = 'lt.png' if is_x11 else 'library.png' + app.setWindowIcon(QIcon(I(ic, allow_user_override=False))) return app, opts, args