Earnestly / sx

Start an xorg server
MIT License
234 stars 16 forks source link

gnome-keyring's ssh agent doesn't work #6

Closed tleydxdy closed 5 years ago

tleydxdy commented 5 years ago

Starting i3 with config for gnome-keyring according to ArchWiki

dbus-update-activation-environment --systemd DISPLAY
eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)
export SSH_AUTH_SOCK

startx works fine, but not sx. Using sx still shows:

sign_and_send_pubkey: signing failed: agent refused operation
Earnestly commented 5 years ago

Can you elaborate on what exactly you've done? The wiki article discusses .xinitrc which sx doesn't use.

Besides that, it's not immediately obvious why there should be any differences.

tleydxdy commented 5 years ago

that's what I thought. I was adding those config in .config/sx/sxrc, after it didn't work, I copied it to .xinitrc and tried startx and things worked fine. tbh the only reason I could think of is that DISPLAY is 1 instead of 0.

Earnestly commented 5 years ago

Trying to reason about this and why you might get a permission error is leading me to think of the authority file. Since sx doesn't use the de facto location of HOME/.Xauthority try including XAUTHORITY along with DISPLAY in your dbus-update-activation-environment command, e.g.:

dbus-update-activation-environment --systemd DISPLAY XAUTHORITY

I'll try to understand this issue in the mean time if that doesn't work.

tleydxdy commented 5 years ago

that actually worked, thanks!

Earnestly commented 5 years ago

Oh nice, thanks for the follow up. This also means I don't have to do anything \o/.

I'll update the wiki article as well to mention the need for potential need for XAUTHORITY.