linuxserver / docker-calibre

GNU General Public License v3.0
338 stars 62 forks source link

[BUG] Cannot Open PDFs in KasmVNC #137

Closed uberbrodt closed 8 months ago

uberbrodt commented 10 months ago

Is there an existing issue for this?

Current Behavior

My issue is similar to #136 but my log output is different. Calibre loads fine and I can search by library, but when I go to open a PDF I get the following errors and the window never appears:

ug 10 23:14:58 arrakis.dune.place calibre[431479]: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-abc'
Aug 10 23:14:58 arrakis.dune.place podman-compose[431221]: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-abc'
Aug 10 23:14:58 arrakis.dune.place calibre[431479]: /usr/bin/xdg-open: 882: x-www-browser: not found
Aug 10 23:14:58 arrakis.dune.place podman-compose[431221]: /usr/bin/xdg-open: 882: x-www-browser: not found
Aug 10 23:14:58 arrakis.dune.place calibre[431479]: /usr/bin/xdg-open: 882: firefox: not found
Aug 10 23:14:58 arrakis.dune.place podman-compose[431221]: /usr/bin/xdg-open: 882: firefox: not found
Aug 10 23:14:58 arrakis.dune.place calibre[431479]: /usr/bin/xdg-open: 882: iceweasel: not found
Aug 10 23:14:58 arrakis.dune.place podman-compose[431221]: /usr/bin/xdg-open: 882: iceweasel: not found
Aug 10 23:14:58 arrakis.dune.place calibre[431479]: /usr/bin/xdg-open: 882: seamonkey: not found
Aug 10 23:14:58 arrakis.dune.place podman-compose[431221]: /usr/bin/xdg-open: 882: seamonkey: not found
Aug 10 23:14:58 arrakis.dune.place calibre[431479]: /usr/bin/xdg-open: 882: mozilla: not found
Aug 10 23:14:58 arrakis.dune.place podman-compose[431221]: /usr/bin/xdg-open: 882: mozilla: not found
Aug 10 23:14:58 arrakis.dune.place calibre[431479]: /usr/bin/xdg-open: 882: epiphany: not found
Aug 10 23:14:58 arrakis.dune.place podman-compose[431221]: /usr/bin/xdg-open: 882: epiphany: not found
Aug 10 23:14:58 arrakis.dune.place calibre[431479]: /usr/bin/xdg-open: 882: konqueror: not found
Aug 10 23:14:58 arrakis.dune.place podman-compose[431221]: /usr/bin/xdg-open: 882: konqueror: not found
Aug 10 23:14:58 arrakis.dune.place calibre[431479]: /usr/bin/xdg-open: 882: chromium: not found
Aug 10 23:14:58 arrakis.dune.place podman-compose[431221]: /usr/bin/xdg-open: 882: chromium: not found
Aug 10 23:14:58 arrakis.dune.place calibre[431479]: /usr/bin/xdg-open: 882: chromium-browser: not found
Aug 10 23:14:58 arrakis.dune.place podman-compose[431221]: /usr/bin/xdg-open: 882: chromium-browser: not found
Aug 10 23:14:58 arrakis.dune.place calibre[431479]: /usr/bin/xdg-open: 882: google-chrome: not found
Aug 10 23:14:58 arrakis.dune.place podman-compose[431221]: /usr/bin/xdg-open: 882: google-chrome: not found
Aug 10 23:14:58 arrakis.dune.place calibre[431479]: /usr/bin/xdg-open: 882: www-browser: not found
Aug 10 23:14:58 arrakis.dune.place podman-compose[431221]: /usr/bin/xdg-open: 882: www-browser: not found
Aug 10 23:14:58 arrakis.dune.place calibre[431479]: /usr/bin/xdg-open: 882: links2: not found
Aug 10 23:14:58 arrakis.dune.place podman-compose[431221]: /usr/bin/xdg-open: 882: links2: not found
Aug 10 23:14:58 arrakis.dune.place calibre[431479]: /usr/bin/xdg-open: 882: elinks: not found
Aug 10 23:14:58 arrakis.dune.place podman-compose[431221]: /usr/bin/xdg-open: 882: elinks: not found
Aug 10 23:14:58 arrakis.dune.place calibre[431479]: /usr/bin/xdg-open: 882: links: not found
Aug 10 23:14:58 arrakis.dune.place podman-compose[431221]: /usr/bin/xdg-open: 882: links: not found
Aug 10 23:14:58 arrakis.dune.place calibre[431479]: /usr/bin/xdg-open: 882: lynx: not found
Aug 10 23:14:58 arrakis.dune.place podman-compose[431221]: /usr/bin/xdg-open: 882: lynx: not found
Aug 10 23:14:58 arrakis.dune.place calibre[431479]: /usr/bin/xdg-open: 882: w3m: not found
Aug 10 23:14:58 arrakis.dune.place calibre[431479]: xdg-open: no method available for opening 'file:///config/library/Yi%20Li,%20Qiaomin%20Xie,%20Gabriel%20Kilot,%20Alan%20Geller%20James%20R.%20Larus,%20Albert%20Greenberg/Join-Idle-Queue_%20A%20Novel%20Load%20Balancing%20Algorithm%20for%20Dynamically%20Scalable%20Web%20Services%20(49>
Aug 10 23:14:58 arrakis.dune.place podman-compose[431221]: /usr/bin/xdg-open: 882: w3m: not found
Aug 10 23:14:58 arrakis.dune.place podman-compose[431221]: xdg-open: no method available for opening 'file:///config/library/Yi%20Li,%20Qiaomin%20Xie,%20Gabriel%20Kilot,%20Alan%20Geller%20James%20R.%20Larus,%20Albert%20Greenberg/Join-Idle-Queue_%20A%20Novel%20Load%20Balancing%20Algorithm%20for%20Dynamically%20Scalable%20Web%20Service

