Setup file for startkde

David Faure faure at kde.org
Sat Feb 21 11:05:26 GMT 2004


On Saturday 21 February 2004 11:57, Martin Koller wrote:
> On Saturday 21 February 2004 10:22, David Faure wrote:
> > +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
> 
> Isn't the way /etc/profile.d does it a kind of "standard" - meaning that the 
> scripts should have <name>.sh ?
> I think this would also be more correct because you do not execute the script 
> but source it (". $file"), and ".sh" tells the user, this has to be in sh 
> syntax.

Hmm, I guess that's a good reason.
OTOH it means any file named differently in that dir will be simply ignored,
which is a source of possible trouble...

> Other comment: Isn't the opposite of shutdown -> startup (instead of setup) ?

I think startup gets confusing - we already have the user's Autostart directory
and the KDE-global $KDEDIRS/share/autostart....
I wanted to call it setup because it's ONLY for setting up some env. vars, not 
for starting programs in general (other than agents).

-- 
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