-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
owncloud-client and nextcloud-client prompt for password despite that the keyring is unlocked #38266
Comments
It uses |
I installed and tried |
@alexeymuranov IIRC it only prompts you for the password if you have |
Yes, i installed it manually with I tried again after including both |
@alexeymuranov do you have |
I have |
Will that ever work? If I understand it correctly, the option is only respected when the default value of nixpkgs/nixos/modules/security/pam.nix Line 269 in cac9f08
lightdm seems to override it:
Or is there some merge policy I am not aware of? |
Does anyone has update on this? I have the exact same problem, I tried installing |
The Nextcloud and keyrings topic seems related to this. The owncloud-client doesn't seem to have the wrapping around libgnome-keyring, though, so I don't know if anything like this is possible for it. |
I've always had this issue, but it disappeared this month with some update (on NixOS 18.09). Is anyone still facing this issue on the latest 18.09? |
I still have the problem in 18.09. I tried the solution proposed in Nextcloud and keyrings topic, but it didn't work for some reason that is yet unclear to me (i started getting a message "the provided credentials are not correct" on nextcloud-client startup). |
By the way, (I haven't got to properly test the solution with |
Ok, I confirm that using { # ...
environment.systemPackages = [ # ...
pkgs.nextcloud-client
];
nixpkgs.config.packageOverrides = pkgs: {
nextcloud-client = pkgs.nextcloud-client.override {
withGnomeKeyring = true;
libgnome-keyring = pkgs.gnome3.libgnome-keyring;
};
};
} I am not closing the issue yet because I suppose that |
pkgs.nextcloud-client.override {
withGnomeKeyring = true;
} is how packages with As you noticed there is a bug where the package uses --- a/pkgs/applications/networking/nextcloud-client/default.nix
+++ b/pkgs/applications/networking/nextcloud-client/default.nix
@@ -1,5 +1,5 @@
{ stdenv, fetchgit, cmake, pkgconfig, qtbase, qtwebkit, qtkeychain, qttools, sqlite
-, inotify-tools, withGnomeKeyring ? false, makeWrapper, libgnome-keyring }:
+, inotify-tools, withGnomeKeyring ? false, makeWrapper, libgnome-keyring ? null }:
stdenv.mkDerivation rec {
name = "nextcloud-client-${version}";
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -4385,7 +4385,9 @@
nextcloud = callPackage ../servers/nextcloud { };
- nextcloud-client = libsForQt5.callPackage ../applications/networking/nextcloud-client { };
+ nextcloud-client = libsForQt5.callPackage ../applications/networking/nextcloud-client {
+ inherit (gnome3) libgnome-keyring;
+ };
nextcloud-news-updater = callPackage ../servers/nextcloud/news-updater.nix { };
It would be even better to switch to libsecret as I suggested before: --- a/pkgs/applications/networking/nextcloud-client/default.nix
+++ b/pkgs/applications/networking/nextcloud-client/default.nix
@@ -1,5 +1,5 @@
{ stdenv, fetchgit, cmake, pkgconfig, qtbase, qtwebkit, qtkeychain, qttools, sqlite
-, inotify-tools, withGnomeKeyring ? false, makeWrapper, libgnome-keyring }:
+, inotify-tools, makeWrapper, libsecret }:
stdenv.mkDerivation rec {
name = "nextcloud-client-${version}";
@@ -15,11 +15,10 @@
patches = [ ./find-sql.patch ];
patchFlags = "-d client -p1";
- nativeBuildInputs = [ pkgconfig cmake ];
+ nativeBuildInputs = [ pkgconfig cmake makeWrapper ];
buildInputs = [ qtbase qtwebkit qtkeychain qttools sqlite ]
- ++ stdenv.lib.optional stdenv.isLinux inotify-tools
- ++ stdenv.lib.optional withGnomeKeyring makeWrapper;
+ ++ stdenv.lib.optional stdenv.isLinux inotify-tools;
enableParallelBuilding = true;
@@ -39,9 +38,9 @@
postInstall = ''
sed -i 's/\(Icon.*\)=nextcloud/\1=Nextcloud/g' \
$out/share/applications/nextcloud.desktop
- '' + stdenv.lib.optionalString (withGnomeKeyring) ''
+
wrapProgram "$out/bin/nextcloud" \
- --prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [ libgnome-keyring ]}
+ --prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [ libsecret ]}
'';
meta = with stdenv.lib; { feel free to open a PR. |
Nothing really changed in master, it was only refactoring. cc @Ma27 do you want to do the PR? |
@jtojnar thanks a lot for the reference. In fact I'm currently using the Nextcloud client with the GNOME keyring enabled ATM. I'll read through the entire conversation later and report back (or file a patch if needed) :) |
This change makes it easier for users to setup the nextcloud client with GNOME keyring support as discussed in the IRC[1][2]. Additionaly we now use `libsecret` instead of `libgnome-keyring` which integrates better in a GNOME setup (libgnome-keyring defaults to the Gnome2 library)[3]. [1] https://logs.nix.samueldr.com/nixos/2018-11-24#1745871; [2] https://logs.nix.samueldr.com/nixos/2018-11-24#1746033; [3] NixOS#38266
Still doesn't work for me. Here are the relevant parts of my
|
The following worked for me on 18.03:
|
I still experience this issue on 19.03. Nothing suggested here helped, there is no flag 'withGnomeKeyring' anymore. |
Someone needs to backport #60327 to 19.03. |
Closing as the following config should be enough on NixOS unstable: { config, pkgs, ... }:
{
services.gnome3.gnome-keyring.enable = true;
environment.systemPackages = with pkgs; [
nextcloud-client
];
} |
@jtojnar oof, seems as I forgot to backport back then :( I'll give it a try now :) EDIT: |
Backported as 88cb463 |
@caugner I use unstable and do not use nextcloud-client so cannot confirm. Can only confirm that it worked for me on unstable when I tested it. |
@jtojnar Are you using unstable with Gnome? I tried it and Gnome was so unstable that I couldn't even login to any (local user) account anymore. |
Yes, I use it every day without any issues. I suggest opening a separate issue for that. |
This seems to persist for me on 19.03.
Does unfortunately not work. Did you make any progress @caugner ? |
@b-m-f Nope, still doesn't work for me. |
I cannot really test it on anything other than unstable but for what it’s worth, it works here in GNOME. |
I have just submitted pull request #71874 which fixes this issue. Reviews are welcome. |
Issue description
When starting OwnCloud client on NixOS, it prompts for password with the message:
This is on GNOME3, and the keyring is unlocked.
Steps to reproduce
Unlock Gnome Keyring and start OwnCloud client.
Technical details
The text was updated successfully, but these errors were encountered: