Re: [kde] How to learn about all those configuration file values?

2013-04-08 Thread Kevin Krammer
On Sunday, 2013-04-07, Stephen Dowdy wrote:
> Kevin Krammer wrote, On 04/07/2013 03:34 AM:
> > A lot of application config are nowadays described by a meta config file,
> > file extension being .kfcg
> 
> --^
> 
> > They are used to describe all possible values, their types and defaults
> > and are used to generate config access code instead of manually writing
> > it (manually written config access code is prone to typos in setting
> > names).
> 
> --^^
> 
> Kevin,
> 
> Heh, Irony Oops! You typo'd the file extension (.kfcg) should be
> .kcfg (that sequence of letters is always a tough one)

Haha, indeed :)

> $ kde4-config --path kcfg
> /home/sdowdy/.kde/share/config.kcfg/:/usr/share/kde4/config.kcfg/
> 
> While i'd just sort of discovered these in looking in more depth in
> trying to determine where these might be found, i never even noticed
> that there was a 'kcfg' path, and hadn't looked in detail...

Ah, I hadn't thought about that either.

> > But as a side affect the also provide a kind of documentation of the
> > application's configuration capabilities.
> 
> Yep, cool.. (where's 'kxmleditor' when you need it? anybody know of
> a good replacement XML visualization tool? )

I usually just open in Kate and switch highlighting manually to XML.
Could be interesting to create a Kate highlighting file specifically for kcfg 
though :)

> So, i presume these files are simply compile-time reference material
> when placed in that directory, and are not runtime referenced by the
> application. (i.e. it's going to be up to the "distro" maintainer to
> ensure they get put there so the average user can reference them, to
> see what key values may have been default-overridden at compile-time
> in the packaging.)

Right.
They are only required a compile-time but my guess is they are installed for 
documentation purposes, like what we are discussing here.

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


signature.asc
Description: This is a digitally signed message 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.

Re: [kde] How to learn about all those configuration file values?

2013-04-08 Thread Stephen Dowdy
Kevin Krammer wrote, On 04/07/2013 03:34 AM:

> A lot of application config are nowadays described by a meta config file, 
> file extension being .kfcg

--^

> They are used to describe all possible values, their types and defaults and 
> are used to generate config access code instead of manually writing it 
> (manually written config access code is prone to typos in setting names).

--^^

Kevin,

Heh, Irony Oops! You typo'd the file extension (.kfcg) should be
.kcfg (that sequence of letters is always a tough one)

$ kde4-config --path kcfg
/home/sdowdy/.kde/share/config.kcfg/:/usr/share/kde4/config.kcfg/

While i'd just sort of discovered these in looking in more depth in
trying to determine where these might be found, i never even noticed
that there was a 'kcfg' path, and hadn't looked in detail...

> But as a side affect the also provide a kind of documentation of the 
> application's configuration capabilities.

Yep, cool.. (where's 'kxmleditor' when you need it? anybody know of
a good replacement XML visualization tool? )

So, i presume these files are simply compile-time reference material
when placed in that directory, and are not runtime referenced by the
application. (i.e. it's going to be up to the "distro" maintainer to
ensure they get put there so the average user can reference them, to
see what key values may have been default-overridden at compile-time
in the packaging.)

I see:  http://techbase.kde.org/Development/Tutorials/Using_KConfig_XT
as the reference.

> kwrited is a system facility integration plugin. It provides the necessary 
> interfaces for Unix local system instant messaging tools like talk or write.
> 
> Those are not in common use anymore, especially not on single user systems, 
> and thus not loading that plugin by default makes a low hanging fruit for 
> saving some resources.

Yeah, i used 'talk/write' a lot back in the mid 1980's, but haven't
used it except a couple times in the past decade.

--stephen
___
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.


Re: [kde] How to learn about all those configuration file values?

2013-04-07 Thread Kevin Krammer
Hi,

first thanks to Duncan and Stephen for covering a lot of territory already :)

On Wednesday, 2013-04-03, adrelanos wrote:

> understand (not just guess) what these settings actually do. So I am
> asking form a distro packager perspective, must use the text
> configuration files and can not just copy the whole ~/.kde folder.

