Setup file for startkde

Simon Hausmann hausmann at kde.org
Sat Feb 21 12:16:08 GMT 2004


On Saturday 21 February 2004 10:22, David Faure wrote:
> On Friday 20 February 2004 14:01, Oswald Buddenhagen wrote:
> > my main argument is consistency with the shutdown dir(s).
>
> Ah, I hadn't noticed the code for the shutdown dirs. OK that makes sense
> then (except that using $KDEDIRS to locate a script that might change
> KDEDIRS is kind of interesting :-)
>
> > of course
> > there needs to be a distinction between source-able and exec-utable
> > programs - i think one can simply do a test -x for that, but needs to
> > document the subtle difference (i.e., _don't_ chmod x the .sh files if
> > they are supposed to set environment variables).
>
> What's wrong with sourcing everything? As I found out while testing,
> this is NOT a place to run any graphical program, since there's no window
> manager yet. It's really only for setting env vars (directly, or from
> *-agent).
>
> Here's an updated proposal, which also includes skipping foo~ and foo.bak
> (OK if I do the same in the shutdown session?)
>
> --- startkde    14 Oct 2003 15:55:21 -0000      1.124
> +++ startkde    21 Feb 2004 09:21:13 -0000
> @@ -33,6 +33,21 @@ unset DYLD_FORCE_FLAT_NAMESPACE
>  kdehome=$HOME/.kde
>  test -n "$KDEHOME" && kdehome=`echo "$KDEHOME"|sed "s,^\~/,$HOME/,"`
>
> +# Source scripts found in $KDEDIRS/setup.
> +# This is where you can define environment variables that will be
> available to +# all KDE programs (for instance KDEDIRS), so this is where
> you can run agents +# like eval `ssh-agent` or eval `gpg-agent --daemon`.
> +# For anything else (that doesn't set env vars, or that needs a window
> manager), +# better use the Autostart folder.

It might be worth adding a comment/reference about/to the shutdown scripts
along with 'ssh-agent -k' , to avoid that people add agents but forget to kill 
them, leaving the processes running with their valuable secrets :)

Simon

> +for prefix in `kde-config --path exe| sed -e 's^bin/^setup/^g;s^:^ ^g'`;
> do +  for file in $prefix/*; do
> +    if echo "$file" | grep -v "~$" | grep -v "\.bak$" >/dev/null
> 2>/dev/null; then +      test -f $file && . $file
> +    fi
> +  done
> +done




More information about the kde-core-devel mailing list