mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Linux install: Have the calibre GUI programs redirect stdout and stderr to null when launched via .desktop files to workaround systems where the GUI launchers are broken. See #1315458 (Calibre can't open AZW3 books if launched from Ubuntu Dash)
This commit is contained in:
parent
482afd9952
commit
8a46cc45bb
@ -854,8 +854,8 @@ def setup_gui_option_parser(parser):
|
||||
help='Detach from the controlling terminal, if any (linux only)')
|
||||
|
||||
def detach_gui():
|
||||
if islinux and not DEBUG and sys.stdout.isatty():
|
||||
# We are a GUI process running in a terminal so detach from the controlling terminal
|
||||
if islinux and not DEBUG:
|
||||
# Detach from the controlling process.
|
||||
if os.fork() != 0:
|
||||
raise SystemExit(0)
|
||||
os.setsid()
|
||||
|
@ -929,7 +929,7 @@ Name=E-book Viewer
|
||||
GenericName=Viewer for E-books
|
||||
Comment=Viewer for E-books in all the major formats
|
||||
TryExec=ebook-viewer
|
||||
Exec=ebook-viewer %f
|
||||
Exec=ebook-viewer --detach %f
|
||||
Icon=calibre-viewer
|
||||
Categories=Graphics;Viewer;
|
||||
'''
|
||||
@ -942,7 +942,7 @@ Name=Edit E-book
|
||||
GenericName=Edit E-books
|
||||
Comment=Edit e-books in various formats
|
||||
TryExec=ebook-edit
|
||||
Exec=ebook-edit %f
|
||||
Exec=ebook-edit --detach %f
|
||||
Icon=calibre-ebook-edit
|
||||
Categories=Office;
|
||||
'''
|
||||
@ -955,7 +955,7 @@ Name=calibre
|
||||
GenericName=E-book library management
|
||||
Comment=E-book library management: Convert, view, share, catalogue all your e-books
|
||||
TryExec=calibre
|
||||
Exec=calibre %F
|
||||
Exec=calibre --detach %F
|
||||
Icon=calibre-gui
|
||||
Categories=Office;
|
||||
'''
|
||||
|
Loading…
x
Reference in New Issue
Block a user