Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] how to configure gnome-keyring on openRC systems
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
JuanCC
n00b
n00b


Joined: 01 Sep 2021
Posts: 6

PostPosted: Mon May 02, 2022 9:29 am    Post subject: [SOLVED] how to configure gnome-keyring on openRC systems Reply with quote

Hello, I just installed vscode but login with github failed with a error about gnome keyrings.
After searching over the Internet, I found that I should create a keyring on my own with seahorse, which unfortunately failed again with a error :
No such secret collection at path :/
And I founded that I should source /etc/X11/xinit/xinitrc.d/50-systemd-user.sh, which isn't present on my openRC computer.

So, does anyone know how to add a keyring properly on a openRC system, or login to vscode correctly?

I'm using vscode 1.66.2 and gnome-keyring 40.0-r1 from the official gentoo overlay,
and DE is elogind, dbus, openRC, and swayWM.
Also, gnome and gnome-keyring use flags are disabled

Thank you.

UPDATE:
The solution is to run
Code:

dbus-update-activation-environment --all

before executing vscode. (put it in your WM init files or run manually)


Last edited by JuanCC on Tue May 03, 2022 2:05 am; edited 2 times in total
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Mon May 02, 2022 4:17 pm    Post subject: Reply with quote

Are you using gnome?
If not or if you dont care about the stupid gnome keyring
Plz run
Code:

grep -r gnome /etc/pam.d

and in each file that contains
pam_gnome_keyring.so
add "optional" or even comment out the line.
If you are not on Gnome and you hate the keyring enough you can
1.USE="-gnome -gnome-keyring" in make.conf followed by a rebuild @world
2.
Code:

emerge -cav gnome-keyring virtual/secret-service libsecret

You might have a complain about
app-crypt/pinentry
but it should be taken care of by the rebuild @world
_________________
:)


Last edited by alamahant on Mon May 02, 2022 4:33 pm; edited 3 times in total
Back to top
View user's profile Send private message
JuanCC
n00b
n00b


Joined: 01 Sep 2021
Posts: 6

PostPosted: Mon May 02, 2022 4:18 pm    Post subject: Reply with quote

This is not a major problem since I only use vscode when I need to collaborate with my classmates,
and despite it shows an error, vscode can still let you login, but you have to login again when restarting the app, which is annoying.

But I still want to fix it, can anyone help? :cry:

Additionally,
The vscode error is: https://imgur.com/Rw0UhWX.png
And seahorse shows this when adding keyrings: https://imgur.com/GiSi7vg.png
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Mon May 02, 2022 4:22 pm    Post subject: Reply with quote

Quote:

But I still want to fix it, can anyone help? :cry:


You mean you wish to retain gnome-keyring functionality and also not have the vscode problem?
If you have libsecret installed try
Code:

$ git config --global credential.helper /usr/libexec/git-core/git-credential-libsecret


from
https://wiki.archlinux.org/title/GNOME/Keyring
_________________
:)
Back to top
View user's profile Send private message
JuanCC
n00b
n00b


Joined: 01 Sep 2021
Posts: 6

PostPosted: Mon May 02, 2022 4:31 pm    Post subject: Reply with quote

alamahant wrote:
Quote:

But I still want to fix it, can anyone help? :cry:


You mean you wish to retain gnome-keyring functionality and also not have the vscode problem?


I think no, I only want to fix the vscode problem (If it is not too hard to solve) , and since I don't use gnome, gnome-keyring can be removed or replaced.

I already have gnome and gnome-keyring useflag disabled before I post and I'm now trying the emerge solution you proposed.
I will let you know when I have completed the step :D


Last edited by JuanCC on Mon May 02, 2022 4:49 pm; edited 1 time in total
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Mon May 02, 2022 4:34 pm    Post subject: Reply with quote

Plz look at the update replies also.
_________________
:)
Back to top
View user's profile Send private message
JuanCC
n00b
n00b


Joined: 01 Sep 2021
Posts: 6

PostPosted: Mon May 02, 2022 4:43 pm    Post subject: Reply with quote

alamahant wrote:
Quote:

But I still want to fix it, can anyone help? :cry:


You mean you wish to retain gnome-keyring functionality and also not have the vscode problem?
If you have libsecret installed try
Code:

$ git config --global credential.helper /usr/libexec/git-core/git-credential-libsecret


from
https://wiki.archlinux.org/title/GNOME/Keyring


I've tried the emerge step, and vscode seems to have a hard dependency on libsecret, so deselecting that doesn't work.
Code:

  app-crypt/libsecret-0.20.5 pulled in by:
    app-crypt/seahorse-41.0-r1 requires app-crypt/libsecret[vala], >=app-crypt/libsecret-0.16
    app-editors/vscode-1.66.2 requires app-crypt/libsecret[crypt]

  gnome-base/gnome-keyring-40.0-r1 pulled in by:
    virtual/secret-service-0 requires gnome-base/gnome-keyring

  virtual/secret-service-0 pulled in by:
    app-crypt/libsecret-0.20.5 requires =virtual/secret-service-0, virtual/secret-service


also, the git config step you've proposed seems like git integration to gnome-keyring, and doesn't affect how vscode uses the keyring,
and in reality after setting git config it doesn't fix the error.

Since I live in GMT+8, it is very late here, and I will come back when it's morning.

and thanks for your time and help!!
Back to top
View user's profile Send private message
JuanCC
n00b
n00b


Joined: 01 Sep 2021
Posts: 6

PostPosted: Tue May 03, 2022 2:02 am    Post subject: Solution Reply with quote

After more research, I found 50-systemd-user.sh here: https://github.com/systemd/systemd/blob/main/xorg/50-systemd-user.sh
which indicates that I should use dbus-update-activation-environment to update dbus's environment
And I figured out running
Code:
dbus-update-activation-environment --all
before executing vscode or putting it in my WM init files can solve the problem.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum