diff options
author | Thomas Tuegel <ttuegel@gmail.com> | 2016-08-26 08:40:30 -0500 |
---|---|---|
committer | Thomas Tuegel <ttuegel@gmail.com> | 2016-08-26 08:42:28 -0500 |
commit | 3616b52e20c218e3110790639e135b3a80046d47 (patch) | |
tree | bdb70a43b865e89baa4afbf5848df058efd3d4bc /pkgs/desktops | |
parent | a0aa333aa97de14f1f0320111faebfe473293706 (diff) | |
download | nixlib-3616b52e20c218e3110790639e135b3a80046d47.tar nixlib-3616b52e20c218e3110790639e135b3a80046d47.tar.gz nixlib-3616b52e20c218e3110790639e135b3a80046d47.tar.bz2 nixlib-3616b52e20c218e3110790639e135b3a80046d47.tar.lz nixlib-3616b52e20c218e3110790639e135b3a80046d47.tar.xz nixlib-3616b52e20c218e3110790639e135b3a80046d47.tar.zst nixlib-3616b52e20c218e3110790639e135b3a80046d47.zip |
kde5.startkde: initialize session variables before loading user env
The desktop session variables need to be initialized before loading the user environment scripts so that these scripts can exec programs that rely on the session variables. For example, these variables must be set when gpg-agent is started or pinentry-qt will not respect the user's theme settings.
Diffstat (limited to 'pkgs/desktops')
-rwxr-xr-x | pkgs/desktops/kde-5/plasma/startkde/startkde.sh | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/pkgs/desktops/kde-5/plasma/startkde/startkde.sh b/pkgs/desktops/kde-5/plasma/startkde/startkde.sh index a39b388cbb7b..256f9949e834 100755 --- a/pkgs/desktops/kde-5/plasma/startkde/startkde.sh +++ b/pkgs/desktops/kde-5/plasma/startkde/startkde.sh @@ -185,28 +185,6 @@ if test -z "$dl"; then esac fi -# Source scripts found in <config locations>/plasma-workspace/env/*.sh -# (where <config locations> correspond to the system and user's configuration -# directories, as identified by Qt's qtpaths, e.g. $HOME/.config -# and /etc/xdg/ on Linux) -# -# This is where you can define environment variables that will be available to -# all KDE programs, so this is where you can run agents using e.g. eval `ssh-agent` -# or eval `gpg-agent --daemon`. -# Note: if you do that, you should also put "ssh-agent -k" as a shutdown script -# -# (see end of this file). -# For anything else (that doesn't set env vars, or that needs a window manager), -# better use the Autostart folder. - -IFS=":" read -r -a scriptpath <<< $(qtpaths --paths GenericConfigLocation) -# Add /env/ to the directory to locate the scripts to be sourced -for prefix in "${scriptpath[@]}"; do - for file in "$prefix"/plasma-workspace/env/*.sh; do - test -r "$file" && . "$file" || true - done -done - echo 'startkde: Starting up...' 1>&2 # Make sure that D-Bus is running @@ -255,6 +233,28 @@ export KDE_SESSION_UID XDG_CURRENT_DESKTOP=KDE export XDG_CURRENT_DESKTOP +# Source scripts found in <config locations>/plasma-workspace/env/*.sh +# (where <config locations> correspond to the system and user's configuration +# directories, as identified by Qt's qtpaths, e.g. $HOME/.config +# and /etc/xdg/ on Linux) +# +# This is where you can define environment variables that will be available to +# all KDE programs, so this is where you can run agents using e.g. eval `ssh-agent` +# or eval `gpg-agent --daemon`. +# Note: if you do that, you should also put "ssh-agent -k" as a shutdown script +# +# (see end of this file). +# For anything else (that doesn't set env vars, or that needs a window manager), +# better use the Autostart folder. + +IFS=":" read -r -a scriptpath <<< $(qtpaths --paths GenericConfigLocation) +# Add /env/ to the directory to locate the scripts to be sourced +for prefix in "${scriptpath[@]}"; do + for file in "$prefix"/plasma-workspace/env/*.sh; do + test -r "$file" && . "$file" || true + done +done + # At this point all the environment is ready, let's send it to kwalletd if running if test -n "$PAM_KWALLET_LOGIN" ; then env | socat STDIN UNIX-CONNECT:$PAM_KWALLET_LOGIN |