Expected Behavior

When I open an .epub or .mobi book, the builtin Calibre viewer looks fine. Seems like there's no PDF reader installed by default, as I was able to make it work by installing evince. I feel like this project should install a PDF reader or at least provide a way for the user to pick a PDF reader to install via env var.

Steps To Reproduce

  1. sudo systemctl start calibre-server
  2. navigate to port 8090
  3. open calibre pick /config/library as library
  4. try opening a PDF

Environment

- OS:Fedora 37
- How docker service was installed: 
sudo dnf install podman

CPU architecture

x86-64

Docker creation

I'm running this with root via podman in a systemd service

-> % cat /etc/systemd/system/calibre-server.service
[Unit]
Description=Calibre server

[Service]
Restart=always
# Shutdown container (if running) when unit is started
ExecStartPre=podman-compose -f /srv/calibre/docker-compose.yml down
# Start container when unit is started
ExecStart=podman-compose -f /srv/calibre/docker-compose.yml up
# Stop container when unit is stopped
ExecStop=podman-compose -f /srv/calibre/docker-compose.yml down

[Install]
WantedBy=default.target
-> % cat /srv/calibre/docker-compose.yml 
# vim: ft=yaml

---
version: "3"
services:
  calibre:
    image: lscr.io/linuxserver/calibre:latest
    container_name: calibre
    security_opt:
      - seccomp:unconfined #optional
    environment:
      - PUID=2001
      - PGID=2001
      - TZ=Etc/UTC
      # - PASSWORD= #optional
      - CLI_ARGS=${$CLI_ARGS=-"--with-library=/config/library"}
    volumes:
      - /var/lib/calibre/config:/config:z
      - /srv/fs/books:/config/library:z
    ports:
      - 8090:8080
      - 8091:8181
      - 8092:8081
    restart: unless-stopped

### Container logs