I assume you meant copying the whole .kde/share/config folder.
While this is of course not viable, also because that can contain user 
specific settings such as account details, it is often nevertheless a good 
starting point.

The configuration framework used by KDE applications is build on the idea of 
search lists, similar to the $PATH search list for executables.
An application's configuration file will be searched in all configured 
directories and their values merged before the application code reads them.
http://techbase.kde.org/KDE_System_Administration/KDE_Filesystem_Hierarchy

This allows one to experiement with settings in a normal user session and then 
replicate the necessary changes on a more global level. In your case that 
could be the shipped config files, in the case of a system administrator it 
could be a level in between.

Normally this is used as a multi level default value system, i.e. global 
config providing default values for setting, more local configs adjusting 
them, user local config potentially providing the final value.

> At the bottom is a list of settings I can hardly make head of tail of. I
> am not asking to tell me what each any any values do, I am just asking
> about the best approach to learn all those things.

A lot of application config are nowadays described by a meta config file, file 
extension being .kfcg
They are used to describe all possible values, their types and defaults and 
are used to generate config access code instead of manually writing it 
(manually written config access code is prone to typos in setting names).

But as a side affect the also provide a kind of documentation of the 
application's configuration capabilities.

> I also tried entering the search term "kwrited" into quickgit.kde.org,
> but to no avail. Also seaching for "site:quickgit.kde.org kwrited",
> didn't help. I assumed to phrase a configuration file which contains
> "[Module-kwrited]" you must somewhere use the word "kwrited" in the
> sources and at least by reading the source I should get an idea what it
> does, but I also don't find references for it in "kwrited", so I am
> really lost on how to find reliable information.

As Stephen already explained, kded is a session daemon that loads plugins 
which turn provide services to applications or integration points between KDE 
libraries and system facilities.
It is most commonly used when the functionality in question is not very 
complex and thus doesn't make it viable to have a dedicated daemon for it.

kwrited is a system facility integration plugin. It provides the necessary 
interfaces for Unix local system instant messaging tools like talk or write.

Those are not in common use anymore, especially not on single user systems, 
and thus not loading that plugin by default makes a low hanging fruit for 
saving some resources.

JFYI: kwrited lives in the kde-workspace module and, as far as I can tell, 
doen not have any configurable option itself.

Cheers,
Kevin

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


signature.asc
Description: This is a digitally signed message 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.

Re: [kde] How to learn about all those configuration file values?

2013-04-06 Thread Stephen Dowdy

Adrelanos,

adrelanos wrote, On 04/02/2013 04:10 PM:
> There is an Ubuntu Package kde-settings-lowfat. The creator of that
...
> At the bottom is a list of settings I can hardly make head of tail of. I
> am not asking to tell me what each any any values do, I am just asking
> about the best approach to learn all those things.
...
> didn't help. I assumed to phrase a configuration file which contains
> "[Module-kwrited]" you must somewhere use the word "kwrited" in the
> sources and at least by reading the source I should get an idea what it
> does, but I also don't find references for it in "kwrited", so I am
> really lost on how to find reliable information.

I think we all are.  Unfortunately, useful documentation seems to
get sparser and sparser in the brave new world we live in.

> Please tell me how I can find best information about these settings.
> 
> Cheers,
> adrelanos

I'm going to spew some stuff that is probably 90+% true, and may not
necessarily be the best way to determine this stuff, but hopefully
is at least useful.

> /kde/share/config/kdedrc
>
> [Module-bluedevil]
> autoload=false
...

kded  is the "KDE Daemon",

http://api.kde.org/4.0-api/kdelibs-apidocs/kded/html/index.html

each of these "Module-*" group identifiers represent a service
adjunct daemon that 'kded' is responsible for starting.  In the
cases you reference, the 'autoload' key is being set to "false",
indicating that 'kded' won't start those auxiliary processes.
(presumably to reduce startup times, memory consumption, additional
opportunities for bugs to bork your session...)

You can get *some* idea of what the currently loaded kded modules
do by this dbus call loop:

# figure out where the KDE4 system services directory *probably* is
d=$(kde4-config --path services); d=${d##*:};
** i reference value of '${d}' in other examples below...
# get each loadedModule from 'kded'
for module in $(qdbus org.kde.kded /kded loadedModules)
#look in the associate service .desktop for a comment
do printf "%32s - %s\n" "$module" "$(grep '^Comment=' 
${d}/kded/${module}.desktop | sed -e 's/^Comment=//')"
done

