Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When trying to run ente cli from a server it fails on dbus-launch #1328

Open
I-Would-Like-To-Report-A-Bug-Please opened this issue Apr 5, 2024 · 2 comments
Labels
- photos Relates to the Ente Photos --cli Platform is CLI

Comments

@I-Would-Like-To-Report-A-Bug-Please

Description

Tried to run ente cli on my docker server however I can't due to missing dbus-launch.

root@docker:~/docker/ente# ./ente
2024/04/05 10:52:54 error getting password from keyring: exec: "dbus-launch": executable file not found in $PATH

Version

cli-v0.1.13

What product are you using?

No response

What platform are you using?

Server

@vishnukvmd vishnukvmd added - photos Relates to the Ente Photos --cli Platform is CLI and removed triage labels Apr 5, 2024
@AlexandarY
Copy link

Issue appears to be coming from the use of https://github.com/zalando/go-keyring . This module requires the secret service dbus interface. To get it to work on my end (in a Debian Bookworm container), I had to do the following:

  1. Install these packages - apt install gnome-keyring libsecret dbus-x11
  2. Create the default collection. Setting this up without an X11 Server is a bit tricky, but the steps described here do work:
eval "$(dbus-launch --sh-syntax)"

mkdir -p ~/.cache
mkdir -p ~/.local/share/keyrings # where the automatic keyring is created

# 1. Create the keyring manually with a dummy password in stdin
eval "$(printf '\n' | gnome-keyring-daemon --unlock)"

# 2. Start the daemon, using the password to unlock the just-created keyring:
eval "$(printf '\n' | /usr/bin/gnome-keyring-daemon --start)"

Also if you are trying to use the CLI to create an account, make sure that the yaml config file has the hardcoded-ott.emails value set for the user you are trying to use, otherwise you won't be able to use the CLI or even log in.

@I-Would-Like-To-Report-A-Bug-Please

Thanks for the tip, definitely can do it but amount of other X dependencies that I guess many people would like to avoid on the typical headless servers is quite a big list(at least ubuntu server 22):

The following additional packages will be installed:
  adwaita-icon-theme at-spi2-core dconf-gsettings-backend dconf-service fontconfig fontconfig-config fonts-dejavu-core
  gcr gnome-keyring-pkcs11 gsettings-desktop-schemas gtk-update-icon-cache hicolor-icon-theme humanity-icon-theme
  libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data libatspi2.0-0 libavahi-client3 libavahi-common-data libavahi-common3
  libcairo-gobject2 libcairo2 libcolord2 libcups2 libdatrie1 libdconf1 libdeflate0 libepoxy0 libfontconfig1 libgck-1-0
  libgcr-base-3-1 libgcr-ui-3-1 libgdk-pixbuf-2.0-0 libgdk-pixbuf2.0-bin libgdk-pixbuf2.0-common libgraphite2-3
  libgtk-3-0 libgtk-3-bin libgtk-3-common libharfbuzz0b libjbig0 libjpeg-turbo8 libjpeg8 liblcms2-2
  libpam-gnome-keyring libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpixman-1-0 librsvg2-2 librsvg2-common
  libsecret-common libthai-data libthai0 libtiff5 libwayland-client0 libwayland-cursor0 libwayland-egl1 libwebp7
  libxcb-render0 libxcb-shm0 libxcomposite1 libxcursor1 libxdamage1 libxfixes3 libxi6 libxinerama1 libxkbcommon0
  libxrandr2 libxrender1 libxtst6 p11-kit p11-kit-modules pinentry-gnome3 session-migration ubuntu-mono x11-common

I guess it it is and might be hard to change but definitely it's not ideal :/

I'll give it a look bit later though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- photos Relates to the Ente Photos --cli Platform is CLI
Projects
None yet
Development

No branches or pull requests

3 participants