Im using KDE and the default I think its SDDM and XOrg since I have Nvidia Wayland won’t work as it is now.
I have googled and checked https://wiki.archlinux.org/title/environment_variables to see what files to use to set environment variables for X Applications like Visual Studio Code, Intellij and so on…
The problem is Im using a Yubikey for SSH public key authentication and I have placed my public ssh key in a Git repository to use for checkouts and with a few environment variables I get a prompt (pinentry-program /usr/bin/pinentry-qt) for a pin when I want to check out or login to ssh.
I need environment variables like “SSH_AUTH_SOCK” to be set for this to work.
According to the Arch Wiki I should use ~/.xprofile or ~/.zprofile but this doesnt work!
If I have the needed environment variables in ~/.xprofile and manually edit the startup script for intellij for example and add
source "$HOME/.xprofile"
Then it works pefectly in intellij, but do I really need to do this for each application I need this??
Should I use a different file for these environment settings?
Im using zsh as a shell but the intellij script uses bash as far as I can see (most scripts do I suppose?)…
You need to make sure your environment variables are set appropriately, for the shell you use.
For zsh, use zsh startup/shutdown files (Tip: ~/.zshenv)
Or change shell to bash, which, as you say, it works.
What ssh has to do with X (.xprofile)? You may have misinterpreted. Archwiki talks about your shell startup files. Where did you read about .xprofile ?