+++
title = "Getting the Nextcloud client to save login info on arch linux (or any barebones linux distro)"
date = 2021-12-12T14:59:31-05:00
draft = false
+++
:caution-caption: pass:[☠]
:important-caption: pass:[❗]
:note-caption: pass:[✏️]
:tip-caption: pass:[💡]
:warning-caption: pass:[⚠]
:toc:
:toclevels: 6
During the 5 or so years ive had nextcloud, ive always been quite happy with the webclient, but the device clients... need some work.
I recently figured out how to resolve one of my biggest pain points on the linux desktop client, and am recording it here, mostly so I dont forget next time I setup a new computer,
and to save others with the same problem from endless forum post and github issue crawling.
== The cause
Nextcloud expects the environment it is running in to have a 'keychain manager' installed and acessible by libsecret.
However, curretnly, the archlinx nextcloud package does not list libsecret nor any keychain manager as a dependency.
This does not cause a problem if you are using a desktop environment, as they will come with one in their own depenency cloud, but if you are just using a window manager, you may very well not have one installed.
(as a side note, this also seems to cause a significant delay in the client starting up, probably some sort of timeout waiting to acess the keyring
== The solution
The solution is... suprisingly simple. You just need to install the `+gnome-keyring+` and `+libsecret+` packages, and set them up to autostart. In order to autostart them properly, adding these 2 lines to your `+.xinitrc+` is enough.
{{}}
#get gnome-keyring running
dbus-update-activation-environment --all
gnome-keyring-daemon --start --components=secrets
{{}}
(yes, you do need `+dbus-update-activiation-environment+`, as `+gnome-keyring+` seemingly relies on certian environment variables to start properly.)