From b47a94f3e565021e2b520c618c1c0e683537d91e Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Thu, 14 Nov 2024 23:07:56 +0530 Subject: [PATCH] fish: Set environment for non systemd user services/applications Environment variables in environment.d directory only affects the users systemd unit. For example, while these environment variables are set in tmux which we start via systemd, these are not set when we open terminal outside of tmux. See related, https://github.com/systemd/systemd/issues/7641 --- fish/.config/fish/conf.d/setup.fish | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fish/.config/fish/conf.d/setup.fish b/fish/.config/fish/conf.d/setup.fish index 83d9516..f71087b 100644 --- a/fish/.config/fish/conf.d/setup.fish +++ b/fish/.config/fish/conf.d/setup.fish @@ -57,6 +57,8 @@ function __fish_setup_on_tty_login --description "Set up environment on tty logi # Required for all environment variables to be set correctly, especially # in tmux session service. dbus-update-activation-environment --systemd --all + + export $(/usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator) end # Instead of tty check, we would have liked to do this using status is-login