[Linux] Use $XDG_RUNTIME_DIR instead of $HOME/.1password?

Options
owendaprile
owendaprile
Community Member
edited May 2022 in SSH

I like to try (although not very successfully) to keep my home directory clean of unnecessary dotfiles. While this is a very cool feature, I think it makes more sense to keep the socket in $XDG_RUNTIME_DIR. This seems to be what the directory is made for, and would prevent another folder under the home directory.

From the XDG Base Directory Specifications:

$XDG_RUNTIME_DIR defines the base directory relative to which user-specific non-essential runtime files and other file objects (such as sockets, named pipes, ...) should be stored. The directory MUST be owned by the user, and he MUST be the only one having read and write access to it. Its Unix access mode MUST be 0700.


1Password Version: 8.6.0~26.BETA
Extension Version: 2.3.0
OS Version: Fedora Linux 35 (Workstation Edition)

Comments

  • owendaprile
    owendaprile
    Community Member
    Options

    Quick follow up, I just tried it myself (by symlinking $HOME/.1password/agent.sock -> $XDG_RUNTIME_DIR/1password-ssh-agent.sock and updating my SSH config file to

    Host *
        IdentityAgent ${XDG_RUNTIME_DIR}/1password-ssh-agent.sock
    

    and it still works fine. The 1Password app actually already has a socket in there (1Password-BrowserSupport.sock), so it doesn't seem like a stretch to add another.

  • XIII
    XIII
    Community Member
    Options

    I’d like this too, but on macOS.

This discussion has been closed.