linuxserver / docker-obsidian

GNU General Public License v3.0
84 stars 3 forks source link

[BUG] /config/.config/openbox/autostart: 1: /squashfs-root/obsidian: not found #9

Open slnw opened 1 week ago

slnw commented 1 week ago

Is there an existing issue for this?

Current Behavior

services:
  obsidian:
    image: lscr.io/linuxserver/obsidian:v1.6.5-ls14
    container_name: obsidian
    security_opt:
      - seccomp:unconfined #optional
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
#    volumes:
#      - /path/to/config:/config
    ports:
      - 3008:3000
      - 3009:3001
#    devices:
#      - /dev/dri:/dev/dri #optional
    shm_size: "1gb"
    restart: unless-stopped
docker compose up -d 

returns `/config/.config/openbox/autostart: 1: /squashfs-root/obsidian: not found` in docker logs and black screen on localhost:3008

Expected Behavior

No response

Steps To Reproduce

as current behaviour

Environment

- OS: macbook pro
- How docker service was installed: docker compose

CPU architecture

arm64

Docker creation

.

Container logs

2024-06-26 09:36:54 obsidian  | [migrations] started
2024-06-26 09:36:54 obsidian  | [migrations] no migrations found
2024-06-26 09:36:54 obsidian  | ───────────────────────────────────────
2024-06-26 09:36:54 obsidian  | 
2024-06-26 09:36:54 obsidian  |       ██╗     ███████╗██╗ ██████╗
2024-06-26 09:36:54 obsidian  |       ██║     ██╔════╝██║██╔═══██╗
2024-06-26 09:36:54 obsidian  |       ██║     ███████╗██║██║   ██║
2024-06-26 09:36:54 obsidian  |       ██║     ╚════██║██║██║   ██║
2024-06-26 09:36:54 obsidian  |       ███████╗███████║██║╚██████╔╝
2024-06-26 09:36:54 obsidian  |       ╚══════╝╚══════╝╚═╝ ╚═════╝
2024-06-26 09:36:54 obsidian  | 
2024-06-26 09:36:54 obsidian  |    Brought to you by linuxserver.io
2024-06-26 09:36:54 obsidian  | ───────────────────────────────────────
2024-06-26 09:36:54 obsidian  | 
2024-06-26 09:36:54 obsidian  | To support LSIO projects visit:
2024-06-26 09:36:54 obsidian  | https://www.linuxserver.io/donate/
2024-06-26 09:36:54 obsidian  | 
2024-06-26 09:36:54 obsidian  | ───────────────────────────────────────
2024-06-26 09:36:54 obsidian  | GID/UID
2024-06-26 09:36:54 obsidian  | ───────────────────────────────────────
2024-06-26 09:36:54 obsidian  | 
2024-06-26 09:36:54 obsidian  | User UID:    1000
2024-06-26 09:36:54 obsidian  | User GID:    1000
2024-06-26 09:36:54 obsidian  | ───────────────────────────────────────
2024-06-26 09:36:55 obsidian  | [custom-init] No custom files found, skipping...
2024-06-26 09:36:55 obsidian  | _XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.
2024-06-26 09:36:55 obsidian  | 
2024-06-26 09:36:55 obsidian  | Xvnc KasmVNC 1.2.0 - built Jun 22 2024 18:59:16
2024-06-26 09:36:55 obsidian  | Copyright (C) 1999-2018 KasmVNC Team and many others (see README.me)
2024-06-26 09:36:55 obsidian  | See http://kasmweb.com for information on KasmVNC.
2024-06-26 09:36:55 obsidian  | Underlying X server release 12014000, The X.Org Foundation
2024-06-26 09:36:55 obsidian  | 
2024-06-26 09:36:55 obsidian  | [ls.io-init] done.
2024-06-26 09:36:55 obsidian  | Obt-Message: Xinerama extension is not present on the server
2024-06-26 09:36:55 obsidian  | ***** Imlib2 Developer Warning ***** :
2024-06-26 09:36:55 obsidian  |         This program is calling the Imlib call:
2024-06-26 09:36:55 obsidian  | 
2024-06-26 09:36:55 obsidian  |         imlib_free_image();
2024-06-26 09:36:55 obsidian  | 
2024-06-26 09:36:55 obsidian  |         With the parameter:
2024-06-26 09:36:55 obsidian  | 
2024-06-26 09:36:55 obsidian  |         image
2024-06-26 09:36:55 obsidian  | 
2024-06-26 09:36:55 obsidian  |         being NULL. Please fix your program.
2024-06-26 09:36:55 obsidian  | ObRender-Message: Cannot load image "/squashfs-root/usr/share/icons/hicolor/48x48/apps/obsidian.png" from file "/squashfs-root/usr/share/icons/hicolor/48x48/apps/obsidian.png"
2024-06-26 09:36:55 obsidian  | /config/.config/openbox/autostart: 1: /squashfs-root/obsidian: not found
2024-06-26 09:37:43 obsidian  |  2024-06-26 08:37:43,623 [INFO] websocket 0: got client connection from 127.0.0.1
github-actions[bot] commented 1 week ago

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