e.g.:
   networkstatus - Tracks status of network interfaces and 
provides notification to applications using the network.
 remotedirnotify - Provides change notification for network 
folders
   soliduiserver - Provides a user interface for hardware events
  powerdevil - Battery, Display and CPU power management 
and notification
   


or get them all with:

for dt in ${d}/kded/*.desktop; do \
printf "%32s - %s\n" "$(basename "${dt}" .desktop)" \
"$(sed -ne '/^Comment=/{s/^Comment=//;p}' "${dt}")"; done

or, 'man kded4' seems to have much of this as well.

As for the 'krunnerrc' [Plugins] group, same sort of deal:

> /kde/share/config/krunnerrc
> 
> [Plugins]
> PowerDevilEnabled=false
> bookmarksEnabled=false
...
> windowsEnabled=false

services files with "X-KDE-ServiceTypes=Plasma/Runner" are the
plugins listed above.

The configuration key: "X-KDE-PluginInfo-EnabledByDefault" defines if that 
plugin
is enabled or not.

$ for dt in $(grep -l X-KDE-ServiceTypes=Plasma/Runner $d/*.desktop); do 
t=$(basename ${dt} .desktop); printf "%32s - %s\n" "${t}" "$(sed -ne 
'/^Comment=/{s/^Comment=//;p}' $dt)"; done
  browserhistory - Searches in Konqueror's history
 CharacterRunner - Creates special characters from their 
hexadecimal codes
katesessions - Matches Kate Sessions
   konquerorsessions - Matches Konqueror Sessions
...
   plasma-runner-windowedwidgets - Find Plasma widgets that can be run as 
standalone windows
   plasma-runner-windows - List windows and desktops and switch them
 recentdocuments -


In general, google searching for
"KConfig  "
"kcfgfile  "
might get you something useful.


Another thing i often have to do is :
$ rsync -axWS ~/.kde/  /var/tmp/${USER}-kde/
run a kcmshell4 / system-settings UI and toggle or change something,
then:

$ kompare ~/.kde/ /var/tmp/${USER}-kde/
(or diff -hwbr  ~/.kde/ /var/tmp/${USER}-kde/ )

to figure out what KConfig key values changed in the process.
unfortunately, the converse (change a value and dig through UI
screens is MUCH more work ;}

btw, you can generally put SYSTEM LEVEL overrides in /etc/kde4/...

$ cat /etc/kde4/nepomukserverrc
[Basic Settings]
Start Nepomuk=false

overrides the Start setting for nepomuk.

Good luck.
--stephen
___
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.


Re: [kde] How to learn about all those configuration file values?

2013-04-04 Thread adrelanos
Thanks Duncan! This helped a lot!

Cheers,
adrelanos
___
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.


Re: [kde] How to learn about all those configuration file values?

2013-04-04 Thread adrelanos
Myriam Schweingruber:
> Hi there,
> 
> On Wed, Apr 3, 2013 at 12:10 AM, adrelanos  wrote:
>> Hi!
>>
>> There is an Ubuntu Package kde-settings-lowfat. The creator of that
>> package must have somehow learned how to configure and/or deactivate
>> certain things to his liking in a clean way, i.e. not "just copy your
>> whole ~/.kde folder". I plan on activating most changes from
>> kde-settings-lowfat for my own distribution, but before doing so, I must
>> understand (not just guess) what these settings actually do. So I am
>> asking form a distro packager perspective, must use the text
>> configuration files and can not just copy the whole ~/.kde folder.
> ...
> 
>> Please tell me how I can find best information about these settings.
> 
> How about actually asking those who made that configuration file? You
> can ask the Kubuntu developers in kubuntu-de...@lists.ubuntu.com

Yes, I could have done that.

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


Re: [kde] How to learn about all those configuration file values?

2013-04-03 Thread Myriam Schweingruber
Hi there,

On Wed, Apr 3, 2013 at 12:10 AM, adrelanos  wrote:
> Hi!
>
> There is an Ubuntu Package kde-settings-lowfat. The creator of that
> package must have somehow learned how to configure and/or deactivate
> certain things to his liking in a clean way, i.e. not "just copy your
> whole ~/.kde folder". I plan on activating most changes from
> kde-settings-lowfat for my own distribution, but before doing so, I must
> understand (not just guess) what these settings actually do. So I am
> asking form a distro packager perspective, must use the text
> configuration files and can not just copy the whole ~/.kde folder.
...

> Please tell me how I can find best information about these settings.

How about actually asking those who made that configuration file? You
can ask the Kubuntu developers in kubuntu-de...@lists.ubuntu.com


Regards, Myriam

-- 
Proud member of the Amarok and KDE Community
Protect your freedom and join the Fellowship of FSFE:
http://www.fsfe.org
Please don't send me proprietary file formats,
use ISO standard ODF instead (ISO/IEC 26300)
___
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.


Re: [kde] How to learn about all those configuration file values?

2013-04-03 Thread Duncan
adrelanos posted on Tue, 02 Apr 2013 22:10:50 + as excerpted:

> Hi!
> 
> There is an Ubuntu Package kde-settings-lowfat. The creator of that
> package must have somehow learned how to configure and/or deactivate
> certain things to his liking in a clean way, i.e. not "just copy your
> whole ~/.kde folder". I plan on activating most changes from
> kde-settings-lowfat for my own distribution, but before doing so, I must
> understand (not just guess) what these settings actually do. So I am
> asking form a distro packager perspective, must use the text
> configuration files and can not just copy the whole ~/.kde folder.
> 
> At the bottom is a list of settings I can hardly make head of tail of. I
> am not asking to tell me what each any any values do, I am just asking
> about the best approach to learn all those things.

That's an interesting question.  As an advanced kde user, I know most of 
these, but I can't exactly say how/where I picked up that knowledge.  I 
believe for the most part, however, that I've actually simply integrated 
a factoid here and another there, combining that with the experience of 
having run kde since the kde2 era, and done enough bisect-style 
troubleshooting along the way so that I have a good idea where settings 
are, and what they do, and can quickly back that up with a change-and-
test if I'm in doubt. =:^)

But you'll definitely want to pay attention to a couple sources, the kde 
sysadmin's guide at techbase.kde.org, and, assuming your distro (Ubuntu, 
it would seem) splits kde packages up and describes them well enough for 
that to be useful, the package descriptions along with the files they 
contain.  I know gentoo's pretty good with this, and of course there, the 
USE flags for each package along with their descriptions are of help.  
Also useful are the list of dependencies, which can give a hint of actual 
functionality.

Meanwhile, you mention search engines, but didn't specifically mention 
wikipedia.  It can be quite helpful as well.  Take your example below, 
dnssdwatcher.  A quick wikipedia search on dnssd (wp:dnssd, entered in 
krunner, if the appropriate web shortcut is enabled, as I believe it is 
by default...) doesn't yield a direct hit, but returns some very useful 
search results.

FWIW, dns-sd is a zeroconf-related technology, DNS service discovery (DNS 
of course meaning the same thing it does in IP networking, domain name 
system).

An educated guess, then, is that combining the wikipedia results with the 
results of a few package management and package file queries will confirm 
that dnssd-watcher is a kde daemon that "watches" for dns-sd events on 
the network, keeping the kde core informed of what network-based services 
are available, and where (on what machines).

So from wikipedia you can get a good idea what zeroconf and dns-sd are 
all about.  Now let's mine our package management database for useful 
data.  (The below example is of course gentoo-based since that's what I'm 
on, but presumably you have similar queries you can run against your 
package manager and package database. $>> indicates my command prompt, 
thus distinguishing input from output.)

$>>esearch dnssd (general info about the package, whether it's installed, 
its homepage, sources size, description, etc, listing the relevant hit, 
of two)

*  kde-base/kdnssd
  Latest version available: 4.10.1
  Latest version installed: 4.10.1
  Size of downloaded files: 8,839 kB
  Homepage:http://www.kde.org/
  Description: A DNSSD (DNS Service Discovery - part of Rendezvous) 
ioslave and kded module
  License: GPL-2

$>>equery files kdnssd (files the package contains... if installed of 
course)

 * Contents of kde-base/kdnssd-4.10.1:
/usr
/usr/lib64
/usr/lib64/kde4
/usr/lib64/kde4/kded_dnssdwatcher.so
/usr/lib64/kde4/kio_zeroconf.so
/usr/share
/usr/share/apps
/usr/share/apps/remoteview
/usr/share/apps/remoteview/zeroconf.desktop
/usr/share/dbus-1
/usr/share/dbus-1/interfaces
/usr/share/dbus-1/interfaces/org.kde.kdnssd.xml
/usr/share/kde4
/usr/share/kde4/services
/usr/share/kde4/services/kded
/usr/share/kde4/services/kded/dnssdwatcher.desktop
/usr/share/kde4/services/zeroconf.protocol

$equery depends kdnssd (what else tha's installed depends on the package)

 * These packages depend on kdnssd:
kde-base/kcontrol-4.10.1 (>=kde-base/kdnssd-4.10.1:4[aqua=])

$equery uses kdnssd (what USE flags, aka build-time-options, the package 
exposes)

[ Legend : U - final flag setting for installation]
[: I - package is installed with flag ]
[ Colors : set, unset ]
 * Found these USE flags for kde-base/kdnssd-4.10.1:
 U I
 - - debug: Enable extra debug codepaths, like asserts and extra 
output. If you want to
get meaningful backtraces see
http://www.gentoo.org/proj/en/qa/backtraces.xml
 - - zeroconf : Support for DNS Service Discovery (DNS-SD)

$>>

(I did an equery depgraph as well, what kdnssd 

[kde] How to learn about all those configuration file values?

2013-04-02 Thread adrelanos
Hi!

There is an Ubuntu Package kde-settings-lowfat. The creator of that
package must have somehow learned how to configure and/or deactivate
certain things to his liking in a clean way, i.e. not "just copy your
whole ~/.kde folder". I plan on activating most changes from
kde-settings-lowfat for my own distribution, but before doing so, I must
understand (not just guess) what these settings actually do. So I am
asking form a distro packager perspective, must use the text
configuration files and can not just copy the whole ~/.kde folder.

At the bottom is a list of settings I can hardly make head of tail of. I
am not asking to tell me what each any any values do, I am just asking
about the best approach to learn all those things.

I can't understand each change in the kde-settings-lowfat package by
putting them into a search engine one by one. For example when searching
for "Module-dnssdwatcher", I find some bug discussions and can vaguely
guess what it's about, but there is no real technical reference what
this module does. Also searching for "site:kde.org dnssdwatcher" only
brings unrelated bug reports and forum posts.

My approach with search engines, reading random vaguely related bug and
other discussions on random pages is really ineffective and
non-authoritative.

I also tried entering the search term "kwrited" into quickgit.kde.org,
but to no avail. Also seaching for "site:quickgit.kde.org kwrited",
didn't help. I assumed to phrase a configuration file which contains
"[Module-kwrited]" you must somewhere use the word "kwrited" in the
sources and at least by reading the source I should get an idea what it
does, but I also don't find references for it in "kwrited", so I am
really lost on how to find reliable information.

Please tell me how I can find best information about these settings.

Cheers,
adrelanos

/kde/share/config/kdedrc

[Module-bluedevil]
autoload=false

[Module-device_automounter]
autoload=false

[Module-dnssdwatcher]
autoload=false

[Module-freespacenotifier]
autoload=false

[Module-kwrited]
autoload=false

[Module-nepomuksearchmodule]
autoload=false

[Module-networkmanagement]
autoload=false

[Module-obexftpdaemon]
autoload=false

[Module-randrmonitor]
autoload=false

[Module-remotedirnotify]
autoload=false

/kde/share/config/krunnerrc

[Plugins]
PowerDevilEnabled=false
bookmarksEnabled=false
calculatorEnabled=false
desktopsessionsEnabled=false
installerEnabled=false
killEnabled=false
locationsEnabled=false
nepomuksearchEnabled=false
org.kde.windowedwidgetsEnabled=false
placesEnabled=false
plasma-desktopEnabled=false
recentdocumentsEnabled=false
servicesEnabled=true
shellEnabled=true
solidEnabled=false
webshortcutsEnabled=false
windowsEnabled=false
___
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.