mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-02-27 13:23:44 +01: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
2 changed files with 5 additions and 5 deletions
|
|
@ -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 @@ def opts_and_exts(name, op, exts, cover_opts=('--cover',), opf_opts=(),
|
|||
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 @@ def opts_and_exts(name, op, exts, cover_opts=('--cover',), opf_opts=(),
|
|||
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 @@ def opts_and_exts(name, op, exts, cover_opts=('--cover',), opf_opts=(),
|
|||
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…
Reference in a new issue