ghostersk commented 5 days ago

In portainer terminal it was giving error it cannot open the /squashfs-root/obsidian, ofcourse not as there is no folder like that in root of the container. Further checking where the obsidian is on system from the remote terminal which obsidian it is in the /usr/bin/obsidian checking further, there is script to start obsidian, for some reason using the squashfs-root folder, so i just change it to correct location and it works...

nano /config/.config/openbox/autostart
# Comment out the original line and put the good path bellow
#/squashfs-root/obsidian --no-sandbox --disable-dev-shm-usage --disable-gpu --disable-software-rasterizer
/usr/bin/obsidian --no-sandbox --disable-dev-shm-usage --disable-gpu --disable-software-rasterizer

the config folder should be somewhere on your system, as it is maped via docker-compose (in my case)

Edit 1.: This seems to help with auto start of Obsidian, but when you close it and try to open it from the desktop shortcut it gets the error again.

services: obsidian: image: lscr.io/linuxserver/obsidian:latest container_name: obsidian hostname: obsidian networks: backend:

ipv4_address: 172.22.0.254

restart: unless-stopped
#ports:
  #- 3000:3000/tcp #http 3001 https
devices:
  - /dev/dri:/dev/dri #optional Add this for GL support (Linux hosts only)
security_opt:
  - seccomp:unconfined #optional
 # added command instead of entry point as it was causing issue by using /init after some time.
command: /bin/bash -c 'mkdir -p /squashfs-root ; ln -sf /usr/bin/obsidian /squashfs-root/obsidian ;tail -f /dev/null'
environment:
  - TZ=Europe/London
  - PUID=1000
  - PGID=1000
shm_size: 1gb
volumes:
  - /obsidian_remote/vaults:/vaults
  - /obsidian_remote/config:/config
  - /obsidian_remote/obsidian_export:/exports
labels:
  - "traefik.enable=true"
  - "traefik.http.routers.obsidian.rule=Host(`obsidian.example.com`)"                                                                                                                                   
  - "traefik.http.routers.obsidian.entrypoints=https"                                                                                                                                                     
  - "traefik.http.routers.obsidian.tls.certresolver=cloudflare"                                                                                                                                       
  - "traefik.http.routers.obsidian.service=obsidian-serv"
  - "traefik.http.services.obsidian-serv.loadbalancer.server.port=3000"
  - "traefik.http.services.obsidian-serv.loadbalancer.server.scheme=http"
  # Middlewears (HTTPS only)
  - >
    traefik.http.routers.image_name.middlewares=
    my-GeoBlock@file,
    secure-headers@file,
    log4shell-foo@file,
    crowdsec-bouncer@docker,
    authelia@docker,
    gzip@file
Edit 3.:
Hopefully final edit, unless someone sorts this in the default code.
I have edited both files in `/config/.config/openbox/` menu.xml and autostart ( as mentioned earlier Edit 1:).
I have change the squashroot path to use `/usr/bin/obsidian/
and i no longer need to use the `command:` in docker-compose.
Also I have added chromium to desktop shortcut in `menu.xml`:

<?xml version="1.0" encoding="utf-8"?>

/usr/bin/obsidian --no-sandbox --disable-dev-shm-usage --disable-gpu --disable-software-rasterizer /usr/bin/chromium /usr/bin/xterm