How to set the KDE path?

Kevin Krammer kevin.krammer at gmx.at
Tue Feb 8 10:35:44 GMT 2011


On Tuesday, 2011-02-08, Dotan Cohen wrote:
> On Mon, Feb 7, 2011 at 19:12, Stephen Dowdy <sdowdy at ucar.edu> wrote:
> > Dotan Cohen wrote, On 02/07/2011 08:48 AM:
> >> On Wed, Feb 2, 2011 at 15:32, Kevin Krammer <kevin.krammer at gmx.at> wrote:
> >>> A combination of paths in $PATH and KDE specific
> >>> "non-interactive-binaries" paths.
> >>> See kde4-config --path exec
> >> 
> >> There is nothing but a blank line there, maybe that is the issue:
> >> ✈ganymede:~$ kde4-config --path exec
> >> 
> >> ✈ganymede:~$
> > 
> > Dotan, i believe it's "--path exe" (not exec)

Indeed, sorry for the typo. Thanks go to Stephen and Duncan for posting the 
correct invocation.


> ✈ganymede:~$ cat .kde/env/path.sh
> #!/bin/bash
> export PATH=$HOME/.bin:$PATH

Maybe try without the first line.

The code which does this inside startkde looks like this:

============
# Source scripts found in <localprefix>/env/*.sh and <prefixes>/env/*.sh
# (where <localprefix> is $KDEHOME or ~/.kde, and <prefixes> is where KDE is 
installed)
#
# 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.

libpath=`kde4-config --path lib | tr : '\n'`

for prefix in `echo "$libpath" | sed -n -e 's,/lib[^/]*/,/env/,p'`; do
  for file in "$prefix"*.sh; do
    test -r "$file" && . "$file"
  done
done
============

So it gets a list of paths by running querying kde4-config for "lib" paths.
It then basically replaces the "lib" word in each path with "env" and the 
reads all .sh files in there.

Cheers,
Kevin
-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde/attachments/20110208/7a349139/attachment.sig>
-------------- next part --------------
___________________________________________________
This message is from the kde mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.


More information about the kde mailing list