omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

After installing VSCode and login in to GitHub there's a missing OS keyring error

Open acrogenesis opened this issue 1 year ago • 12 comments

The specific error says:

An OS keyring couldn't be identified for storing the encryption related data in your current desktop environment.

It says to troubleshoot using this guide or use a weaker encryption.

acrogenesis avatar Aug 23 '25 19:08 acrogenesis

It seems from code logs that it can't automatically detect the desktop environment

[main 2025-08-23T20:48:06.887Z] [EncryptionMainService] Checking if encryption is available...
[99779:0823/144806.887243:VERBOSE1:components/os_crypt/sync/key_storage_util_linux.cc:46] Password storage detected desktop environment: (unknown)
[99779:0823/144806.887252:VERBOSE1:components/os_crypt/sync/key_storage_linux.cc:116] Selected backend for OSCrypt: BASIC_TEXT
[99779:0823/144806.887267:VERBOSE1:components/os_crypt/sync/key_storage_linux.cc:135] OSCrypt did not initialize a backend.
[main 2025-08-23T20:48:06.887Z] [EncryptionMainService] Encryption is available:  false

acrogenesis avatar Aug 23 '25 20:08 acrogenesis

It seems setting gnome-libsecret fixes it:

  1. Install the Required Packages
sudo pacman -S gnome-keyring libsecret
  1. Configure PAM /etc/pam.d/login

Add the following line at the end of the auth section: auth optional pam_gnome_keyring.so

Add the following line at the end of the session section: session optional pam_gnome_keyring.so auto_start

  1. Configure Hyprland Add the following line at ~/.config/hypr/autostart.conf exec-once = dbus-update-activation-environment --systemd --all

  2. Confirm code login works with code --password-store=gnome-libsecret It should't give any errors when logging to sync.

  3. Make change permanent

Open VS Code (using the command from Step 1 if needed).

Press Ctrl+Shift+P to open the Command Palette.

Type Configure Runtime Arguments and select the option that appears.

This will open a file named argv.json.

Add the following line to the JSON file:

"password-store": "gnome-libsecret"

Save the file and restart VS Code.

acrogenesis avatar Aug 23 '25 20:08 acrogenesis

Same thing happens with element communicator @acrogenesis posted fix which works

med502 avatar Aug 24 '25 11:08 med502

@acrogenesis thanks!!! had this issue for a while with no sucess finding solution

tlxq avatar Aug 29 '25 07:08 tlxq

I have the exact same issue here. This should come by default on new installs.

What I did:

  1. Install packages:
sudo pacman -S gnome-keyring libsecret
  1. add daemon to autostart in .config/hypr/autostart.conf
exec-once = gnome-keyring-daemon --start --components=pkcs11,secrets,ssh
  1. add in vs code to use it, edit ~/.vscode/argv.json
"password-store": "gnome-libsecret"

cristianuibar avatar Sep 23 '25 03:09 cristianuibar

This was solved on https://github.com/basecamp/omarchy/pull/2242. I updated Omarchy to get these changes, however they didn't fix my issue.

My guess is that the issue was fixed when vscode was first installed, but it doesn't fix when updating Omarchy. So reviewing the changes in https://github.com/basecamp/omarchy/pull/2242/commits/f70a7bc5db227e9e5fa561c6382f44009def1f60, I edited my ~/.vscode/argv.json and ~/.cursor/argv.json to add the "password-store": "gnome-libsecret". This solved the issue for me.

My ~/.vscode/argv.json became:

// This configuration file allows you to pass permanent command line arguments to VS Code.
// Only a subset of arguments is currently supported to reduce the likelihood of breaking
// the installation.
//
// PLEASE DO NOT CHANGE WITHOUT UNDERSTANDING THE IMPACT
//
// NOTE: Changing this file requires a restart of VS Code.
{
	// Use software rendering instead of hardware accelerated rendering.
	// This can help in cases where you see rendering issues in VS Code.
	// "disable-hardware-acceleration": true,

	// Allows to disable crash reporting.
	// Should restart the app if the value is changed.
	"enable-crash-reporter": true,

	// Unique id used for correlating crash reports sent from this instance.
	// Do not edit this value.
	"crash-reporter-id": "ecfe614b-e4b3-4d94-8e5f-281cfa59452a",

	// Getting the update from https://github.com/basecamp/omarchy/pull/2242/commits/f70a7bc5db227e9e5fa561c6382f44009def1f60
	"password-store": "gnome-libsecret"
}

The cursor file was pretty much the same.

vitorbaptista avatar Oct 14 '25 14:10 vitorbaptista

I confirm this issue still exists in Omarchy 3.1, yet now you only need the last step to make it work. Just add to your ~/.vscode/argv.json this:

"password-store": "gnome-libsecret"

cristianuibar avatar Oct 24 '25 01:10 cristianuibar

Shouldn't an OS have a keyring agent by default? Not only a problem for VSCode, right?

vschwaberow avatar Oct 25 '25 03:10 vschwaberow

Shouldn't an OS have a keyring agent by default? Not only a problem for VSCode, right?

latest versions do have the keyring installed although it seems adding "password-store": "gnome-libsecret" is not applying correctly. I saw on a recent PR that is already being added on a fresh install

acrogenesis avatar Oct 26 '25 01:10 acrogenesis

Awesome

vschwaberow avatar Oct 26 '25 04:10 vschwaberow

@acrogenesis when you mentioned that this should be handled automatically now, you mean that the omarchy-install-vscode command takes care of this now, right?

a couple thoughts here:

  1. this won't work for similar software (e.g. vscode forks) that don't have a dedicated omarchy install script (e.g. windsurf: I'm using windsurf-next from AUR and get the same error as you posted. my .windsurf-next/argv.json contains "password-store": "basic" out of the box, but manually making that change, removing all other windsurf config and state data from my home dir, and re-launching makes it work), seems clunky if omarchy would need to be adding install scripts for every single similar editor/program out there that needs this.
  2. i thought the whole point of dbus was that it would be generic and not require "pinning down" to specific implementations. maybe that's more of a question for the vscode project, why it doesn't properly auto-discover.

Dieterbe avatar Dec 03 '25 07:12 Dieterbe

I just encountered this issue in Cursor, but VS Code seems to be fine

ChihweiLHBird avatar Aug 31 '26 05:08 ChihweiLHBird