mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
On linux, don't use Qt to render covers, etc. if the DISPLAY environment variable is unset
This commit is contained in:
parent
c6f13474c6
commit
41df24137a
@ -487,6 +487,8 @@ class Application(QApplication):
|
||||
|
||||
def is_ok_to_use_qt():
|
||||
global gui_thread
|
||||
if islinux and os.environ.get('DISPLAY', None) is None:
|
||||
return False
|
||||
if QApplication.instance() is None:
|
||||
QApplication([])
|
||||
if gui_thread is None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user