```bash
Aug 10 23:12:09 arrakis.dune.place systemd[1]: Started calibre-server.service - Calibre server.
Aug 10 23:12:10 arrakis.dune.place podman-compose[431149]: podman-compose version: 1.0.6
Aug 10 23:12:10 arrakis.dune.place podman-compose[431149]: ['podman', '--version', '']
Aug 10 23:12:10 arrakis.dune.place podman-compose[431149]: using podman version: 4.6.0
Aug 10 23:12:10 arrakis.dune.place podman-compose[431149]: ** excluding:  set()
Aug 10 23:12:10 arrakis.dune.place podman-compose[431149]: ['podman', 'ps', '--filter', 'label=io.podman.compose.project=calibre', '-a', '--format', '{{ index .Labels "io.podman.compose.config-hash"}}']
Aug 10 23:12:10 arrakis.dune.place podman-compose[431149]: ['podman', 'network', 'exists', 'calibre_default']
Aug 10 23:12:10 arrakis.dune.place podman-compose[431149]: podman create --name=calibre --security-opt seccomp=unconfined --label io.podman.compose.config-hash=7a4af22f102c7bc0c22d78a57e0b2466bf7190c3495cc5036f43f4fdc792ba3f --label io.podman.compose.project=calibre --label io.podman.compose.version=1.0.6 --label PODMAN_SYSTEMD_UNIT=>
Aug 10 23:12:10 arrakis.dune.place podman[431202]: 2023-08-10 23:12:10.391277725 -0500 CDT m=+0.121227749 container create dddb7f6f0035c841b2bdee99509b9db978b50b23ec94d075e5354c329f28775e (image=lscr.io/linuxserver/calibre:latest, name=calibre, org.opencontainers.image.created=2023-08-09T06:34:27+00:00, org.opencontainers.image.versi>
Aug 10 23:12:10 arrakis.dune.place podman-compose[431202]: dddb7f6f0035c841b2bdee99509b9db978b50b23ec94d075e5354c329f28775e
Aug 10 23:12:10 arrakis.dune.place podman[431202]: 2023-08-10 23:12:10.312257488 -0500 CDT m=+0.042207546 image pull 49e81f1d3c00427303698fd3d7c10671aa1284b5056ca90910db7e43113120bb lscr.io/linuxserver/calibre:latest
Aug 10 23:12:10 arrakis.dune.place podman-compose[431149]: exit code: 0
Aug 10 23:12:11 arrakis.dune.place podman-compose[431149]: podman start -a calibre
Aug 10 23:12:11 arrakis.dune.place podman[431221]: 2023-08-10 23:12:11.718433608 -0500 CDT m=+0.311549317 container init dddb7f6f0035c841b2bdee99509b9db978b50b23ec94d075e5354c329f28775e (image=lscr.io/linuxserver/calibre:latest, name=calibre, org.opencontainers.image.created=2023-08-09T06:34:27+00:00, org.opencontainers.image.license>
Aug 10 23:12:11 arrakis.dune.place podman[431221]: 2023-08-10 23:12:11.726447341 -0500 CDT m=+0.319562979 container start dddb7f6f0035c841b2bdee99509b9db978b50b23ec94d075e5354c329f28775e (image=lscr.io/linuxserver/calibre:latest, name=calibre, org.opencontainers.image.created=2023-08-09T06:34:27+00:00, io.podman.compose.version=1.0.6>
Aug 10 23:12:11 arrakis.dune.place podman[431221]: 2023-08-10 23:12:11.726655841 -0500 CDT m=+0.319771517 container attach dddb7f6f0035c841b2bdee99509b9db978b50b23ec94d075e5354c329f28775e (image=lscr.io/linuxserver/calibre:latest, name=calibre, PODMAN_SYSTEMD_UNIT=podman-compose@calibre.service, org.opencontainers.image.revision=71c7>
Aug 10 23:12:11 arrakis.dune.place calibre[431479]: [migrations] started
Aug 10 23:12:11 arrakis.dune.place calibre[431479]: [migrations] no migrations found
Aug 10 23:12:12 arrakis.dune.place calibre[431479]: ───────────────────────────────────────
Aug 10 23:12:12 arrakis.dune.place calibre[431479]: 
Aug 10 23:12:12 arrakis.dune.place calibre[431479]:       ██╗     ███████╗██╗ ██████╗ 
Aug 10 23:12:12 arrakis.dune.place calibre[431479]:       ██║     ██╔════╝██║██╔═══██╗
Aug 10 23:12:12 arrakis.dune.place calibre[431479]:       ██║     ███████╗██║██║   ██║
Aug 10 23:12:12 arrakis.dune.place calibre[431479]:       ██║     ╚════██║██║██║   ██║
Aug 10 23:12:12 arrakis.dune.place calibre[431479]:       ███████╗███████║██║╚██████╔╝
Aug 10 23:12:12 arrakis.dune.place calibre[431479]:       ╚══════╝╚══════╝╚═╝ ╚═════╝ 
Aug 10 23:12:12 arrakis.dune.place calibre[431479]: 
Aug 10 23:12:12 arrakis.dune.place calibre[431479]:    Brought to you by linuxserver.io
Aug 10 23:12:12 arrakis.dune.place calibre[431479]: ───────────────────────────────────────
Aug 10 23:12:12 arrakis.dune.place calibre[431479]: 
Aug 10 23:12:12 arrakis.dune.place calibre[431479]: To support LSIO projects visit:
Aug 10 23:12:12 arrakis.dune.place calibre[431479]: https://www.linuxserver.io/donate/
Aug 10 23:12:12 arrakis.dune.place calibre[431479]: 
Aug 10 23:12:12 arrakis.dune.place calibre[431479]: ───────────────────────────────────────
Aug 10 23:12:12 arrakis.dune.place calibre[431479]: GID/UID
Aug 10 23:12:12 arrakis.dune.place calibre[431479]: ───────────────────────────────────────
Aug 10 23:12:12 arrakis.dune.place calibre[431479]: 
Aug 10 23:12:12 arrakis.dune.place calibre[431479]: User UID:    2001
Aug 10 23:12:12 arrakis.dune.place calibre[431479]: User GID:    2001
Aug 10 23:12:12 arrakis.dune.place calibre[431479]: ───────────────────────────────────────
Aug 10 23:12:12 arrakis.dune.place calibre[431479]: 
Aug 10 23:12:12 arrakis.dune.place calibre[431479]: [custom-init] No custom files found, skipping...
Aug 10 23:12:12 arrakis.dune.place calibre[431479]: _XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.
Aug 10 23:12:12 arrakis.dune.place podman-compose[431221]: _XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.
Aug 10 23:12:12 arrakis.dune.place podman-compose[431221]: Xvnc KasmVNC 1.1.0 - built Aug  5 2023 18:53:05
Aug 10 23:12:12 arrakis.dune.place podman-compose[431221]: Copyright (C) 1999-2018 KasmVNC Team and many others (see README.me)
Aug 10 23:12:12 arrakis.dune.place podman-compose[431221]: See http://kasmweb.com for information on KasmVNC.
Aug 10 23:12:12 arrakis.dune.place podman-compose[431221]: Underlying X server release 12014000, The X.Org Foundation
Aug 10 23:12:12 arrakis.dune.place calibre[431479]: 
Aug 10 23:12:12 arrakis.dune.place calibre[431479]: Xvnc KasmVNC 1.1.0 - built Aug  5 2023 18:53:05
Aug 10 23:12:12 arrakis.dune.place calibre[431479]: Copyright (C) 1999-2018 KasmVNC Team and many others (see README.me)
Aug 10 23:12:12 arrakis.dune.place calibre[431479]: See http://kasmweb.com for information on KasmVNC.
Aug 10 23:12:12 arrakis.dune.place calibre[431479]: Underlying X server release 12014000, The X.Org Foundation
Aug 10 23:12:12 arrakis.dune.place calibre[431479]: 
Aug 10 23:12:12 arrakis.dune.place calibre[431479]: [ls.io-init] done.
Aug 10 23:12:12 arrakis.dune.place calibre[431479]: Obt-Message: Xinerama extension is not present on the server
Aug 10 23:12:12 arrakis.dune.place calibre[431479]: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-abc'
Aug 10 23:12:12 arrakis.dune.place podman-compose[431221]: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-abc'
Aug 10 23:12:25 arrakis.dune.place calibre[431479]:  2023-08-11 04:12:25,614 [INFO] websocket 0: got client connection from 127.0.0.1
Aug 10 23:12:25 arrakis.dune.place podman-compose[431221]:  2023-08-11 04:12:25,614 [INFO] websocket 0: got client connection from 127.0.0.1
Aug 10 23:12:25 arrakis.dune.place calibre[431479]:  2023-08-11 04:12:25,640 [PRIO] Connections: accepted: @192.168.30.63_1691727145.615363::websocket
Aug 10 23:14:58 arrakis.dune.place calibre[431479]: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-abc'
Aug 10 23:14:58 arrakis.dune.place podman-compose[431221]: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-abc'
Aug 10 23:14:58 arrakis.dune.place calibre[431479]: /usr/bin/xdg-open: 882: x-www-browser: not found
Aug 10 23:14:58 arrakis.dune.place podman-compose[431221]: /usr/bin/xdg-open: 882: x-www-browser: not found
github-actions[bot] commented 10 months ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

amitkr commented 9 months ago

I added xchm & xpdf to be able to view pdf & chm - you can use this branch. https://github.com/linuxserver/docker-calibre/compare/master...amitkr:docker-calibre:feature/xpdf_and_xchm

Not sure if its worth adding this to upstream.

aptalca commented 9 months ago

You can use this to install any repo package https://github.com/linuxserver/docker-mods/tree/universal-package-install

LinuxServer-CI commented 8 months ago

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 7 months ago

This issue is locked due to inactivity