[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: How does the program know which directories to look into?
From:       Kevin Krammer <kevin.krammer () gmx ! at>
Date:       2007-08-25 21:45:19
Message-ID: 200708252345.23905.kevin.krammer () gmx ! at
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Saturday 25 August 2007, Kelly wrote:
> On Saturday, August 25, 2007 8:35:46 am Kevin Krammer wrote:
> > They either use KStandardDirs or a class that does this internally, e.g.
> > KConfig
>
> Yeah, I ended up at KStandardDirs after following the trail.  But what I
> couldn't figure out is how KStandardDirs itself knows what directories are
> the right ones.

Environment variables, their defaults and relative paths, where the defaults 
usually depend on paths specified at build time.

The main environment variable for this is KDEDIRS. Quite like PATH it is a 
list of (colon separated) directories, where the order indicates the 
respective priority.

Then, depending on the resource, there is an associated relative 
path/subdirectory, e.g.

share/apps/
KDE application data

config/
KDE configs

lib/kde3  (lib/kde4)
KDE plugins (as a resource called modules)

basically KDEHOME (default $HOME/.kde/) is also such a base directory, the one 
with highest priority.

kde-config (kde4-config) is a nice command line tool which one can use to 
determine such paths for example for using in scripts (the KDE start script 
startkde uses this as well, at least it does in KDE3)

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring

["signature.asc" (application/pgp-signature)]

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic