@@ -185,28 +185,6 @@ if test -z "$dl"; then
185185 esac
186186fi
187187
188−# Source scripts found in <config locations>/plasma-workspace/env/*.sh
189−# (where <config locations> correspond to the system and user's configuration
190−# directories, as identified by Qt's qtpaths, e.g. $HOME/.config
191−# and /etc/xdg/ on Linux)
192−#
193−# This is where you can define environment variables that will be available to
194−# all KDE programs, so this is where you can run agents using e.g. eval `ssh-agent`
195−# or eval `gpg-agent --daemon`.
196−# Note: if you do that, you should also put "ssh-agent -k" as a shutdown script
197−#
198−# (see end of this file).
199−# For anything else (that doesn't set env vars, or that needs a window manager),
200−# better use the Autostart folder.
201−
202−IFS=":" read -r -a scriptpath <<< $(qtpaths --paths GenericConfigLocation)
203−# Add /env/ to the directory to locate the scripts to be sourced
204−for prefix in "${scriptpath[@]}"; do
205− for file in "$prefix"/plasma-workspace/env/*.sh; do
206− test -r "$file" && . "$file" || true
207− done
208−done
209−
210188echo 'startkde: Starting up...' 1>&2
211189
212190# Make sure that D-Bus is running
@@ -255,6 +233,28 @@ export KDE_SESSION_UID
255233XDG_CURRENT_DESKTOP=KDE
256234export XDG_CURRENT_DESKTOP
257235
236+# Source scripts found in <config locations>/plasma-workspace/env/*.sh
237+# (where <config locations> correspond to the system and user's configuration
238+# directories, as identified by Qt's qtpaths, e.g. $HOME/.config
239+# and /etc/xdg/ on Linux)
240+#
241+# This is where you can define environment variables that will be available to
242+# all KDE programs, so this is where you can run agents using e.g. eval `ssh-agent`
243+# or eval `gpg-agent --daemon`.
244+# Note: if you do that, you should also put "ssh-agent -k" as a shutdown script
245+#
246+# (see end of this file).
247+# For anything else (that doesn't set env vars, or that needs a window manager),
248+# better use the Autostart folder.
249+
250+IFS=":" read -r -a scriptpath <<< $(qtpaths --paths GenericConfigLocation)
251+# Add /env/ to the directory to locate the scripts to be sourced
252+for prefix in "${scriptpath[@]}"; do
253+ for file in "$prefix"/plasma-workspace/env/*.sh; do
254+ test -r "$file" && . "$file" || true
255+ done
256+done
257+
258258# At this point all the environment is ready, let's send it to kwalletd if running
259259if test -n "$PAM_KWALLET_LOGIN" ; then
260260 env | socat STDIN UNIX-CONNECT:$PAM_KWALLET_LOGIN