Setup file for startkde

David Faure faure at kde.org
Fri Feb 20 09:55:49 GMT 2004


Here's a proposal for a one-liner addition to startkde, which would allow people
to set environment variables to be used by KDE, but also to run programs that set
environment variables, like ssh-agent and gpg-agent.

I thought of ~/.kde/setup: under ~/.kde in order to avoid cluttering the home dir,
but right under there so that it's easy to find/edit. Of course we won't ship 
such a file by default, but e.g. the instructions for setting up ssh-agent and gpg-agent
for KDE would tell people to edit ~/.kde/setup.

Up to now I was using a file in the Autostart folder, storing the env vars into
~/.ssh-server, and sourcing that file from .zshrc, but this doesn't make the
env var available to programs started by kde (kicker/minicli/...), so it's not
enough for gpg-agent, hence the need for something in startkde.


--- startkde    14 Oct 2003 15:55:21 -0000      1.124
+++ startkde    20 Feb 2004 09:50:50 -0000
@@ -33,6 +33,13 @@ unset DYLD_FORCE_FLAT_NAMESPACE
 kdehome=$HOME/.kde
 test -n "$KDEHOME" && kdehome=`echo "$KDEHOME"|sed "s,^\~/,$HOME/,"`

+# Source a setup file where users can define environment variables that will
+# be available to all KDE programs (for instance KDEDIRS). This is also the
+# place to run agents like ssh-agent and gpg-agent, for the same reason.
+# For anything else (that doesn't set env vars), better use the Autostart folder.
+
+test -f $kdehome/setup && source $kdehome/setup
+
 # Activate the kde font directories.
 #
 # There are 4 directories that may be used for supplying fonts for KDE.


-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list