secret-tool does not run on headless system

Bug #1420914 reported by Philip Kania
80
This bug affects 15 people
Affects Status Importance Assigned to Milestone
libsecret (Ubuntu)
Confirmed
Wishlist
Unassigned

Bug Description

Description: Ubuntu 14.04 LTS
Release: 14.04

libsecret-tools:
  Installed: 0.16-0ubuntu1
  Candidate: 0.16-0ubuntu1
  Version table:
 *** 0.16-0ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
        100 /var/lib/dpkg/status

I expected to be able to run secret-tool on a headless sytem, but got this message after running it.

secret-tool store ...

(secret-tool:26626): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
secret-tool: Cannot autolaunch D-Bus without X11 $DISPLAY

# didn't expect thisto work, but thought I'd give it a try.
export DISPLAY=:0
secret-tool store ...

(secret-tool:26639): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
secret-tool: Error spawning command line 'dbus-launch --autolaunch=0feb8b37e7d1bdde6782aa3e537cfda6 --binary-syntax --close-stderr': Child process exited with code 1

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Thanks for taking your time to report this issue and help making Ubuntu better.

I got the same error message when attemting to run secret-tool on a headless system. I also tried with a newer version, but the issue is still present in libsecret-tools 0.18-1ubuntu2 on Ubuntu Vivid.

I tested with the following command:
$ secret-tool store --label="example" foo bar

I've taken the liberty of moving this bug report to the libsecret package, since I don't see how it is related to anacron.

affects: anacron (Ubuntu) → libsecret (Ubuntu)
Changed in libsecret (Ubuntu):
status: New → Confirmed
tags: added: trusty utopic vivid
Changed in libsecret (Ubuntu):
importance: Undecided → High
Revision history for this message
Quanah (quanah-zimbra) wrote :

Still a problem in ubuntu14.04.3. Command line tools should not depend on X11.

secret-tool store --label="blahblah/org.freedesktop.NetworkManager.vpnc/vpn" setting-name vpn setting-key "Xauth password"

(secret-tool:6159): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
secret-tool: Cannot autolaunch D-Bus without X11 $DISPLAY

Revision history for this message
Quanah (quanah-zimbra) wrote :

It is trivial to fix this by adding the following to ~/.bashrc:

if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
  eval `dbus-launch --sh-syntax`
fi

Revision history for this message
NetForHack (netforhack) wrote :

Actual for xenial too

tags: added: xenial
removed: utopic vivid
Revision history for this message
flindeberg (flindeberg) wrote :

Still present in 18.04.

Even after starting dbus I cannot get it to run.

$ secret-tool store --label="mylabel" attr1 val1
Password:
** Message: 22:54:42.562: Remote error from secret service: org.freedesktop.DBus.Error.UnknownMethod: No such interface 'org.freedesktop.Secret.Collection' on object at path /org/freedesktop/secrets/collection/login
secret-tool: No such interface 'org.freedesktop.Secret.Collection' on object at path /org/freedesktop/secrets/collection/login

tags: added: bionic
Revision history for this message
Sebastien Bacher (seb128) wrote :

It's a wishlist/feature request and should be sent upstream ideally on https://gitlab.gnome.org/GNOME/libsecret/issues

Changed in libsecret (Ubuntu):
importance: High → Wishlist
Revision history for this message
Tomi Bello (kyle2f) wrote :

Hi I'm still having this issue on my ubuntu terminal

secret-tool: No such interface “org.freedesktop.Secret.Collection” on object at path /org/freedesktop/secrets/collection/login

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.