https://community.kde.org/api.php?action=feedcontributions&user=Skierpage&feedformat=atomKDE Community Wiki - User contributions [en]2024-03-29T04:36:41ZUser contributionsMediaWiki 1.40.2https://community.kde.org/index.php?title=Baloo&diff=100304Baloo2024-03-09T04:03:08Z<p>Skierpage: /* Indexing limitations */ fix bug #, mention iconv</p>
<hr />
<div>[[File:Mascot konqi-support-search.png|thumbnail|right|Help [[Konqi]] find what he wants!]]<br />
Baloo is the file indexing and file search framework for KDE Plasma, with a focus on providing a very small memory footprint along with with extremely fast searching.<br />
<br />
== User documentation ==<br />
<br />
[https://github.com/KDE/baloo/blob/master/docs/user/searching.md User documentation] for search types and document properties that Baloo indexes<br />
<br />
== Ways to communicate ==<br />
:Mailing List: kde-devel@kde.org ([https://mail.kde.org/mailman/listinfo/kde-devel info page])<br />
:IRC Channel: [https://web.libera.chat/ #kde-devel on Libera Chat]<br />
:Phabricator project: https://phabricator.kde.org/project/view/261<br />
<br />
== Top bugs and feature requests ==<br />
'''Bugs:''' https://bugs.kde.org/buglist.cgi?bug_severity=critical&bug_severity=grave&bug_severity=major&bug_severity=crash&bug_severity=normal&bug_severity=minor&bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=ASSIGNED&bug_status=REOPENED&list_id=1629910&priority=VHI&priority=HI&product=frameworks-baloo&query_format=advanced<br />
<br/><br/><br />
'''Feature requests:''' https://bugs.kde.org/buglist.cgi?bug_severity=wishlist&bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=ASSIGNED&bug_status=REOPENED&list_id=1629911&priority=VHI&priority=HI&product=frameworks-baloo&query_format=advanced<br />
<br />
== Indexing limitations ==<br />
Baloo uses the file metadata extractors in [https://invent.kde.org/frameworks/kfilemetadata KFileMetadata] to get information about each file it indexes.<br />
This means for a file's content to be indexed<br />
* the file must have a recognizable MIME type<br />
* KDE must have an extractor for that MIME type. Use the command-line utility <code>kmimetypefinder5</code> to determine a file's mime type.<br />
** Due to a [https://gitlab.gnome.org/GNOME/glib/-/issues/2511#note_1293471 glib bug], the MIME type of HTML files can change from <code>text/html</code> to <code>application/x-extension-html</code>. The KDE file metadata extractors don't recognize the latter. That bug has a workaround to reset the MIME types to the usual values.<br />
* KFileMetadata uses the aging utilities <code>catdoc</code>, <code>xls2csv</code>, <code>catppt</code> to index content of files using the Microsoft Office Word, Excel, and PowerPoint file formats ([https://invent.kde.org/frameworks/kfilemetadata/-/blob/master/src/extractors/officeextractor.cpp#L20 source]), and these utilities have undocumented limitations ([https://bugs.kde.org/show_bug.cgi?id=438455 bug 438455]).<br />
** [http://www.wagner.pp.ru/~vitus/software/catdoc/ catdoc home page]<br />
** [https://bugs.debian.org/cgi-bin/pkgreport.cgi?repeatmerged=no&src=catdoc Debian's bug list for catdoc]; [https://bugzilla.redhat.com/buglist.cgi?quicksearch=catdoc RedHat's bug list for catdoc]<br />
* KFileMetadata does not index file names or file contents in ZIP archives.<br />
* KFileMetadata does not index the contents of Open Document Format files that are ZIP archives, nor does it index "flat" Open Document Format files that are complex XML files.<br />
<br />
Other limitations:<br />
* Baloo doesn't index text files (those whose MIME type is detected as "text/''something''") over 10 MB ([https://invent.kde.org/frameworks/baloo/-/blob/master/src/file/extractor/app.cpp#L143 source]).<br />
* The KFileMetadata extractor for text attempts to convert text to Unicode. If the file uses another encoding, such as iso-8859-1, any file contents after the first character that is invalid in Unicode will not be indexed ([https://bugs.kde.org/show_bug.cgi?id=440537 bug 440537]). You may find the <code>-i</code> option to the <code>file</code> command-line utility useful; it tries to infer the character set of a file, e.g. <kbd>file -i ''path/to/myfile.txt''</kbd>. You can use the <code>iconv</code> command-line utility to report invalid encodings and convert encodings to UTF-8.<br />
* If a file's modification time is January 1 1970 ("zero" in the Unix epoch) or earlier, baloo will reindex it each time it starts (or you run <kbd>balooctl check</kbd>) ([https://bugs.kde.org/show_bug.cgi?id=456108 bug 456108]), and <code>balooshow</code> will be confused about the file's "Mtime" if it is before January 1 1970. As a workaround you can change th e modification time to something after 1970, e.g. <kbd>touch -m --date=2022-01-01 path/to/myfile</kbd>.<br />
* [https://discuss.kde.org/t/how-do-i-troubleshoot-baloo/2830/12 Some users] report that baloo doesn't properly index some files extracted from zip or JAR files. A workaround is to clear them from baloo's index then reindex them. with <kbd>balooctl clear ''/path/to/file''</code> then <kbd>balooctl index ''/path/to/file''</kbd> .<br />
<br />
== Other Baloo pages here ==<br />
Information may be obsolete.<br />
{{Special:PrefixIndex/{{FULLPAGENAME}}/}}<br />
<br />
== Using Baloo ==<br />
<br />
Baloo is not an application, but a daemon to index files. Applications can use the Baloo framework to provide file search results. For example, [[Dolphin]]'s Content search can use Baloo.<br />
<br />
KDE System Settings > File Search provides an [http://vhanda.in/blog/2014/04/desktop-search-configuration/ intentionally limited number of settings]. You can make additional adjustments in [[Baloo/Configuration | Baloo's configuration file]].<br />
<br />
== balooctl ==<br />
<br />
<code>balooctl</code> is a CLI command to perform certain operations on Baloo. Enter <code>balooctl --help</code> in a terminal app such as [[userbase:Konsole]] to list its available subcommands.<br />
<br />
See also [[Baloo/Debugging]].</div>Skierpagehttps://community.kde.org/index.php?title=Windows&diff=100244Windows2024-02-29T22:49:53Z<p>Skierpage: /* Windows binaries */ Note these aren't package for use, per bcooksley</p>
<hr />
<div>"''KDE libraries and applications are available to you, no matter if you are a commercial developer, manager or free software hacker. You are invited to not only just use the toolkit - you can contribute your own solutions and improvements to the KDE community.''"[[Image:Konqi-win.png|frame|right|Konqi, the KDE mascot now also supporting Windows]]<br />
<br />
The KDE on Windows Initiative is an ongoing project to port the KDE applications to Windows. <br />
<br />
== Application installers ==<br />
<br />
=== Installers from application websites ===<br />
<br />
* [https://www.digikam.org/download/binary#Windows digiKam]<br />
* [https://kate-editor.org/get-it/ Kate & KWrite]<br />
* [https://www.kdevelop.org/download KDevelop]<br />
* [https://community.kde.org/Kexi/Releases KEXI]<br />
* [https://kile.sourceforge.io/download.php Kile]<br />
* [https://kmymoney.org/ KMymoney]<br />
* [https://krita.org/en/download/krita-desktop/ Krita]<br />
* [https://marble.kde.org/install.php? Marble Virtual Globe]<br />
* [http://download.kde.org/stable/umbrello/latest/ Umbrello UML Modeller]<br />
* [https://rkward.kde.org/RKWard_on_Windows.html RKWard]<br />
<br />
=== App Stores / Package Managers ===<br />
<br />
* [https://apps.microsoft.com/search/publisher?name=KDE+e.V KDE Software in the Microsoft Store] <br />
* [ms-windows-store://publisher/?name=KDE+e.V. Microsoft Store app link] <br />
<br />
* [https://chocolatey.org/profiles/KDE KDE Software at Chocolatey]<br />
* WinGet, [https://winget.run/pkg/KDE package list via wingetdotrun]<br />
<br />
== News ==<br />
<br />
* Hannah von Reth: https://mastodon.social/@The2Ring<br />
<br />
== Getting in touch ==<br />
<br />
* Matrix: [https://go.kde.org/matrix/#/#kde-windows:kde.org #kde-windows] on kde.org <br />
* IRC: [irc://irc.libera.chat/kde-windows #kde-windows] on Libera Chat<br />
<br />
* Mailing list: [mailto:kde-windows@kde.org kde-windows@kde.org] ([https://mail.kde.org/mailman/listinfo/kde-windows subscribe], [http://lists.kde.org/?l=kde-windows&r=1&w=2 archives])<br />
<br />
==Development==<br />
*[[Guidelines_and_HOWTOs/Build_from_source/Windows|Build KDE on Windows]] using [[Craft]]<br />
*[[/Debugging|Debugging on Windows]]<br />
*[[/Development Workflow|Development Workflow]]<br />
*[[/Tools|Tools]] (required or useful)<br />
*Source code in the KDE git: [https://invent.kde.org/packaging/craft-blueprints-kde Craft]<br />
*[[/How to Help|How to Help / Join]]<br />
*[[Guidelines_and_HOWTOs/MicrosoftStore|Publishing KDE apps in the Microsoft Store]]<br />
<br />
=== Windows binaries ===<br />
[https://community.kde.org/Infrastructure/Continuous_Integration_System#Special_cases_and_job_artifacts KDE Continuous Integration] produces Windows binaries of several KDE app as "build artifacts"; these are collected in the Windows Qt 5.15 project, under [sidebar] > Deploy > Package registry, at https://invent.kde.org/teams/ci-artifacts/windows-qt5.15/-/packages . There are both "release" builds, and "main" or "master" builds that are built from latest code and are less stable. Note these are not packaged for use outside the CI system.<br />
<br />
__NOTOC__</div>Skierpagehttps://community.kde.org/index.php?title=Infrastructure/Continuous_Integration_System&diff=100227Infrastructure/Continuous Integration System2024-02-29T03:17:44Z<p>Skierpage: /* Job artifacts */ mention Windows binaries in Windows Qt 5.15 project</p>
<hr />
<div>Continuous Integration (CI) is a process that allows developers to ensure their code is properly tested, follows quality standards and compiles correctly, while Continuous Delivery (CD) is a process that allows to automate the generation of binaries or packages for end users.<br />
<br />
KDE ensures the quality of its code with the help of [https://docs.gitlab.com/ee/ci/ Gitlab CI/CD]. The Gitlab CI/CD system consists mostly of compiling software projects inside ''CI images'', usually [https://docs.docker.com/get-started/overview/ Docker containers] or virtual machines that have their environment prepared for building and testing.<br />
<br />
== Runners and Jobs ==<br />
<br />
We call a ''job'' when software is run inside of a CI image, and in standard Gitlab CI/CD we describe jobs using a [https://docs.gitlab.com/ee/ci/yaml/ .gitlab-ci.yml] file. Jobs can be configured to run only under certain circumstances by using [https://docs.gitlab.com/ee/ci/jobs/job_control.html rules], so that they can run when making a Merge Request, once a given amount of time has passed, if a certain file exists in the repository, or whenever new code is merged into the main branch.<br />
<br />
Additionally, KDE has some additional tooling used to describe the dependency information required by a project, and includes certain options to modify jobs for building KDE projects. These modifications are described in a <code>.kde-ci.yml</code> file, and an example configuration showing all available options can be found in [https://invent.kde.org/sysadmin/ci-utilities/-/blob/master/config-template.yml sysadmin/ci-utilities/config-template.yml]. A custom [https://invent.kde.org/nicolasfella/dependency-generator dependency-generator] is run on these files to update dependency information stored in [https://invent.kde.org/sysadmin/repo-metadata/-/tree/master/dependencies sysadmin/repo-metadata/dependencies], which is then used for [[Get_Involved/development/Set_up_a_development_environment|kdesrc-build]] to determine the order in which to build projects, among other things.<br />
<br />
A ''runner'' on the other hand is a process that runs jobs. It does not run those jobs in Gitlab itself; it requires additional software to be running in addition to Gitlab. By default, this software is [https://docs.gitlab.com/runner/ Gitlab Runner] which as mentioned before uses a <code>.gitlab-ci.yml</code> file written in [https://en.wikipedia.org/wiki/YAML YAML]. While it is possible to [https://docs.gitlab.com/ee/integration/ integrate] other runner software like [https://www.drone.io/ Drone CI] or [https://www.jenkins.io/ Jenkins], these are not used or supported under KDE infrastructure.<br />
<br />
System administrators and project maintainers are allowed to create runners, while users without these roles cannot. When runners are created from the system administration interface, they are called ''shared runners'', which all KDE projects can use. These are general use and should meet the needs of most KDE projects. When runners are created from a project's Settings, they are called ''project runners'', and they should only be used when a project has special needs that cannot be met with shared runners.<br />
<br />
System administrators, project maintainers and users without these roles are allowed to run jobs.<br />
<br />
If you are completely new to Gitlab CI/CD, then you may create your own projects on [https://invent.kde.org Invent] or create a fork of an existing project to make your own runners and jobs. It is recommended that you use the CI images mentioned below so that your jobs consume less resources from KDE infrastructure.<br />
<br />
[[File:Project Maintainer Settings.png|500px|thumb|center|The CI/CD project settings can be found under the Settings menu on the sidebar when you are a project maintainer or creator.]]<br />
<br />
== CI images ==<br />
<br />
As mentioned before, jobs are run on top of CI images. You can find a list of CI images in [https://invent.kde.org/sysadmin/ci-images https://invent.kde.org/sysadmin/ci-images]. Any additional shared dependencies for KDE projects must be added here.<br />
<br />
Developers are expected not to make their own custom CI files using these images. Instead, use the Gitlab Templates mentioned in the next section.<br />
<br />
To fetch the container images from the KDE Container Registry, you can simply copy the URL for the image, replace <code><nowiki>https://invent.kde.org</nowiki></code> with <code>invent-registry.kde.org</code> and add the container tag at the end if applicable (usually <code>:latest</code>), for example: <code>invent-registry.kde.org/sysadmin/ci-images/suse-qt65:latest</code>.<br />
<br />
Some of the provided CI images are very large (even up to 6 GB of disk space), but because the CI images are cached, their size does not pose a problem. Additionally, since they already come preconfigured for you, they will have less instructions to run and will consume much less resources from KDE infrastructure.<br />
<br />
== Including CI templates ==<br />
<br />
Instead of writing your own custom <code>.gitlab-ci.yml</code> files yourself, to make life easier for KDE developers, Gitlab CI templates are provided in [https://invent.kde.org/sysadmin/ci-utilities/-/tree/master/gitlab-templates sysadmin/ci-utilities/gitlab-templates].<br />
<br />
Your typical Gitlab CI file for a KDE project will likely just use the [https://docs.gitlab.com/ee/ci/yaml/includes.html include: command] to add these template files whenever you need to enable a new job, for example, for building with Qt6, for checking whether your project follows our [[Guidelines_and_HOWTOs/Licensing|REUSE guidelines]], or for generating flatpak bundles built from the main branch.<br />
<br />
This is the preferred way to include templates in your CI file: <br />
<br />
{{bc-hl|lang=yaml|code=<br />
include:<br />
- project: sysadmin/ci-utilities<br />
file:<br />
- /gitlab-templates/reuse-lint.yml<br />
- /gitlab-templates/linux.yml<br />
- /gitlab-templates/freebsd.yml<br />
- /gitlab-templates/windows.yml<br />
- /gitlab-templates/android.yml<br />
- /gitlab-templates/linux-qt6.yml<br />
- /gitlab-templates/freebsd-qt6.yml<br />
- /gitlab-templates/windows-qt6.yml<br />
- /gitlab-templates/android-qt6.yml<br />
- /gitlab-templates/flatpak.yml<br />
}}<br />
<br />
These are currently the most common builds among the provided templates.<br />
<br />
Note: The old way to include templates by using raw links to the template files will fail for some of the templates because they include shared base templates with local includes. You'll get an error like<br />
<blockquote><br />
Unable to create pipeline<br />
* Local file `gitlab-templates/craft-android-base.yml` does not have project!<br />
</blockquote><br />
<br />
=== Job artifacts ===<br />
<br />
<br />
Most CI images and templates for KDE software are primarily designed for continuous integration instead of continuous delivery, but they still generate [https://docs.gitlab.com/ee/ci/jobs/job_artifacts.html job artifacts], files or compressed files that can be accessed outside a job, and that can be transferred from one job to the other. You can view a project's artifacts on https://invent.kde.org from its navigation menu; to view the artifacts produced by CI for a particular Merge Request, view Pipeline > Jobs and click [Browse] in the right-hand sidebar (click [<<] to show a collapsed sidebar), or click the [↓] Download artifacts button for a build.<br />
<br />
Many of the final job artifacts generated by CI pipelines can be seen in [https://invent.kde.org/groups/teams/ci-artifacts/-/packages teams/ci-artifacts/packages].<br />
<br />
A few templates, such as [https://invent.kde.org/sysadmin/ci-utilities/-/blob/master/gitlab-templates/craft-appimage.yml craft-appimage], [https://invent.kde.org/sysadmin/ci-utilities/-/blob/master/gitlab-templates/flatpak.yml flatpak] and [https://invent.kde.org/sysadmin/ci-utilities/-/blob/master/gitlab-templates/website-hugo.yml website-hugo], are designed for continuous delivery instead of continuous integration. The first two generate <code>.appimage</code> and <code>.flatpak</code> files, which are job artifacts. The last one is used to publish websites. You should set up an app project to [https://develop.kde.org/docs/packaging/flatpak/publishing/#publishing-to-kdes-nightly-repositories publish its flatpak] to a [https://cdn.kde.org/flatpak/ "nightly" repository] so testers can try out and reproduce bugs with a flatpak built from the latest code.<br />
<br />
<!-- note similar text also appears at https://community.kde.org/Windows#Windows_binaries --><br />
CI produces Windows binaries of several KDE apps; these are collected in the Windows Qt 5.15 project, under [sidebar] > Deploy > Package registry, at https://invent.kde.org/teams/ci-artifacts/windows-qt5.15/-/packages . <br />
<br />
{{Note|Flatpak and website jobs used to be listed under a Jenkins instance https://binary-factory.kde.org|Old infrastructure}}<br />
<br />
=== Special cases ===<br />
Other templates, such as [https://invent.kde.org/sysadmin/ci-utilities/-/blob/master/gitlab-templates/reuse-lint.yml reuse-lint] and [https://invent.kde.org/sysadmin/ci-utilities/-/blob/master/gitlab-templates/json-validation.yml json-validation], consist of small tools used to perform specific tasks on the repository and report the results back if unsuccessful. These do not generate job artifacts.<br />
<br />
You can read more about what each template is for in the [https://invent.kde.org/sysadmin/ci-utilities/-/blob/master/gitlab-templates/README.md gitlab-templates readme].<br />
<br />
== The .kde-ci.yml file ==<br />
<br />
As mentioned before, <code>.kde-ci.yml</code> files contain dependency information and instructions that modify jobs to suit the needs of a project.<br />
<br />
The purpose of this file is to centralize settings accross multiple jobs while having control over each individual job, all without needing to write your own custom <code>.gitlab-ci.yml</code> files.<br />
<br />
It has three main settings:<br />
<br />
* '''Dependencies''': a listing of build dependencies that vary according to the platform and builds.<br />
* '''Environment''': a listing of variables that can be used inside a job.<br />
* '''Options''': a listing of additional options that can be passed to jobs to ensure their code quality.<br />
<br />
Here is an example copied verbatim from the [https://invent.kde.org/sysadmin/ci-utilities/-/blob/master/config-template.yml config-template.yml]:<br />
<br />
{{bc-hl|lang=yaml|code=<br />
Dependencies:<br />
- 'on': ['Linux', 'FreeBSD', 'Windows', 'Android']<br />
'require':<br />
'frameworks/*': '@stable'<br />
'kde/workspace/kdecoration': '@stable'<br />
<br />
Environment:<br />
Variable: SOMEVALUE<br />
<br />
Options:<br />
in-source-build: False<br />
cmake-options: ''<br />
test-before-installing: False<br />
run-tests: True<br />
tests-load-sensitive: False<br />
per-test-timeout: 60<br />
setup-x-environment: True<br />
setup-dbus-session: True<br />
force-inject-asan: False<br />
ctest-arguments: ''<br />
# a list of platforms on which unit test failures are considered fatal<br />
require-passing-tests-on: []<br />
run-cppcheck: True<br />
cppcheck-arguments: '--enable=warning,style,performance'<br />
cppcheck-ignore-files:<br />
- src/3rdparty/<br />
run-gcovr: True<br />
gcovr-arguments: ''<br />
# add json files to ignore when using json-validation pipeline<br />
json-validate-ignore: []<br />
# add files to validate when using json-validation pipeline (for example, to add json files that do not explicitely has a ".json" suffix)<br />
json-validate-include: []<br />
}}<br />
<br />
=== Dependencies ===<br />
<br />
Dependencies is the most volatile of all settings, because it will need to be updated every time a new build dependency is added to the project.<br />
<br />
The <code>on</code> section allows you to select which platforms the project will be built for and can be repeated as many times as needed using different combinations of platforms. The available platforms are:<br />
<br />
* '''Linux'''<br />
* '''FreeBSD'''<br />
* '''Windows'''<br />
* '''macOS'''<br />
* '''Android'''<br />
* '''@all'''<br />
<br />
The platform names are case sensitive. The <code>@all</code> platform serves as a shorthand for all platforms (instead of typing them all).<br />
<br />
The <code>require</code> section allows you to mention the dependency and its version. The dependency name can be found under [https://invent.kde.org/sysadmin/repo-metadata/-/tree/master/dependencies sysadmin/repo-metadata/dependencies], and it matches the project path on Invent. You can state each dependency version as:<br />
<br />
* '''@same''': point to the same branch name as the current project's<br />
* '''@stable''' or '''@latest''': point to the branches specified in [https://invent.kde.org/sysadmin/repo-metadata/-/blob/master/branch-rules.yml sysadmin/repo-metadata/branch-rules.yml]<br />
* any other version mentioned in branch-rules.yml, such as '''@latest-kf6'''<br />
<br />
You should only include projects that you explicitly depend on.<br />
<br />
=== Options ===<br />
<br />
Options is less volatile and is rarely changed.<br />
<br />
Additional attention should be paid to it: you should NOT copy all options from the template file. Only add options as needed.<br />
<br />
The available options are:<br />
<br />
* '''in-source-build''': whether to build the project in its own separate <code>build/</code> folder (out-of-source build) or on the source project root (in-source build)<br />
* '''cmake-options''': options that can be passed to CMake during build<br />
* '''test-before-installing''': whether to run tests before installing the project (using CTest provided by the [https://api.kde.org/ecm/kde-module/KDECMakeSettings.html ECM KDECMakeSettings module])<br />
* '''run-tests''': whether to run tests (using CTest provided by the ECM KDECMakeSettings module)<br />
* '''tests-load-sensitive''': whether to make tests run only when the load of a CI worker is low, needed for fragile tests that can fail under high load conditions<br />
* '''per-test-timeout''': timeout in seconds per test<br />
* '''setup-x-environment''': whether to run a graphical session<br />
* '''setup-dbus-session''': whether to run a D-Bus session<br />
* '''force-inject-asan''': whether to use LD_PRELOAD to force inject [https://clang.llvm.org/docs/AddressSanitizer.html AddressSanitizer] in a project (useful for non-KDE libraries that need to load KDE plugins/libraries, sometimes needed in QML applications)<br />
* '''ctest-arguments''': options that can be passed to ctest during tests<br />
* '''require-passing-tests-on''': in which platform tests must pass for the job to be successful (same platforms as in Dependencies)<br />
* '''run-cppcheck''': whether to run [http://cppcheck.net/ cppcheck linting] for static analysis<br />
* '''cppcheck-arguments''': options that can be passed to cppcheck<br />
* '''cppcheck-ignore-files''': which directories/files cppcheck should ignore<br />
* '''run-gcovr''': whether to run [https://gcovr.com/en/stable/ gcovr] for checking code coverage<br />
* '''gcovr-arguments''': options that can be passed to gcovr<br />
* '''json-validate-ignore''': which directories/files [https://invent.kde.org/sysadmin/ci-utilities/-/blob/master/gitlab-templates/json-validation.yml json-validation] should ignore<br />
* '''json-validate-include''': which directories/files validate-json-files should include that do not have the <code>.json</code> file extension<br />
<br />
=== Examples ===<br />
<br />
==== All platforms ====<br />
<br />
Here is an example copied from Okular, which is built for all platforms available:<br />
<br />
{{bc-hl|lang=yaml|code=<br />
# SPDX-FileCopyrightText: None<br />
# SPDX-License-Identifier: CC0-1.0<br />
<br />
Dependencies:<br />
- 'on': ['@all']<br />
'require':<br />
'frameworks/kbookmarks': '@stable'<br />
'frameworks/threadweaver': '@stable'<br />
'frameworks/ki18n': '@stable'<br />
'frameworks/kio': '@stable'<br />
'frameworks/karchive': '@stable'<br />
'libraries/phonon': '@stable'<br />
'graphics/kdegraphics-mobipocket': '@same'<br />
<br />
- 'on': ['Linux', 'FreeBSD', 'Windows']<br />
'require':<br />
'frameworks/khtml': '@stable'<br />
'frameworks/purpose': '@stable'<br />
'frameworks/breeze-icons': '@stable'<br />
'graphics/libkexiv2': '@same'<br />
<br />
- 'on': ['Linux', 'FreeBSD']<br />
'require':<br />
'frameworks/kactivities': '@stable'<br />
'frameworks/kpty': '@stable'<br />
<br />
- 'on': ['Android']<br />
'require':<br />
'frameworks/kirigami': '@stable'<br />
<br />
Options:<br />
cppcheck-arguments: '--enable=warning,style,performance -DOKULAR_EXPORT_PLUGIN'<br />
cppcheck-ignore-files:<br />
- autotests<br />
}}<br />
<br />
==== KF5 + KF6 ====<br />
<br />
And an example copied from Konsole, which at this moment builds against KF5 and KF6:<br />
<br />
{{bc-hl|lang=yaml|code=<br />
# SPDX-FileCopyrightText: None<br />
# SPDX-License-Identifier: CC0-1.0<br />
<br />
Dependencies:<br />
- 'on': ['Linux/Qt5', 'FreeBSD/Qt5', 'Windows/Qt5']<br />
'require':<br />
'frameworks/extra-cmake-modules': '@stable'<br />
'frameworks/kconfig': '@stable'<br />
'frameworks/knotifications': '@stable'<br />
'frameworks/ki18n': '@stable'<br />
'frameworks/kcoreaddons': '@stable'<br />
'frameworks/kdbusaddons': '@stable'<br />
'frameworks/kbookmarks': '@stable'<br />
'frameworks/kconfigwidgets': '@stable'<br />
'frameworks/kcrash': '@stable'<br />
'frameworks/kguiaddons': '@stable'<br />
'frameworks/kiconthemes': '@stable'<br />
'frameworks/kio': '@stable'<br />
'frameworks/knewstuff': '@stable'<br />
'frameworks/knotifyconfig': '@stable'<br />
'frameworks/kparts': '@stable'<br />
'frameworks/kservice': '@stable'<br />
'frameworks/ktextwidgets': '@stable'<br />
'frameworks/kwidgetsaddons': '@stable'<br />
'frameworks/kwindowsystem': '@stable'<br />
'frameworks/kxmlgui': '@stable'<br />
'frameworks/kdoctools': '@stable'<br />
<br />
- 'on': ['Linux/Qt6', 'FreeBSD/Qt6', 'Windows/Qt6']<br />
'require':<br />
'frameworks/extra-cmake-modules': '@latest-kf6'<br />
'frameworks/kconfig': '@latest-kf6'<br />
'frameworks/knotifications': '@latest-kf6'<br />
'frameworks/ki18n': '@latest-kf6'<br />
'frameworks/kcoreaddons': '@latest-kf6'<br />
'frameworks/kdbusaddons': '@latest-kf6'<br />
'frameworks/kbookmarks': '@latest-kf6'<br />
'frameworks/kconfigwidgets': '@latest-kf6'<br />
'frameworks/kcrash': '@latest-kf6'<br />
'frameworks/kguiaddons': '@latest-kf6'<br />
'frameworks/kiconthemes': '@latest-kf6'<br />
'frameworks/kio': '@latest-kf6'<br />
'frameworks/knewstuff': '@latest-kf6'<br />
'frameworks/knotifyconfig': '@latest-kf6'<br />
'frameworks/kparts': '@latest-kf6'<br />
'frameworks/kservice': '@latest-kf6'<br />
'frameworks/ktextwidgets': '@latest-kf6'<br />
'frameworks/kwidgetsaddons': '@latest-kf6'<br />
'frameworks/kwindowsystem': '@latest-kf6'<br />
'frameworks/kxmlgui': '@latest-kf6'<br />
'frameworks/kdoctools': '@latest-kf6'<br />
<br />
- 'on': ['Linux/Qt5', 'FreeBSD/Qt5']<br />
'require':<br />
'frameworks/kpty': '@stable'<br />
'frameworks/kglobalaccel': '@stable'<br />
<br />
- 'on': ['Linux/Qt6', 'FreeBSD/Qt6']<br />
'require':<br />
'frameworks/kpty': '@latest-kf6'<br />
'frameworks/kglobalaccel': '@latest-kf6'<br />
<br />
Options:<br />
require-passing-tests-on: [ 'Linux', 'FreeBSD/Qt6' ]<br />
}}<br />
<br />
==== Warning free code ====<br />
<br />
{{bc-hl|lang=yaml|code=<br />
Options:<br />
cmake-options: '-DCMAKE_COMPILE_WARNING_AS_ERROR=ON'<br />
}}<br />
<br />
== History for archiving reasons ==<br />
<br />
* Until 2020, KDE used [https://www.jenkins.io/ Jenkins] for its infrastructure, namely over https://build.kde.org and https://binary-factory.kde.org, as described in the [https://community.kde.org/index.php?title=Infrastructure/Continuous_Integration_System&oldid=94998 previous history of this page].<br />
* KDE [https://dot.kde.org/2020/06/30/kdes-gitlab-now-live migrated to Gitlab] in 2020.<br />
* The KDE system administration [https://mail.kde.org/pipermail/kde-frameworks-devel/2021-September/118851.html starts integrating the Gitlab CI workflow with repo-metadata by adding .kde-ci.yml files] to KDE Frameworks in September 2021.<br />
* In October of the same year, it's [https://mail.kde.org/pipermail/kde-frameworks-devel/2021-September/119121.html officially rolled out for all projects], with only Linux builds currently available.<br />
* https://build.kde.org is [https://mail.kde.org/pipermail/kde-devel/2022-September/001270.html retired] in September 2022.<br />
* In October of the same year, there was some [https://mail.kde.org/pipermail/kde-devel/2022-October/001401.html clarification on the roles of CI and CD under KDE infrastructure] in the mailing lists.</div>Skierpagehttps://community.kde.org/index.php?title=Windows&diff=100226Windows2024-02-29T03:12:44Z<p>Skierpage: mention Windows binaries at Qt 5.15 repo. Maybe this shouldn't be here, it's too unstable?</p>
<hr />
<div>"''KDE libraries and applications are available to you, no matter if you are a commercial developer, manager or free software hacker. You are invited to not only just use the toolkit - you can contribute your own solutions and improvements to the KDE community.''"[[Image:Konqi-win.png|frame|right|Konqi, the KDE mascot now also supporting Windows]]<br />
<br />
The KDE on Windows Initiative is an ongoing project to port the KDE applications to Windows. <br />
<br />
== Application installers ==<br />
<br />
=== Installers from application websites ===<br />
<br />
* [https://www.digikam.org/download/binary#Windows digiKam]<br />
* [https://kate-editor.org/get-it/ Kate & KWrite]<br />
* [https://www.kdevelop.org/download KDevelop]<br />
* [https://community.kde.org/Kexi/Releases KEXI]<br />
* [https://kile.sourceforge.io/download.php Kile]<br />
* [https://kmymoney.org/ KMymoney]<br />
* [https://krita.org/en/download/krita-desktop/ Krita]<br />
* [https://marble.kde.org/install.php? Marble Virtual Globe]<br />
* [http://download.kde.org/stable/umbrello/latest/ Umbrello UML Modeller]<br />
* [https://rkward.kde.org/RKWard_on_Windows.html RKWard]<br />
<br />
=== App Stores / Package Managers ===<br />
<br />
* [https://apps.microsoft.com/search/publisher?name=KDE+e.V KDE Software in the Microsoft Store] <br />
* [ms-windows-store://publisher/?name=KDE+e.V. Microsoft Store app link] <br />
<br />
* [https://chocolatey.org/profiles/KDE KDE Software at Chocolatey]<br />
* WinGet, [https://winget.run/pkg/KDE package list via wingetdotrun]<br />
<br />
== News ==<br />
<br />
* Hannah von Reth: https://mastodon.social/@The2Ring<br />
<br />
== Getting in touch ==<br />
<br />
* Matrix: [https://go.kde.org/matrix/#/#kde-windows:kde.org #kde-windows] on kde.org <br />
* IRC: [irc://irc.libera.chat/kde-windows #kde-windows] on Libera Chat<br />
<br />
* Mailing list: [mailto:kde-windows@kde.org kde-windows@kde.org] ([https://mail.kde.org/mailman/listinfo/kde-windows subscribe], [http://lists.kde.org/?l=kde-windows&r=1&w=2 archives])<br />
<br />
==Development==<br />
*[[Guidelines_and_HOWTOs/Build_from_source/Windows|Build KDE on Windows]] using [[Craft]]<br />
*[[/Debugging|Debugging on Windows]]<br />
*[[/Development Workflow|Development Workflow]]<br />
*[[/Tools|Tools]] (required or useful)<br />
*Source code in the KDE git: [https://invent.kde.org/packaging/craft-blueprints-kde Craft]<br />
*[[/How to Help|How to Help / Join]]<br />
*[[Guidelines_and_HOWTOs/MicrosoftStore|Publishing KDE apps in the Microsoft Store]]<br />
<br />
=== Windows binaries ===<br />
[https://community.kde.org/Infrastructure/Continuous_Integration_System#Special_cases_and_job_artifacts KDE Continuous Integration] produces Windows binaries of several KDE app as "build artifacts"; these are collected in the Windows Qt 5.15 project, under [sidebar] > Deploy > Package registry, at https://invent.kde.org/teams/ci-artifacts/windows-qt5.15/-/packages . There are both "release" builds, and "main" or "master" builds that are built from latest code and are less stable.<br />
<br />
__NOTOC__</div>Skierpagehttps://community.kde.org/index.php?title=Template:Out_of_date&diff=100225Template:Out of date2024-02-29T03:01:22Z<p>Skierpage: mention {{Outdated}}</p>
<hr />
<div><noinclude><br />
{{Template}}<br />
An "out of date" flag used to indicate outdated content.<br />
<br />
== Usage ==<br />
<br />
This template should be added at the beginning of articles or sections containing outdated information. Ensure to cite specific concerns with the first argument and possibly also on the flagged article's discussion page.<br />
<br />
<nowiki>{{Out of date|This section talks about thing X, but we switched to Y.}}</nowiki><br />
<br />
You can override the default discussion page with a second optional argument:<br />
<br />
<nowiki>{{Out of date|This section talks about thing X, but we switched to Y.|Talk:Alternative Page}}</nowiki><br />
<br />
Alternatively you can point to a specific section in the default talk page with the named {{ic|section}} parameter:<br />
<br />
<nowiki>{{Out of date|This section talks about thing X, but we switched to Y.|section=Section name}}</nowiki><br />
<br />
Flagged pages can be found in [[Special:WhatLinksHere/Template:Out of date]] or in [[:Category:Pages or sections flagged with Template:Out of date]]. If knowledgeable in a subject, users are encouraged to participate to update the article. The {{ic|<nowiki>{{Out of date}}</nowiki>}} flag should be removed after correction of dated information.<br />
<br />
{{Note|The talk page is linked through an external link: this is to avoid polluting [[Special:WantedPages]] when the talk page does not exist.}}<br />
<br />
See also [[Template:Outdated]]<br />
<br />
== Example ==<br />
<br />
{{Out of date|This section talks about thing X, but we switched to Y.}}<br />
</noinclude><includeonly>{{META Message<br />
|signal = [[Image:View-refresh-red.svg]]<br />
|heading = This article or section is out of date.<br />
|message = '''Reason:''' {{{reason|{{{1|{{META Unexplained Status Template}}}}}}}} (Discuss in {{#if:{{{talk|{{{2|}}}}}}{{{section|}}}|[[{{{talk|{{{2|{{TALKPAGENAME}}#{{{section|}}}}}}}}}]]|[{{fullurl:{{TALKPAGENAME}}}} {{TALKPAGENAME}}]}})}}[[Category:Pages or sections flagged with Template:Out of date]]</includeonly></div>Skierpagehttps://community.kde.org/index.php?title=Template:Outdated&diff=100224Template:Outdated2024-02-29T02:59:48Z<p>Skierpage: mention {{Out of date}}</p>
<hr />
<div>{{Warning|2=The contents of this page are outdated|1=Please take one of the following actions:<br />
* If the content could be brought up to date to make it relevant, please do so.<br />
* If not, add the <nowiki>{{Archive}}</nowiki> tag to it.<br />
* If the content is of extremely low value even for historical record-keeping purposes, delete the page.<br />
<br />
Please see the [[:Category:Outdated]] for similar pages.}}<br />
<br />
<noinclude><br />
To use, add <nowiki>{{Outdated}}</nowiki> where it is to be displayed<br />
<br />
See also [[Template:Out of date]]<br />
[[Category:Template]]<br />
</noinclude></div>Skierpagehttps://community.kde.org/index.php?title=PIM/Enterprise_Translation_Howto&diff=100223PIM/Enterprise Translation Howto2024-02-29T02:56:20Z<p>Skierpage: flag out of date</p>
<hr />
<div>{{out of date|this dates from 2010; use <code>LANG</code>, not KDE_LANG}}<br />
== Overview ==<br />
<br />
Translations are currently only done in the e35 and in the e4 branches. e5 will follow later. Right now we use custom translation scripts, but for e4 and e5 we eventually plan to switch over to the KDE infrastructure to do all the work for us, after the Git migration is complete.<br />
<br />
== Setup ==<br />
<br />
Apart from the setup needed below, please also follow the setup instructions in the [http://websvn.kde.org/*checkout*/branches/kdepim/scripts/README.txt README file] so that the scripts will work properly. It is important to follow those instructions, especially about setting up environment variables. You also need to install [[userbase:Lokalize|Lokalize]], which is the program used to edit .PO files. These .PO files contain the actual translations for each language. The translation scripts will create updated .PO files by scanning the source code and the documentation and extracting text that should be translated out of them.<br />
<br />
=== Setup for e35 ===<br />
<br />
You need to have a installation of KDE3 somewhere, which needs to include [http://websvn.kde.org/branches/KDE/3.5/kdesdk/ kdesdk], as kdesdk has some scripts which are used internally by the translation scripts.<br />
<br />
=== Setup for e4 ===<br />
<br />
Setup for the enterprise4 branch is a little bit more involved.<br />
<br />
Check out the following folders, mirroring the SVN folder hierarchy. -N indicates that you should use the -N option to "svn up" to not pull all subdirectories.<br />
<br />
trunk (-N)<br />
trunk/KDE (-N)<br />
trunk/KDE/kdesdk (-N)<br />
trunk/KDE/kdesdk/scripts<br />
branches (-N)<br />
branches/kdepim (-N)<br />
branches/kdepim/enterprise4 (-N)<br />
branches/kdepim/enterprise4/kdepim<br />
branches/kdepim/enterprise4/kdepimlibs<br />
branches/kdepim/enterprise4/kdebase-4.2-branch<br />
branches/kdepim/enterprise4/kdelibs-4.2-branch<br />
branches/kdepim/enterprise4/l10n-kde4 (-N)<br />
branches/kdepim/enterprise4/l10n-kde4/scripts<br />
branches/kdepim/enterprise4/l10n-kde4/de (-N)<br />
branches/kdepim/enterprise4/l10n-kde4/de/messages (-N)<br />
branches/kdepim/enterprise4/l10n-kde4/de/messages/kdepim<br />
branches/kdepim/enterprise4/l10n-kde4/de/messages/kdepimlibs<br />
branches/kdepim/enterprise4/l10n-kde4/de/messages/kdelibs<br />
branches/kdepim/enterprise4/l10n-kde4/de/messages/kdebase<br />
branches/kdepim/enterprise4/l10n-kde4/templates (-N)<br />
branches/kdepim/enterprise4/l10n-kde4/templates/messages (-N)<br />
branches/kdepim/enterprise4/l10n-kde4/templates/messages/kdepim<br />
branches/kdepim/enterprise4/l10n-kde4/templates/messages/kdepimlibs<br />
branches/kdepim/enterprise4/l10n-kde4/templates/messages/kdelibs<br />
branches/kdepim/enterprise4/l10n-kde4/templates/messages/kdebase<br />
<br />
Now, you need to create some symlinks.<br />
In the ''branches/kdepim/enterprise4'' directory, symlink ''kdebase-4.2-branch'' to ''kdebase'' and ''kdelibs-4.2-branch'' to ''kdelibs''.<br />
<br />
== Updating PO and POT files ==<br />
<br />
After the initial setup is complete, you'll see the PO files in the ''l10n-kde4/de/'' (e4) and in the ''kde-l10n/de/'' (e35) directories. There is also a ''templates/'' directory with POT (PO template) files. As soon as text strings in the source code or in the documentation change, the PO and POT need to be updated. This can be done by simply calling the following bash functions:<br />
* e35: update_e3_translations<br />
* e4: update_e4_translations<br />
<br />
The scripts will automatically update your source code checkout so that you don't get outdated translations. Running these can take a few minutes. Afterwards, the PO and POT files should be up-to-date and you can edit the PO files to add the translated strings.<br />
The update scripts will show you at the end which PO files have outdated translations and need to edited.<br />
<br />
== Editing Translations ==<br />
<br />
The PO file editor for KDE is called Lokalize. Simply start it and open the PO files you want to update. The PO files you need to edit are located in the following directories:<br />
* e35:<br />
kde-l10n/de/messages/kdepim/: Strings in the actual applications<br />
kde-l10n/de/docmessages/kdepim/: Strings in the documentation handbook<br />
* e4:<br />
l10n-kde4/de/messages/<br />
<br />
Lokalize lets you jump to the next untranslated or to the next fuzzy message you need to translate, simply use that, add the translations and save the PO file. For more advanced features, and for a general guide to translating, see:<br />
* [http://userbase.kde.org/Lokalize Lokalize Overview at Usebase]<br />
* [http://docs.kde.org/development/en/kdesdk/lokalize/index.html The Lokalize Handbook]<br />
* [http://techbase.kde.org/Localization Localization Overview Page]<br />
<br />
Special attention should be paid to crypto terms, they should be as consistent as possible. See [https://gpg4win-intern.intevation.de/Phrasebook The GPG4WIN phrasebook] for some standard terms to use. For other terms, try to be consistent with the rest of the German KDE translation. It is often useful to use Lokalize to see what the translation of a certain term is in other places, so that the same translation can be used.<br />
<br />
To double-check that you don't have missed some strings, run the function '''find_untranslated''' in the ''kde-l10n'' or in the ''l10n-kde4'' dir. Afterwards, double-check that you have made the correct changes by viewing the diff with the '''po_diff''' function.<br />
Now you can commit the changes to the PO files and to the POT files by simply running<br />
svn ci -m "SVN_SILENT update translations"<br />
in the ''kde-l10n'' or in the ''l10n-kde4'' directory.<br />
After a successful commit, the translations are done.<br />
<br />
Note that after committing, no changes in the source code can be made that change text strings, since otherwise the translations will be outdated again. Therefore, we have to avoid changing text strings in the source when the translations are committed, but the tags are not yet made. This needs coordination between the translators, the developers and the person doing the tags.<br />
<br />
== Installing and Testing Translations ==<br />
<br />
After finishing the translations, one might want to directly test them, to see if they work as expected.<br />
First of all, you should install the current SVN versions of ''kdepim'' and ''kdepimlibs'', as the translations of course need up-to-date applications that use the translations. After installing those, the translations itself need to be installed. For this, the PO files first need to be compiled to MO files, which are then installed. This can easily be done by running this function:<br />
* e35: install_e3_translations<br />
* e4: install_e4_translations<br />
<br />
Before starting the applications, the ''KDE_LANG'' environment variable needs to be set up so that the correct translations are used. Simply type<br />
export KDE_LANG=de<br />
before starting the PIM applications from console. Sometimes it might be necessary to kill the running ''kdeinit''/''kdeinit4'' process before the translations can become fully active.</div>Skierpagehttps://community.kde.org/index.php?title=Infrastructure/Continuous_Integration_System&diff=100102Infrastructure/Continuous Integration System2024-02-22T02:02:17Z<p>Skierpage: /* Special cases and job artifacts */ say where flatpak artifacts appear, move obsolete Jenkins and binary-factory to a note, restructure. I'm no expert...</p>
<hr />
<div>Continuous Integration (CI) is a process that allows developers to ensure their code is properly tested, follows quality standards and compiles correctly, while Continuous Delivery (CD) is a process that allows to automate the generation of binaries or packages for end users.<br />
<br />
KDE ensures the quality of its code with the help of [https://docs.gitlab.com/ee/ci/ Gitlab CI/CD]. The Gitlab CI/CD system consists mostly of compiling software projects inside ''CI images'', usually [https://docs.docker.com/get-started/overview/ Docker containers] or virtual machines that have their environment prepared for building and testing.<br />
<br />
== Runners and Jobs ==<br />
<br />
We call a ''job'' when software is run inside of a CI image, and in standard Gitlab CI/CD we describe jobs using a [https://docs.gitlab.com/ee/ci/yaml/ .gitlab-ci.yml] file. Jobs can be configured to run only under certain circumstances by using [https://docs.gitlab.com/ee/ci/jobs/job_control.html rules], so that they can run when making a Merge Request, once a given amount of time has passed, if a certain file exists in the repository, or whenever new code is merged into the main branch.<br />
<br />
Additionally, KDE has some additional tooling used to describe the dependency information required by a project, and includes certain options to modify jobs for building KDE projects. These modifications are described in a <code>.kde-ci.yml</code> file, and an example configuration showing all available options can be found in [https://invent.kde.org/sysadmin/ci-utilities/-/blob/master/config-template.yml sysadmin/ci-utilities/config-template.yml]. A custom [https://invent.kde.org/nicolasfella/dependency-generator dependency-generator] is run on these files to update dependency information stored in [https://invent.kde.org/sysadmin/repo-metadata/-/tree/master/dependencies sysadmin/repo-metadata/dependencies], which is then used for [[Get_Involved/development/Set_up_a_development_environment|kdesrc-build]] to determine the order in which to build projects, among other things.<br />
<br />
A ''runner'' on the other hand is a process that runs jobs. It does not run those jobs in Gitlab itself; it requires additional software to be running in addition to Gitlab. By default, this software is [https://docs.gitlab.com/runner/ Gitlab Runner] which as mentioned before uses a <code>.gitlab-ci.yml</code> file written in [https://en.wikipedia.org/wiki/YAML YAML]. While it is possible to [https://docs.gitlab.com/ee/integration/ integrate] other runner software like [https://www.drone.io/ Drone CI] or [https://www.jenkins.io/ Jenkins], these are not used or supported under KDE infrastructure.<br />
<br />
System administrators and project maintainers are allowed to create runners, while users without these roles cannot. When runners are created from the system administration interface, they are called ''shared runners'', which all KDE projects can use. These are general use and should meet the needs of most KDE projects. When runners are created from a project's Settings, they are called ''project runners'', and they should only be used when a project has special needs that cannot be met with shared runners.<br />
<br />
System administrators, project maintainers and users without these roles are allowed to run jobs.<br />
<br />
If you are completely new to Gitlab CI/CD, then you may create your own projects on [https://invent.kde.org Invent] or create a fork of an existing project to make your own runners and jobs. It is recommended that you use the CI images mentioned below so that your jobs consume less resources from KDE infrastructure.<br />
<br />
[[File:Project Maintainer Settings.png|500px|thumb|center|The CI/CD project settings can be found under the Settings menu on the sidebar when you are a project maintainer or creator.]]<br />
<br />
== CI images ==<br />
<br />
As mentioned before, jobs are run on top of CI images. You can find a list of CI images in [https://invent.kde.org/sysadmin/ci-images https://invent.kde.org/sysadmin/ci-images]. Any additional shared dependencies for KDE projects must be added here.<br />
<br />
Developers are expected not to make their own custom CI files using these images. Instead, use the Gitlab Templates mentioned in the next section.<br />
<br />
To fetch the container images from the KDE Container Registry, you can simply copy the URL for the image, replace <code><nowiki>https://invent.kde.org</nowiki></code> with <code>invent-registry.kde.org</code> and add the container tag at the end if applicable (usually <code>:latest</code>), for example: <code>invent-registry.kde.org/sysadmin/ci-images/suse-qt65:latest</code>.<br />
<br />
Some of the provided CI images are very large (even up to 6 GB of disk space), but because the CI images are cached, their size does not pose a problem. Additionally, since they already come preconfigured for you, they will have less instructions to run and will consume much less resources from KDE infrastructure.<br />
<br />
== Including CI templates ==<br />
<br />
Instead of writing your own custom <code>.gitlab-ci.yml</code> files yourself, to make life easier for KDE developers, Gitlab CI templates are provided in [https://invent.kde.org/sysadmin/ci-utilities/-/tree/master/gitlab-templates sysadmin/ci-utilities/gitlab-templates].<br />
<br />
Your typical Gitlab CI file for a KDE project will likely just use the [https://docs.gitlab.com/ee/ci/yaml/includes.html include: command] to add these template files whenever you need to enable a new job, for example, for building with Qt6, for checking whether your project follows our [[Guidelines_and_HOWTOs/Licensing|REUSE guidelines]], or for generating flatpak bundles built from the main branch.<br />
<br />
This is the preferred way to include templates in your CI file: <br />
<br />
{{bc-hl|lang=yaml|code=<br />
include:<br />
- project: sysadmin/ci-utilities<br />
file:<br />
- /gitlab-templates/reuse-lint.yml<br />
- /gitlab-templates/linux.yml<br />
- /gitlab-templates/freebsd.yml<br />
- /gitlab-templates/windows.yml<br />
- /gitlab-templates/android.yml<br />
- /gitlab-templates/linux-qt6.yml<br />
- /gitlab-templates/freebsd-qt6.yml<br />
- /gitlab-templates/windows-qt6.yml<br />
- /gitlab-templates/android-qt6.yml<br />
- /gitlab-templates/flatpak.yml<br />
}}<br />
<br />
These are currently the most common builds among the provided templates.<br />
<br />
Note: The old way to include templates by using raw links to the template files will fail for some of the templates because they include shared base templates with local includes. You'll get an error like<br />
<blockquote><br />
Unable to create pipeline<br />
* Local file `gitlab-templates/craft-android-base.yml` does not have project!<br />
</blockquote><br />
<br />
=== Job artifacts ===<br />
<br />
<br />
Most CI images and templates for KDE software are primarily designed for continuous integration instead of continuous delivery, but they still generate [https://docs.gitlab.com/ee/ci/jobs/job_artifacts.html job artifacts], files or compressed files that can be accessed outside a job, and that can be transferred from one job to the other. You can view a project's artifacts on https://invent.kde.org from its navigation menu; to view the artifacts produced by CI for a particular Merge Request, view Pipeline > Jobs and click [Browse] in the right-hand sidebar (click [<<] to show a collapsed sidebar), or click the [↓] Download artifacts button for a build.<br />
<br />
Many of the final job artifacts generated by CI pipelines can be seen in [https://invent.kde.org/groups/teams/ci-artifacts/-/packages teams/ci-artifacts/packages].<br />
<br />
A few templates, such as [https://invent.kde.org/sysadmin/ci-utilities/-/blob/master/gitlab-templates/craft-appimage.yml craft-appimage], [https://invent.kde.org/sysadmin/ci-utilities/-/blob/master/gitlab-templates/flatpak.yml flatpak] and [https://invent.kde.org/sysadmin/ci-utilities/-/blob/master/gitlab-templates/website-hugo.yml website-hugo], are designed for continuous delivery instead of continuous integration. The first two generate <code>.appimage</code> and <code>.flatpak</code> files, which are job artifacts. The last one is used to publish websites. You should set up an app project to [https://develop.kde.org/docs/packaging/flatpak/publishing/#publishing-to-kdes-nightly-repositories publish its flatpak] to a [https://cdn.kde.org/flatpak/ "nightly" repository] so testers can try out and reproduce bugs with a flatpak built from the latest code.<br />
<br />
{{Note|Flatpak and website jobs used to be listed under a Jenkins instance https://binary-factory.kde.org|Old infrastructure}}<br />
=== Special cases ===<br />
Other templates, such as [https://invent.kde.org/sysadmin/ci-utilities/-/blob/master/gitlab-templates/reuse-lint.yml reuse-lint] and [https://invent.kde.org/sysadmin/ci-utilities/-/blob/master/gitlab-templates/json-validation.yml json-validation], consist of small tools used to perform specific tasks on the repository and report the results back if unsuccessful. These do not generate job artifacts.<br />
<br />
You can read more about what each template is for in the [https://invent.kde.org/sysadmin/ci-utilities/-/blob/master/gitlab-templates/README.md gitlab-templates readme].<br />
<br />
== The .kde-ci.yml file ==<br />
<br />
As mentioned before, <code>.kde-ci.yml</code> files contain dependency information and instructions that modify jobs to suit the needs of a project.<br />
<br />
The purpose of this file is to centralize settings accross multiple jobs while having control over each individual job, all without needing to write your own custom <code>.gitlab-ci.yml</code> files.<br />
<br />
It has three main settings:<br />
<br />
* '''Dependencies''': a listing of build dependencies that vary according to the platform and builds.<br />
* '''Environment''': a listing of variables that can be used inside a job.<br />
* '''Options''': a listing of additional options that can be passed to jobs to ensure their code quality.<br />
<br />
Here is an example copied verbatim from the [https://invent.kde.org/sysadmin/ci-utilities/-/blob/master/config-template.yml config-template.yml]:<br />
<br />
{{bc-hl|lang=yaml|code=<br />
Dependencies:<br />
- 'on': ['Linux', 'FreeBSD', 'Windows', 'Android']<br />
'require':<br />
'frameworks/*': '@stable'<br />
'kde/workspace/kdecoration': '@stable'<br />
<br />
Environment:<br />
Variable: SOMEVALUE<br />
<br />
Options:<br />
in-source-build: False<br />
cmake-options: ''<br />
test-before-installing: False<br />
run-tests: True<br />
tests-load-sensitive: False<br />
per-test-timeout: 60<br />
setup-x-environment: True<br />
setup-dbus-session: True<br />
force-inject-asan: False<br />
ctest-arguments: ''<br />
# a list of platforms on which unit test failures are considered fatal<br />
require-passing-tests-on: []<br />
run-cppcheck: True<br />
cppcheck-arguments: '--enable=warning,style,performance'<br />
cppcheck-ignore-files:<br />
- src/3rdparty/<br />
run-gcovr: True<br />
gcovr-arguments: ''<br />
# add json files to ignore when using json-validation pipeline<br />
json-validate-ignore: []<br />
# add files to validate when using json-validation pipeline (for example, to add json files that do not explicitely has a ".json" suffix)<br />
json-validate-include: []<br />
}}<br />
<br />
=== Dependencies ===<br />
<br />
Dependencies is the most volatile of all settings, because it will need to be updated every time a new build dependency is added to the project.<br />
<br />
The <code>on</code> section allows you to select which platforms the project will be built for and can be repeated as many times as needed using different combinations of platforms. The available platforms are:<br />
<br />
* '''Linux'''<br />
* '''FreeBSD'''<br />
* '''Windows'''<br />
* '''macOS'''<br />
* '''Android'''<br />
* '''@all'''<br />
<br />
The platform names are case sensitive. The <code>@all</code> platform serves as a shorthand for all platforms (instead of typing them all).<br />
<br />
The <code>require</code> section allows you to mention the dependency and its version. The dependency name can be found under [https://invent.kde.org/sysadmin/repo-metadata/-/tree/master/dependencies sysadmin/repo-metadata/dependencies], and it matches the project path on Invent. You can state each dependency version as:<br />
<br />
* '''@same''': point to the same branch name as the current project's<br />
* '''@stable''' or '''@latest''': point to the branches specified in [https://invent.kde.org/sysadmin/repo-metadata/-/blob/master/branch-rules.yml sysadmin/repo-metadata/branch-rules.yml]<br />
* any other version mentioned in branch-rules.yml, such as '''@latest-kf6'''<br />
<br />
You should only include projects that you explicitly depend on.<br />
<br />
=== Options ===<br />
<br />
Options is less volatile and is rarely changed.<br />
<br />
Additional attention should be paid to it: you should NOT copy all options from the template file. Only add options as needed.<br />
<br />
The available options are:<br />
<br />
* '''in-source-build''': whether to build the project in its own separate <code>build/</code> folder (out-of-source build) or on the source project root (in-source build)<br />
* '''cmake-options''': options that can be passed to CMake during build<br />
* '''test-before-installing''': whether to run tests before installing the project (using CTest provided by the [https://api.kde.org/ecm/kde-module/KDECMakeSettings.html ECM KDECMakeSettings module])<br />
* '''run-tests''': whether to run tests (using CTest provided by the ECM KDECMakeSettings module)<br />
* '''tests-load-sensitive''': whether to make tests run only when the load of a CI worker is low, needed for fragile tests that can fail under high load conditions<br />
* '''per-test-timeout''': timeout in seconds per test<br />
* '''setup-x-environment''': whether to run a graphical session<br />
* '''setup-dbus-session''': whether to run a D-Bus session<br />
* '''force-inject-asan''': whether to use LD_PRELOAD to force inject [https://clang.llvm.org/docs/AddressSanitizer.html AddressSanitizer] in a project (useful for non-KDE libraries that need to load KDE plugins/libraries, sometimes needed in QML applications)<br />
* '''ctest-arguments''': options that can be passed to ctest during tests<br />
* '''require-passing-tests-on''': in which platform tests must pass for the job to be successful (same platforms as in Dependencies)<br />
* '''run-cppcheck''': whether to run [http://cppcheck.net/ cppcheck linting] for static analysis<br />
* '''cppcheck-arguments''': options that can be passed to cppcheck<br />
* '''cppcheck-ignore-files''': which directories/files cppcheck should ignore<br />
* '''run-gcovr''': whether to run [https://gcovr.com/en/stable/ gcovr] for checking code coverage<br />
* '''gcovr-arguments''': options that can be passed to gcovr<br />
* '''json-validate-ignore''': which directories/files [https://invent.kde.org/sysadmin/ci-utilities/-/blob/master/gitlab-templates/json-validation.yml json-validation] should ignore<br />
* '''json-validate-include''': which directories/files validate-json-files should include that do not have the <code>.json</code> file extension<br />
<br />
=== Examples ===<br />
<br />
==== All platforms ====<br />
<br />
Here is an example copied from Okular, which is built for all platforms available:<br />
<br />
{{bc-hl|lang=yaml|code=<br />
# SPDX-FileCopyrightText: None<br />
# SPDX-License-Identifier: CC0-1.0<br />
<br />
Dependencies:<br />
- 'on': ['@all']<br />
'require':<br />
'frameworks/kbookmarks': '@stable'<br />
'frameworks/threadweaver': '@stable'<br />
'frameworks/ki18n': '@stable'<br />
'frameworks/kio': '@stable'<br />
'frameworks/karchive': '@stable'<br />
'libraries/phonon': '@stable'<br />
'graphics/kdegraphics-mobipocket': '@same'<br />
<br />
- 'on': ['Linux', 'FreeBSD', 'Windows']<br />
'require':<br />
'frameworks/khtml': '@stable'<br />
'frameworks/purpose': '@stable'<br />
'frameworks/breeze-icons': '@stable'<br />
'graphics/libkexiv2': '@same'<br />
<br />
- 'on': ['Linux', 'FreeBSD']<br />
'require':<br />
'frameworks/kactivities': '@stable'<br />
'frameworks/kpty': '@stable'<br />
<br />
- 'on': ['Android']<br />
'require':<br />
'frameworks/kirigami': '@stable'<br />
<br />
Options:<br />
cppcheck-arguments: '--enable=warning,style,performance -DOKULAR_EXPORT_PLUGIN'<br />
cppcheck-ignore-files:<br />
- autotests<br />
}}<br />
<br />
==== KF5 + KF6 ====<br />
<br />
And an example copied from Konsole, which at this moment builds against KF5 and KF6:<br />
<br />
{{bc-hl|lang=yaml|code=<br />
# SPDX-FileCopyrightText: None<br />
# SPDX-License-Identifier: CC0-1.0<br />
<br />
Dependencies:<br />
- 'on': ['Linux/Qt5', 'FreeBSD/Qt5', 'Windows/Qt5']<br />
'require':<br />
'frameworks/extra-cmake-modules': '@stable'<br />
'frameworks/kconfig': '@stable'<br />
'frameworks/knotifications': '@stable'<br />
'frameworks/ki18n': '@stable'<br />
'frameworks/kcoreaddons': '@stable'<br />
'frameworks/kdbusaddons': '@stable'<br />
'frameworks/kbookmarks': '@stable'<br />
'frameworks/kconfigwidgets': '@stable'<br />
'frameworks/kcrash': '@stable'<br />
'frameworks/kguiaddons': '@stable'<br />
'frameworks/kiconthemes': '@stable'<br />
'frameworks/kio': '@stable'<br />
'frameworks/knewstuff': '@stable'<br />
'frameworks/knotifyconfig': '@stable'<br />
'frameworks/kparts': '@stable'<br />
'frameworks/kservice': '@stable'<br />
'frameworks/ktextwidgets': '@stable'<br />
'frameworks/kwidgetsaddons': '@stable'<br />
'frameworks/kwindowsystem': '@stable'<br />
'frameworks/kxmlgui': '@stable'<br />
'frameworks/kdoctools': '@stable'<br />
<br />
- 'on': ['Linux/Qt6', 'FreeBSD/Qt6', 'Windows/Qt6']<br />
'require':<br />
'frameworks/extra-cmake-modules': '@latest-kf6'<br />
'frameworks/kconfig': '@latest-kf6'<br />
'frameworks/knotifications': '@latest-kf6'<br />
'frameworks/ki18n': '@latest-kf6'<br />
'frameworks/kcoreaddons': '@latest-kf6'<br />
'frameworks/kdbusaddons': '@latest-kf6'<br />
'frameworks/kbookmarks': '@latest-kf6'<br />
'frameworks/kconfigwidgets': '@latest-kf6'<br />
'frameworks/kcrash': '@latest-kf6'<br />
'frameworks/kguiaddons': '@latest-kf6'<br />
'frameworks/kiconthemes': '@latest-kf6'<br />
'frameworks/kio': '@latest-kf6'<br />
'frameworks/knewstuff': '@latest-kf6'<br />
'frameworks/knotifyconfig': '@latest-kf6'<br />
'frameworks/kparts': '@latest-kf6'<br />
'frameworks/kservice': '@latest-kf6'<br />
'frameworks/ktextwidgets': '@latest-kf6'<br />
'frameworks/kwidgetsaddons': '@latest-kf6'<br />
'frameworks/kwindowsystem': '@latest-kf6'<br />
'frameworks/kxmlgui': '@latest-kf6'<br />
'frameworks/kdoctools': '@latest-kf6'<br />
<br />
- 'on': ['Linux/Qt5', 'FreeBSD/Qt5']<br />
'require':<br />
'frameworks/kpty': '@stable'<br />
'frameworks/kglobalaccel': '@stable'<br />
<br />
- 'on': ['Linux/Qt6', 'FreeBSD/Qt6']<br />
'require':<br />
'frameworks/kpty': '@latest-kf6'<br />
'frameworks/kglobalaccel': '@latest-kf6'<br />
<br />
Options:<br />
require-passing-tests-on: [ 'Linux', 'FreeBSD/Qt6' ]<br />
}}<br />
<br />
==== Warning free code ====<br />
<br />
{{bc-hl|lang=yaml|code=<br />
Options:<br />
cmake-options: '-DCMAKE_COMPILE_WARNING_AS_ERROR=ON'<br />
}}<br />
<br />
== History for archiving reasons ==<br />
<br />
* Until 2020, KDE used [https://www.jenkins.io/ Jenkins] for its infrastructure, namely over https://build.kde.org and https://binary-factory.kde.org, as described in the [https://community.kde.org/index.php?title=Infrastructure/Continuous_Integration_System&oldid=94998 previous history of this page].<br />
* KDE [https://dot.kde.org/2020/06/30/kdes-gitlab-now-live migrated to Gitlab] in 2020.<br />
* The KDE system administration [https://mail.kde.org/pipermail/kde-frameworks-devel/2021-September/118851.html starts integrating the Gitlab CI workflow with repo-metadata by adding .kde-ci.yml files] to KDE Frameworks in September 2021.<br />
* In October of the same year, it's [https://mail.kde.org/pipermail/kde-frameworks-devel/2021-September/119121.html officially rolled out for all projects], with only Linux builds currently available.<br />
* https://build.kde.org is [https://mail.kde.org/pipermail/kde-devel/2022-September/001270.html retired] in September 2022.<br />
* In October of the same year, there was some [https://mail.kde.org/pipermail/kde-devel/2022-October/001401.html clarification on the roles of CI and CD under KDE infrastructure] in the mailing lists.</div>Skierpagehttps://community.kde.org/index.php?title=Baloo&diff=99351Baloo2023-11-29T06:58:30Z<p>Skierpage: add section for user documentation, link to the project's docs/user/searching.md page</p>
<hr />
<div>[[File:Mascot konqi-support-search.png|thumbnail|right|Help [[Konqi]] find what he wants!]]<br />
Baloo is the file indexing and file search framework for KDE Plasma, with a focus on providing a very small memory footprint along with with extremely fast searching.<br />
<br />
== User documentation ==<br />
<br />
[https://github.com/KDE/baloo/blob/master/docs/user/searching.md User documentation] for search types and document properties that Baloo indexes<br />
<br />
== Ways to communicate ==<br />
:Mailing List: kde-devel@kde.org ([https://mail.kde.org/mailman/listinfo/kde-devel info page])<br />
:IRC Channel: [https://web.libera.chat/ #kde-devel on Libera Chat]<br />
:Phabricator project: https://phabricator.kde.org/project/view/261<br />
<br />
== Top bugs and feature requests ==<br />
'''Bugs:''' https://bugs.kde.org/buglist.cgi?bug_severity=critical&bug_severity=grave&bug_severity=major&bug_severity=crash&bug_severity=normal&bug_severity=minor&bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=ASSIGNED&bug_status=REOPENED&list_id=1629910&priority=VHI&priority=HI&product=frameworks-baloo&query_format=advanced<br />
<br/><br/><br />
'''Feature requests:''' https://bugs.kde.org/buglist.cgi?bug_severity=wishlist&bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=ASSIGNED&bug_status=REOPENED&list_id=1629911&priority=VHI&priority=HI&product=frameworks-baloo&query_format=advanced<br />
<br />
== Indexing limitations ==<br />
Baloo uses the file metadata extractors in [https://invent.kde.org/frameworks/kfilemetadata KFileMetadata] to get information about each file it indexes.<br />
This means for a file's content to be indexed<br />
* the file must have a recognizable MIME type<br />
* KDE must have an extractor for that MIME type. Use the command-line utility <code>kmimetypefinder5</code> to determine a file's mime type.<br />
** Due to a [https://gitlab.gnome.org/GNOME/glib/-/issues/2511#note_1293471 glib bug], the MIME type of HTML files can change from <code>text/html</code> to <code>application/x-extension-html</code>. The KDE file metadata extractors don't recognize the latter. That bug has a workaround to reset the MIME types to the usual values.<br />
* KFileMetadata uses the aging utilities <code>catdoc</code>, <code>xls2csv</code>, <code>catppt</code> to index content of files using the Microsoft Office Word, Excel, and PowerPoint file formats ([https://invent.kde.org/frameworks/kfilemetadata/-/blob/master/src/extractors/officeextractor.cpp#L20 source]), and these utilities have undocumented limitations ([https://bugs.kde.org/show_bug.cgi?id=438455 bug 438455]).<br />
** [http://www.wagner.pp.ru/~vitus/software/catdoc/ catdoc home page]<br />
** [https://bugs.debian.org/cgi-bin/pkgreport.cgi?repeatmerged=no&src=catdoc Debian's bug list for catdoc]; [https://bugzilla.redhat.com/buglist.cgi?quicksearch=catdoc RedHat's bug list for catdoc]<br />
* KFileMetadata does not index file names or file contents in ZIP archives.<br />
* KFileMetadata does not index the contents of Open Document Format files that are ZIP archives, nor does it index "flat" Open Document Format files that are complex XML files.<br />
<br />
Other limitations:<br />
* Baloo doesn't index text files (those whose MIME type is detected as "text/''something''") over 10 MB ([https://invent.kde.org/frameworks/baloo/-/blob/master/src/file/extractor/app.cpp#L143 source]).<br />
* The KFileMetadata extractor for text attempts to convert text to Unicode. If the file uses another encoding, such as iso-8859-1, any file contents after the first character that is invalid in Unicode will not be indexed ([https://bugs.kde.org/show_bug.cgi?id=439857 bug 439857]). You may find the <code>-i</code> option to the <code>file</code> command-line utility useful; it tries to infer the character set of a file, e.g. <kbd>file -i ''path/to/myfile.txt''</kbd>.<br />
* If a file's modification time is January 1 1970 ("zero" in the Unix epoch) or earlier, baloo will reindex it each time it starts (or you run `balooctl check`) ([https://bugs.kde.org/show_bug.cgi?id=456108 bug 456108]), and <code>balooshow</code> will be confused about the file's "Mtime" if it is before January 1 1970. As a workaround you can change th e modification time to something after 1970, e.g. <kbd>touch -m --date=2022-01-01 path/to/myfile</kbd>.<br />
* [https://discuss.kde.org/t/how-do-i-troubleshoot-baloo/2830/12 Some users] report that baloo doesn't properly index some files extracted from zip or JAR files. A workaround is to clear them from baloo's index then reindex them. with <kbd>balooctl clear ''/path/to/file''</code> then <kbd>balooctl index ''/path/to/file''</kbd> .<br />
<br />
== Other Baloo pages here ==<br />
Information may be obsolete.<br />
{{Special:PrefixIndex/{{FULLPAGENAME}}/}}<br />
<br />
== Using Baloo ==<br />
<br />
Baloo is not an application, but a daemon to index files. Applications can use the Baloo framework to provide file search results. For example, [[Dolphin]]'s Content search can use Baloo.<br />
<br />
KDE System Settings > File Search provides an [http://vhanda.in/blog/2014/04/desktop-search-configuration/ intentionally limited number of settings]. You can make additional adjustments in [[Baloo/Configuration | Baloo's configuration file]].<br />
<br />
== balooctl ==<br />
<br />
<code>balooctl</code> is a CLI command to perform certain operations on Baloo. Enter <code>balooctl --help</code> in a terminal app such as [[userbase:Konsole]] to list its available subcommands.<br />
<br />
See also [[Baloo/Debugging]].</div>Skierpagehttps://community.kde.org/index.php?title=Baloo/Debugging&diff=99350Baloo/Debugging2023-11-29T01:50:54Z<p>Skierpage: /* Baloo is consuming too much CPU / RAM / Disk IO ? */ add new section with tips</p>
<hr />
<div>Baloo is responsible for searching through files. Given that every system is quite different, and many different files can have different results, there can be some issues with Baloo. This page aims at helping you debug what exactly is going on and how to report the issue appropriately.<br />
<br />
If you're in doubt, and not sure what is going on, please just file a bug and provide whatever information you feel may be appropriate. The developers will ask for more information and provide steps for you to follow.<br />
<br />
== Seeing debug output ==<br />
The baloo and kfilemetadata code logs (selectively prints) informative messages that may be useful using [https://doc.qt.io/qt-5/qloggingcategory.html#configuring-categories Qt's logging facility]. One way to turn on this logging (there are [[Guidelines_and_HOWTOs/Debugging/Using_Error_Messages#Controlling_Messages|many others]]) is to create or modify the file <code>$HOME/.config/QtProject/qtlogging.ini</code> and add the following lines<br />
<pre><br />
[Rules]<br />
kf.filemetadata=true<br />
kf.baloo=true<br />
</pre><br />
restart baloo and/or <kbd>balooctl monitor</kbd> and you will see these messages where log messages go on your system.<br />
<br />
== Baloo is consuming too much CPU / RAM / Disk IO ? ==<br />
The Baloo Project is responsible for many different parts of KDE. The developers need to know exactly which component is problematic. It would be best if you checked what the offending process is called.<br />
<br />
KSysGuard and Plasma System Monitor should be able to tell CPU, RAM and disk usage for baloo processes, but KSysGuard requires you to manually add disk usage columns.<br />
<br />
=== <tt>baloo_file</tt> === <br />
<br />
This process is responsible for scheduling the indexing of files and save the name of the file. If this process is consuming too much CPU or Disk IO, it's probably due to the initial indexing. Based on your hard drive speed, baloo_file is able to do somewhere between 100 to 1000 files per second. Depending on how many files you have, it could take a couple of minutes. It would be best to just wait for a couple of minutes.<br />
<br />
You can check which files are currently being scanned with <tt>balooctl monitor</tt> and the current indexing status with <tt>balooctl status</tt>.<br />
<br />
If you feel that you have been waiting for quite some time, and the <tt>baloo_file</tt> process is still consuming too much CPU or disk IO, please file a bug.<br />
<br />
== Baloo does not find a file ==<br />
If <kbd>baloosearch</kbd> or Dolphin Search > Content does not find a file that should be indexed, the rough steps to take in a terminal are<br />
* <kbd>balooctl status</kbd> - is Baloo running?<br />
* <kbd>balooshow -x ''/path/to/file</kbd> to see if Baloo knows about the file<br />
* Check your [[../Configuration | Baloo configuration]] to make sure you have directed Baloo to index or not index that directory<br />
* See if Baloo indexes a simple file in the same location:<br />
** Run <kbd>balooctl monitor</kbd><br />
** Create a simple file, e.g. <kbd>echo balooTestMe > ''/path/to/testfile''.txt</kbd><br />
** see if <code>testfile.txt</code> is indexed (<kbd>baloosearch balooTestMe</kbd>, try same steps above)<br />
* If baloo does not, tell it to reindex with <kbd>balooctl index ''/path/to/file''</kbd><br />
* Check the mime type of the file with <kbd>kfilemeta<br />
* Turn on debug info as described here.<br />
* Clear the file from the index with <kbd>balooctl clear ''/path/to/file''</kbd> and re-index it.<br />
* ...<br />
<br />
=== <tt>balooshow</tt> ===<br />
<br />
<tt>balooshow</tt> prints debug information about a file. <br />
<br />
$ balooshow /home/vishesh/file.jpg<br />
4 /home/vishesh/file.jpg<br />
Width: 713<br />
Height: 955<br />
Photo X Dimension: 713<br />
Photo X Dimension: 955 <br />
<br />
If <tt>baloosearch <i>search terms</i></tt> does not find a file that should match, then run <tt>balooshow -x <i>/path/to/file</i></tt> for the file which Baloo does not return. It should print information similar to what is being printed above, including the file information and terms in the file that Baloo should have indexed. If no information is printed, then please check the following<br />
<br />
* The file is not in Baloo's list of exclude folders<br />
* The <tt>baloo_file</tt> process is running.<br />
<br />
=== Find by filename ===<br />
<tt>balooshow -x</tt> displays additional information, including the terms that Dolphin's Find > by Filename search matches. For example,<br />
<br />
$ balooshow -x path/to/日本国_déjà_γενεος.txt`<br />
...<br />
File Name Terms: Fdeja Ftxt Fγενεος deja txtConfiguration γενεος<br />
<br />
If you type more than one character in the Dolphin file browser's find by Filename field, it searches these terms anchored at the start, thus searching for "de", "γε", etc. should return this file.<br />
<br />
=== <tt>baloosearch</tt> ===<br />
<br />
The Baloosearch tool can be used to perform simple searches.<br />
Configuration<br />
$ baloosearch fire<br />
77040 /home/vishesh/kde5/src/qt5/qtimageformats/tests/shared/images/mng/fire.mng<br />
237751 /home/vishesh/Videos/Catching Fire Epic Review Special Edition.mp4<br />
237788 /home/vishesh/Videos/The Hunger Games Catching Fire (2013) [1080p]<br />
237790 /home/vishesh/Videos/fire.mp4<br />
53907 /home/vishesh/kde5/src/qt5/qtwebkit/Source/WebCore/html/MediaController.cpp<br />
54051 /home/vishesh/kde5/src/qt5/qtwebkit/Source/WebCore/html/HTMLMediaElement.cpp<br />
52257 /home/vishesh/kde5/src/qt5/qtwebkit/Source/WebCore/platform/ThreadTimers.cpp<br />
52867 /home/vishesh/kde5/src/qt5/qtwebkit/Source/WebCore/loader/NavigationScheduler.cpp<br />
53568 /home/vishesh/kde5/src/qt5/qtwebkit/Source/WebCore/html/track/TrackListBase.cpp<br />
52255 /home/vishesh/kde5/src/qt5/qtwebkit/Source/WebCore/platform/Timer.cpp<br />
<br />
You should try searching for the file with this command.<br />
<br />
If the file is not found even though it is indexed, then please file a bug with the exact search term, and the relevant words in the file.<br />
<br />
== General testing procedure ==<br />
<br />
This procedure should provide you a cozy method to check if '''baloo''' is experiencing issues as well as files to attach to your bug reports. It assumes you have a single file that has failed indexing for whatever reason.<br />
<br />
* Open two '''Konsole''' windows and tile one to the left (A) and the other to the right (B);<br />
* On '''Konsole''' A, run <code>balooctl monitor | tee -a baloomon.txt</code> and leave it running, this should leave a log of a full index by the end of this procedure;<br />
* On '''Konsole''' B, run <code>balooctl status</code><br />
<br />
You should get output like the following if everything has already been indexed and one file failed:<br />
{{Output|1=<nowiki><br />
Baloo File Indexer is running<br />
Indexer state: Idle<br />
Total files indexed: 1.000<br />
Files waiting for content indexing: 0<br />
Files failed to index: 1<br />
Current size of index is 10,00 MiB<br />
</nowiki>}}<br />
<br />
* If you do have a failed file, run <code>balooctl failed | tee -a baloofailed.txt</code> to show which file has failed on your terminal and append it to a file named <tt>baloofailed.txt</tt>. Then, manually check the file path and run <code>balooshow /path/to/faulty/file | tee -a baloofailed.txt</code> to append the debug information about the file;<br />
<br />
* On '''Konsole''' B, run <code>balooctl purge</code>;<br />
<br />
* See if there's anything on Konsole A running the monitor tool that seems suspicious, like if it's staggering at the failing file;<br />
<br />
* By the end, on Konsole B, run <code>balooctl status</code> again, and on Konsole A cancel the monitoring with <keycap>Ctrl+C</keycap>.<br />
<br />
Is the file still failing to index? Then the issue is consistently reproducible, please report it over https://bugs.kde.org.<br />
<br />
If the file is now indexing correctly, then it's not a consistently reproducible issue, but this might still indicate something to be worked on, requiring further reporting steps. Please report the issue over https://bugs.kde.org and follow any instructions the developers might ask of you.<br />
<br />
Remember to attach the generated files on your bug report!<br />
<br />
{{Note | If you have manually enabled the new systemd initialization, then you may also use <nowiki>journalctl --unit plasma-baloorunner --output=cat > baloojournal.txt</nowiki> to create a log file of baloo.}}<br />
<br />
=== Indexing a file directly ===<br />
Using the above technique you can copy or modify a problematic file and watch for errors. You can also run <code>balooctl clear <em>/path/to/problemfile</em></code> followed by <code>balooctl index <em>/path/to/problemfile</em></code> to force a reindex and possibly see additional debug output.<br />
<br />
== Determining content indexing duration ==<br />
<br />
Here's a simple bash script to output and log the state and date of balooctl status immediately after purging the index in order to determine how fast your files get indexed:<br />
<br />
<syntaxhighlight lang="bash" line><br />
#!/bin/bash<br />
balooctl purge &>/dev/null<br />
sleep 2<br />
balooctl status | grep -B1 "indexing" | tee balootime.txt 2>/dev/null<br />
date "+%T" | tee -a balootime.txt<br />
while sleep 2; do<br />
balooctl status | grep -B1 "indexing" | tee -a balootime.txt 2>/dev/null<br />
date "+%T" | tee -a balootime.txt<br />
done<br />
</syntaxhighlight><br />
<br />
What it does:<br />
* Purges the database<br />
* Fetches only the lines "Total files indexed" and "Files waiting for content indexing", redirecting standard output to a file named <tt>balootime.txt</tt> and removes standard error<br />
* Prints that and the current time continuously every two seconds<br />
Since it ends on a loop, you'll need to press <keycap>Ctrl+C</keycap> once "Files waiting for content indexing" reaches 0. If you have over 10,000 files, you may want to change the loop time to 5 to 15 seconds instead.<br />
<br />
For a general comparison, on a machine with an SSD and 1559 files to be indexed, immediately after a purge, 4 seconds are required to index all files (going from 0 to 1559 instantly) and 35 seconds are required to index the content of all files. These values might be different for you depending on your machine's specs, the number of total files, and their format.<br />
<br />
In case you think your indexing is taking more time than it should, please refer to the above general testing procedure to determine whether you should file a bug report.</div>Skierpagehttps://community.kde.org/index.php?title=Baloo/Tasks&diff=99349Baloo/Tasks2023-11-29T01:29:34Z<p>Skierpage: add Phabricator workboard, flag online document as potentially old</p>
<hr />
<div>* [https://phabricator.kde.org/project/board/261/ Phabricator workboard]<br />
* (old?) Living TODO list https://workflowy.com/s/RpzuMqx81r</div>Skierpagehttps://community.kde.org/index.php?title=Baloo&diff=99348Baloo2023-11-29T00:00:36Z<p>Skierpage: /* Ways to communicate */ link Libera Chat, don't know how to pre-fill a particular channel</p>
<hr />
<div>[[File:Mascot konqi-support-search.png|thumbnail|right|Help [[Konqi]] find what he wants!]]<br />
Baloo is the file indexing and file search framework for KDE Plasma, with a focus on providing a very small memory footprint along with with extremely fast searching.<br />
<br />
== Ways to communicate ==<br />
:Mailing List: kde-devel@kde.org ([https://mail.kde.org/mailman/listinfo/kde-devel info page])<br />
:IRC Channel: [https://web.libera.chat/ #kde-devel on Libera Chat]<br />
:Phabricator project: https://phabricator.kde.org/project/view/261<br />
<br />
== Top bugs and feature requests ==<br />
'''Bugs:''' https://bugs.kde.org/buglist.cgi?bug_severity=critical&bug_severity=grave&bug_severity=major&bug_severity=crash&bug_severity=normal&bug_severity=minor&bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=ASSIGNED&bug_status=REOPENED&list_id=1629910&priority=VHI&priority=HI&product=frameworks-baloo&query_format=advanced<br />
<br/><br/><br />
'''Feature requests:''' https://bugs.kde.org/buglist.cgi?bug_severity=wishlist&bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=ASSIGNED&bug_status=REOPENED&list_id=1629911&priority=VHI&priority=HI&product=frameworks-baloo&query_format=advanced<br />
<br />
== Indexing limitations ==<br />
Baloo uses the file metadata extractors in [https://invent.kde.org/frameworks/kfilemetadata KFileMetadata] to get information about each file it indexes.<br />
This means for a file's content to be indexed<br />
* the file must have a recognizable MIME type<br />
* KDE must have an extractor for that MIME type. Use the command-line utility <code>kmimetypefinder5</code> to determine a file's mime type.<br />
** Due to a [https://gitlab.gnome.org/GNOME/glib/-/issues/2511#note_1293471 glib bug], the MIME type of HTML files can change from <code>text/html</code> to <code>application/x-extension-html</code>. The KDE file metadata extractors don't recognize the latter. That bug has a workaround to reset the MIME types to the usual values.<br />
* KFileMetadata uses the aging utilities <code>catdoc</code>, <code>xls2csv</code>, <code>catppt</code> to index content of files using the Microsoft Office Word, Excel, and PowerPoint file formats ([https://invent.kde.org/frameworks/kfilemetadata/-/blob/master/src/extractors/officeextractor.cpp#L20 source]), and these utilities have undocumented limitations ([https://bugs.kde.org/show_bug.cgi?id=438455 bug 438455]).<br />
** [http://www.wagner.pp.ru/~vitus/software/catdoc/ catdoc home page]<br />
** [https://bugs.debian.org/cgi-bin/pkgreport.cgi?repeatmerged=no&src=catdoc Debian's bug list for catdoc]; [https://bugzilla.redhat.com/buglist.cgi?quicksearch=catdoc RedHat's bug list for catdoc]<br />
* KFileMetadata does not index file names or file contents in ZIP archives.<br />
* KFileMetadata does not index the contents of Open Document Format files that are ZIP archives, nor does it index "flat" Open Document Format files that are complex XML files.<br />
<br />
Other limitations:<br />
* Baloo doesn't index text files (those whose MIME type is detected as "text/''something''") over 10 MB ([https://invent.kde.org/frameworks/baloo/-/blob/master/src/file/extractor/app.cpp#L143 source]).<br />
* The KFileMetadata extractor for text attempts to convert text to Unicode. If the file uses another encoding, such as iso-8859-1, any file contents after the first character that is invalid in Unicode will not be indexed ([https://bugs.kde.org/show_bug.cgi?id=439857 bug 439857]). You may find the <code>-i</code> option to the <code>file</code> command-line utility useful; it tries to infer the character set of a file, e.g. <kbd>file -i ''path/to/myfile.txt''</kbd>.<br />
* If a file's modification time is January 1 1970 ("zero" in the Unix epoch) or earlier, baloo will reindex it each time it starts (or you run `balooctl check`) ([https://bugs.kde.org/show_bug.cgi?id=456108 bug 456108]), and <code>balooshow</code> will be confused about the file's "Mtime" if it is before January 1 1970. As a workaround you can change th e modification time to something after 1970, e.g. <kbd>touch -m --date=2022-01-01 path/to/myfile</kbd>.<br />
* [https://discuss.kde.org/t/how-do-i-troubleshoot-baloo/2830/12 Some users] report that baloo doesn't properly index some files extracted from zip or JAR files. A workaround is to clear them from baloo's index then reindex them. with <kbd>balooctl clear ''/path/to/file''</code> then <kbd>balooctl index ''/path/to/file''</kbd> .<br />
<br />
== Other Baloo pages here ==<br />
Information may be obsolete.<br />
{{Special:PrefixIndex/{{FULLPAGENAME}}/}}<br />
<br />
== Using Baloo ==<br />
<br />
Baloo is not an application, but a daemon to index files. Applications can use the Baloo framework to provide file search results. For example, [[Dolphin]]'s Content search can use Baloo.<br />
<br />
KDE System Settings > File Search provides an [http://vhanda.in/blog/2014/04/desktop-search-configuration/ intentionally limited number of settings]. You can make additional adjustments in [[Baloo/Configuration | Baloo's configuration file]].<br />
<br />
== balooctl ==<br />
<br />
<code>balooctl</code> is a CLI command to perform certain operations on Baloo. Enter <code>balooctl --help</code> in a terminal app such as [[userbase:Konsole]] to list its available subcommands.<br />
<br />
See also [[Baloo/Debugging]].</div>Skierpagehttps://community.kde.org/index.php?title=Baloo&diff=99256Baloo2023-11-17T07:04:39Z<p>Skierpage: /* Indexing limitations */ fix steps</p>
<hr />
<div>[[File:Mascot konqi-support-search.png|thumbnail|right|Help [[Konqi]] find what he wants!]]<br />
Baloo is the file indexing and file search framework for KDE Plasma, with a focus on providing a very small memory footprint along with with extremely fast searching.<br />
<br />
== Ways to communicate ==<br />
:Mailing List: kde-devel@kde.org ([https://mail.kde.org/mailman/listinfo/kde-devel info page])<br />
:IRC Channel: #kde-devel on Libera Chat<br />
:Phabricator project: https://phabricator.kde.org/project/view/261<br />
<br />
== Top bugs and feature requests ==<br />
'''Bugs:''' https://bugs.kde.org/buglist.cgi?bug_severity=critical&bug_severity=grave&bug_severity=major&bug_severity=crash&bug_severity=normal&bug_severity=minor&bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=ASSIGNED&bug_status=REOPENED&list_id=1629910&priority=VHI&priority=HI&product=frameworks-baloo&query_format=advanced<br />
<br/><br/><br />
'''Feature requests:''' https://bugs.kde.org/buglist.cgi?bug_severity=wishlist&bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=ASSIGNED&bug_status=REOPENED&list_id=1629911&priority=VHI&priority=HI&product=frameworks-baloo&query_format=advanced<br />
<br />
== Indexing limitations ==<br />
Baloo uses the file metadata extractors in [https://invent.kde.org/frameworks/kfilemetadata KFileMetadata] to get information about each file it indexes.<br />
This means for a file's content to be indexed<br />
* the file must have a recognizable MIME type<br />
* KDE must have an extractor for that MIME type. Use the command-line utility <code>kmimetypefinder5</code> to determine a file's mime type.<br />
** Due to a [https://gitlab.gnome.org/GNOME/glib/-/issues/2511#note_1293471 glib bug], the MIME type of HTML files can change from <code>text/html</code> to <code>application/x-extension-html</code>. The KDE file metadata extractors don't recognize the latter. That bug has a workaround to reset the MIME types to the usual values.<br />
* KFileMetadata uses the aging utilities <code>catdoc</code>, <code>xls2csv</code>, <code>catppt</code> to index content of files using the Microsoft Office Word, Excel, and PowerPoint file formats ([https://invent.kde.org/frameworks/kfilemetadata/-/blob/master/src/extractors/officeextractor.cpp#L20 source]), and these utilities have undocumented limitations ([https://bugs.kde.org/show_bug.cgi?id=438455 bug 438455]).<br />
** [http://www.wagner.pp.ru/~vitus/software/catdoc/ catdoc home page]<br />
** [https://bugs.debian.org/cgi-bin/pkgreport.cgi?repeatmerged=no&src=catdoc Debian's bug list for catdoc]; [https://bugzilla.redhat.com/buglist.cgi?quicksearch=catdoc RedHat's bug list for catdoc]<br />
* KFileMetadata does not index file names or file contents in ZIP archives.<br />
* KFileMetadata does not index the contents of Open Document Format files that are ZIP archives, nor does it index "flat" Open Document Format files that are complex XML files.<br />
<br />
Other limitations:<br />
* Baloo doesn't index text files (those whose MIME type is detected as "text/''something''") over 10 MB ([https://invent.kde.org/frameworks/baloo/-/blob/master/src/file/extractor/app.cpp#L143 source]).<br />
* The KFileMetadata extractor for text attempts to convert text to Unicode. If the file uses another encoding, such as iso-8859-1, any file contents after the first character that is invalid in Unicode will not be indexed ([https://bugs.kde.org/show_bug.cgi?id=439857 bug 439857]). You may find the <code>-i</code> option to the <code>file</code> command-line utility useful; it tries to infer the character set of a file, e.g. <kbd>file -i ''path/to/myfile.txt''</kbd>.<br />
* If a file's modification time is January 1 1970 ("zero" in the Unix epoch) or earlier, baloo will reindex it each time it starts (or you run `balooctl check`) ([https://bugs.kde.org/show_bug.cgi?id=456108 bug 456108]), and <code>balooshow</code> will be confused about the file's "Mtime" if it is before January 1 1970. As a workaround you can change th e modification time to something after 1970, e.g. <kbd>touch -m --date=2022-01-01 path/to/myfile</kbd>.<br />
* [https://discuss.kde.org/t/how-do-i-troubleshoot-baloo/2830/12 Some users] report that baloo doesn't properly index some files extracted from zip or JAR files. A workaround is to clear them from baloo's index then reindex them. with <kbd>balooctl clear ''/path/to/file''</code> then <kbd>balooctl index ''/path/to/file''</kbd> .<br />
<br />
== Other Baloo pages here ==<br />
Information may be obsolete.<br />
{{Special:PrefixIndex/{{FULLPAGENAME}}/}}<br />
<br />
== Using Baloo ==<br />
<br />
Baloo is not an application, but a daemon to index files. Applications can use the Baloo framework to provide file search results. For example, [[Dolphin]]'s Content search can use Baloo.<br />
<br />
KDE System Settings > File Search provides an [http://vhanda.in/blog/2014/04/desktop-search-configuration/ intentionally limited number of settings]. You can make additional adjustments in [[Baloo/Configuration | Baloo's configuration file]].<br />
<br />
== balooctl ==<br />
<br />
<code>balooctl</code> is a CLI command to perform certain operations on Baloo. Enter <code>balooctl --help</code> in a terminal app such as [[userbase:Konsole]] to list its available subcommands.<br />
<br />
See also [[Baloo/Debugging]].</div>Skierpagehttps://community.kde.org/index.php?title=Baloo&diff=99255Baloo2023-11-17T06:19:39Z<p>Skierpage: /* Indexing limitations */ mention possible zip/jar problem</p>
<hr />
<div>[[File:Mascot konqi-support-search.png|thumbnail|right|Help [[Konqi]] find what he wants!]]<br />
Baloo is the file indexing and file search framework for KDE Plasma, with a focus on providing a very small memory footprint along with with extremely fast searching.<br />
<br />
== Ways to communicate ==<br />
:Mailing List: kde-devel@kde.org ([https://mail.kde.org/mailman/listinfo/kde-devel info page])<br />
:IRC Channel: #kde-devel on Libera Chat<br />
:Phabricator project: https://phabricator.kde.org/project/view/261<br />
<br />
== Top bugs and feature requests ==<br />
'''Bugs:''' https://bugs.kde.org/buglist.cgi?bug_severity=critical&bug_severity=grave&bug_severity=major&bug_severity=crash&bug_severity=normal&bug_severity=minor&bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=ASSIGNED&bug_status=REOPENED&list_id=1629910&priority=VHI&priority=HI&product=frameworks-baloo&query_format=advanced<br />
<br/><br/><br />
'''Feature requests:''' https://bugs.kde.org/buglist.cgi?bug_severity=wishlist&bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=ASSIGNED&bug_status=REOPENED&list_id=1629911&priority=VHI&priority=HI&product=frameworks-baloo&query_format=advanced<br />
<br />
== Indexing limitations ==<br />
Baloo uses the file metadata extractors in [https://invent.kde.org/frameworks/kfilemetadata KFileMetadata] to get information about each file it indexes.<br />
This means for a file's content to be indexed<br />
* the file must have a recognizable MIME type<br />
* KDE must have an extractor for that MIME type. Use the command-line utility <code>kmimetypefinder5</code> to determine a file's mime type.<br />
** Due to a [https://gitlab.gnome.org/GNOME/glib/-/issues/2511#note_1293471 glib bug], the MIME type of HTML files can change from <code>text/html</code> to <code>application/x-extension-html</code>. The KDE file metadata extractors don't recognize the latter. That bug has a workaround to reset the MIME types to the usual values.<br />
* KFileMetadata uses the aging utilities <code>catdoc</code>, <code>xls2csv</code>, <code>catppt</code> to index content of files using the Microsoft Office Word, Excel, and PowerPoint file formats ([https://invent.kde.org/frameworks/kfilemetadata/-/blob/master/src/extractors/officeextractor.cpp#L20 source]), and these utilities have undocumented limitations ([https://bugs.kde.org/show_bug.cgi?id=438455 bug 438455]).<br />
** [http://www.wagner.pp.ru/~vitus/software/catdoc/ catdoc home page]<br />
** [https://bugs.debian.org/cgi-bin/pkgreport.cgi?repeatmerged=no&src=catdoc Debian's bug list for catdoc]; [https://bugzilla.redhat.com/buglist.cgi?quicksearch=catdoc RedHat's bug list for catdoc]<br />
* KFileMetadata does not index file names or file contents in ZIP archives.<br />
* KFileMetadata does not index the contents of Open Document Format files that are ZIP archives, nor does it index "flat" Open Document Format files that are complex XML files.<br />
<br />
Other limitations:<br />
* Baloo doesn't index text files (those whose MIME type is detected as "text/''something''") over 10 MB ([https://invent.kde.org/frameworks/baloo/-/blob/master/src/file/extractor/app.cpp#L143 source]).<br />
* The KFileMetadata extractor for text attempts to convert text to Unicode. If the file uses another encoding, such as iso-8859-1, any file contents after the first character that is invalid in Unicode will not be indexed ([https://bugs.kde.org/show_bug.cgi?id=439857 bug 439857]). You may find the <code>-i</code> option to the <code>file</code> command-line utility useful; it tries to infer the character set of a file, e.g. <kbd>file -i ''path/to/myfile.txt''</kbd>.<br />
* If a file's modification time is January 1 1970 ("zero" in the Unix epoch) or earlier, baloo will reindex it each time it starts (or you run `balooctl check`) ([https://bugs.kde.org/show_bug.cgi?id=456108 bug 456108]), and <code>balooshow</code> will be confused about the file's "Mtime" if it is before January 1 1970. As a workaround you can change th e modification time to something after 1970, e.g. <kbd>touch -m --date=2022-01-01 path/to/myfile</kbd>.<br />
* [https://discuss.kde.org/t/how-do-i-troubleshoot-baloo/2830/12 Some users] report that baloo doesn't properly index files extracted from zip or JAR files. A workaround is to clear them from baloo's index then reindex them with <kbd>balooctl clear ''/path/to/file''</code> then <kbd>balooctl clear ''/path/to/file''</kbd> .<br />
<br />
== Other Baloo pages here ==<br />
Information may be obsolete.<br />
{{Special:PrefixIndex/{{FULLPAGENAME}}/}}<br />
<br />
== Using Baloo ==<br />
<br />
Baloo is not an application, but a daemon to index files. Applications can use the Baloo framework to provide file search results. For example, [[Dolphin]]'s Content search can use Baloo.<br />
<br />
KDE System Settings > File Search provides an [http://vhanda.in/blog/2014/04/desktop-search-configuration/ intentionally limited number of settings]. You can make additional adjustments in [[Baloo/Configuration | Baloo's configuration file]].<br />
<br />
== balooctl ==<br />
<br />
<code>balooctl</code> is a CLI command to perform certain operations on Baloo. Enter <code>balooctl --help</code> in a terminal app such as [[userbase:Konsole]] to list its available subcommands.<br />
<br />
See also [[Baloo/Debugging]].</div>Skierpagehttps://community.kde.org/index.php?title=Baloo/Debugging&diff=99251Baloo/Debugging2023-11-16T06:37:10Z<p>Skierpage: document how to get debug output</p>
<hr />
<div>Baloo is responsible for searching through files. Given that every system is quite different, and many different files can have different results, there can be some issues with Baloo. This page aims at helping you debug what exactly is going on and how to report the issue appropriately.<br />
<br />
If you're in doubt, and not sure what is going on, please just file a bug and provide whatever information you feel may be appropriate. The developers will ask for more information and provide steps for you to follow.<br />
<br />
== Seeing debug output ==<br />
The baloo and kfilemetadata code logs (selectively prints) informative messages that may be useful using [https://doc.qt.io/qt-5/qloggingcategory.html#configuring-categories Qt's logging facility]. One way to turn on this logging (there are [[Guidelines_and_HOWTOs/Debugging/Using_Error_Messages#Controlling_Messages|many others]]) is to create or modify the file <code>$HOME/.config/QtProject/qtlogging.ini</code> and add the following lines<br />
<pre><br />
[Rules]<br />
kf.filemetadata=true<br />
kf.baloo=true<br />
</pre><br />
restart baloo and/or <kbd>balooctl monitor</kbd> and you will see these messages where log messages go on your system.<br />
<br />
== Baloo is consuming too much CPU / RAM / Disk IO ? ==<br />
The Baloo Project is responsible for many different parts of KDE. The developers need to know exactly which component is problematic. It would be best if you checked what the offending process is called.<br />
<br />
KSysGuard and Plasma System Monitor should be able to tell CPU, RAM and disk usage for baloo processes, but KSysGuard requires you to manually add disk usage columns.<br />
<br />
=== <tt>baloo_file</tt> === <br />
<br />
This process is responsible for scheduling the indexing of files and save the name of the file. If this process is consuming too much CPU or Disk IO, it's probably due to the initial indexing. Based on your hard drive speed, baloo_file is able to do somewhere between 100 to 1000 files per second. Depending on how many files you have, it could take a couple of minutes. It would be best to just wait for a couple of minutes.<br />
<br />
You can check which files are currently being scanned with <tt>balooctl monitor</tt> and the current indexing status with <tt>balooctl status</tt>.<br />
<br />
If you feel that you have been waiting for quite some time, and the <tt>baloo_file</tt> process is still consuming too much CPU or disk IO, please file a bug.<br />
<br />
<br />
=== <tt>balooshow</tt> ===<br />
<br />
<tt>balooshow</tt>prints debug information about a file. <br />
<br />
$ balooshow /home/vishesh/file.jpg<br />
4 /home/vishesh/file.jpg<br />
Width: 713<br />
Height: 955<br />
Photo X Dimension: 713<br />
Photo X Dimension: 955 <br />
<br />
If <tt>baloosearch <i>search terms</i></tt> does not find a file that should match, then run <tt>balooshow -x <i>/path/to/file</i></tt> for the file which Baloo does not return. It should print information similar to what is being printed above, including the file information and terms in the file that Baloo should have indexed. If no information is printed, then please check the following<br />
<br />
* The file is not in Baloo's list of exclude folders<br />
* The <tt>baloo_file</tt> process is running.<br />
<br />
=== Find by filename ===<br />
<tt>balooshow -x</tt> displays additional information, including the terms that Dolphin's Find > by Filename search matches. For example,<br />
<br />
$ balooshow -x path/to/日本国_déjà_γενεος.txt`<br />
...<br />
File Name Terms: Fdeja Ftxt Fγενεος deja txt γενεος<br />
<br />
If you type more than one character in the Dolphin file browser's find by Filename field, it searches these terms anchored at the start, thus searching for "de", "γε", etc. should return this file.<br />
<br />
=== <tt>baloosearch</tt> ===<br />
<br />
The Baloosearch tool can be used to perform simple searches.<br />
<br />
$ baloosearch fire<br />
77040 /home/vishesh/kde5/src/qt5/qtimageformats/tests/shared/images/mng/fire.mng<br />
237751 /home/vishesh/Videos/Catching Fire Epic Review Special Edition.mp4<br />
237788 /home/vishesh/Videos/The Hunger Games Catching Fire (2013) [1080p]<br />
237790 /home/vishesh/Videos/fire.mp4<br />
53907 /home/vishesh/kde5/src/qt5/qtwebkit/Source/WebCore/html/MediaController.cpp<br />
54051 /home/vishesh/kde5/src/qt5/qtwebkit/Source/WebCore/html/HTMLMediaElement.cpp<br />
52257 /home/vishesh/kde5/src/qt5/qtwebkit/Source/WebCore/platform/ThreadTimers.cpp<br />
52867 /home/vishesh/kde5/src/qt5/qtwebkit/Source/WebCore/loader/NavigationScheduler.cpp<br />
53568 /home/vishesh/kde5/src/qt5/qtwebkit/Source/WebCore/html/track/TrackListBase.cpp<br />
52255 /home/vishesh/kde5/src/qt5/qtwebkit/Source/WebCore/platform/Timer.cpp<br />
<br />
You should try searching for the file with this command.<br />
<br />
If the file is not found even though it is indexed, then please file a bug with the exact search term, and the relevant words in the file.<br />
<br />
== General testing procedure ==<br />
<br />
This procedure should provide you a cozy method to check if '''baloo''' is experiencing issues as well as files to attach to your bug reports. It assumes you have a single file that has failed indexing for whatever reason.<br />
<br />
* Open two '''Konsole''' windows and tile one to the left (A) and the other to the right (B);<br />
* On '''Konsole''' A, run <code>balooctl monitor | tee -a baloomon.txt</code> and leave it running, this should leave a log of a full index by the end of this procedure;<br />
* On '''Konsole''' B, run <code>balooctl status</code><br />
<br />
You should get output like the following if everything has already been indexed and one file failed:<br />
{{Output|1=<nowiki><br />
Baloo File Indexer is running<br />
Indexer state: Idle<br />
Total files indexed: 1.000<br />
Files waiting for content indexing: 0<br />
Files failed to index: 1<br />
Current size of index is 10,00 MiB<br />
</nowiki>}}<br />
<br />
* If you do have a failed file, run <code>balooctl failed | tee -a baloofailed.txt</code> to show which file has failed on your terminal and append it to a file named <tt>baloofailed.txt</tt>. Then, manually check the file path and run <code>balooshow /path/to/faulty/file | tee -a baloofailed.txt</code> to append the debug information about the file;<br />
<br />
* On '''Konsole''' B, run <code>balooctl purge</code>;<br />
<br />
* See if there's anything on Konsole A running the monitor tool that seems suspicious, like if it's staggering at the failing file;<br />
<br />
* By the end, on Konsole B, run <code>balooctl status</code> again, and on Konsole A cancel the monitoring with <keycap>Ctrl+C</keycap>.<br />
<br />
Is the file still failing to index? Then the issue is consistently reproducible, please report it over https://bugs.kde.org.<br />
<br />
If the file is now indexing correctly, then it's not a consistently reproducible issue, but this might still indicate something to be worked on, requiring further reporting steps. Please report the issue over https://bugs.kde.org and follow any instructions the developers might ask of you.<br />
<br />
Remember to attach the generated files on your bug report!<br />
<br />
{{Note | If you have manually enabled the new systemd initialization, then you may also use <nowiki>journalctl --unit plasma-baloorunner --output=cat > baloojournal.txt</nowiki> to create a log file of baloo.}}<br />
<br />
=== Indexing a file directly ===<br />
Using the above technique you can copy or modify a problematic file and watch for errors. You can also run <code>balooctl clear <em>/path/to/problemfile</em></code> followed by <code>balooctl index <em>/path/to/problemfile</em></code> to force a reindex and possibly see additional debug output.<br />
<br />
== Determining content indexing duration ==<br />
<br />
Here's a simple bash script to output and log the state and date of balooctl status immediately after purging the index in order to determine how fast your files get indexed:<br />
<br />
<syntaxhighlight lang="bash" line><br />
#!/bin/bash<br />
balooctl purge &>/dev/null<br />
sleep 2<br />
balooctl status | grep -B1 "indexing" | tee balootime.txt 2>/dev/null<br />
date "+%T" | tee -a balootime.txt<br />
while sleep 2; do<br />
balooctl status | grep -B1 "indexing" | tee -a balootime.txt 2>/dev/null<br />
date "+%T" | tee -a balootime.txt<br />
done<br />
</syntaxhighlight><br />
<br />
What it does:<br />
* Purges the database<br />
* Fetches only the lines "Total files indexed" and "Files waiting for content indexing", redirecting standard output to a file named <tt>balootime.txt</tt> and removes standard error<br />
* Prints that and the current time continuously every two seconds<br />
Since it ends on a loop, you'll need to press <keycap>Ctrl+C</keycap> once "Files waiting for content indexing" reaches 0. If you have over 10,000 files, you may want to change the loop time to 5 to 15 seconds instead.<br />
<br />
For a general comparison, on a machine with an SSD and 1559 files to be indexed, immediately after a purge, 4 seconds are required to index all files (going from 0 to 1559 instantly) and 35 seconds are required to index the content of all files. These values might be different for you depending on your machine's specs, the number of total files, and their format.<br />
<br />
In case you think your indexing is taking more time than it should, please refer to the above general testing procedure to determine whether you should file a bug report.</div>Skierpagehttps://community.kde.org/index.php?title=Baloo/Architecture&diff=99250Baloo/Architecture2023-11-16T03:00:45Z<p>Skierpage: remove Nepomuk section, mention it earlier with better outdated link</p>
<hr />
<div>Baloo is a metadata and search framework by KDE.<br />
<br />
Baloo focuses on providing a very small memory footprint along with with extremely fast searching. It also supports storing additional file based metadata via extended attributes.<br />
<br />
* '''Mailing List: ''' kde-devel@kde.org<br />
* '''IRC Channel:''' #kde-baloo on freenode<br />
<br />
== Architecture ==<br />
{{Remember|2=Outdated architecture|1=The architecture evolved and Baloo is '''only''' a file indexer. The reference to PIM resources (emails, contacts) is historical. KDE PIM uses its own indexing system, which has a similar architecture.}}<br />
<br />
Baloo focuses on decentralization of data and does not have any central database. At its core it is a set of 3 services:<br />
* Data Stores<br />
* Search Stores<br />
* Relations<br />
<br />
Baloo replaced Nepomuk, a more elaborate semantic search system and ontology. There may still be information about the older project in [[techbase::Projects/Nepomuk]].<br />
<br />
=== Data Store ===<br />
A Data Store is a place to permanently store data. Its format and APIs are not dictated by Baloo and can be in any way that is most efficient for the data in question.<br />
<br />
=== Search Store ===<br />
A Search Store is a plugin which provides search capabilities for a specific kind of data. Each of these stores provide a plugin which can be used to search through the data using a consistent API. At this moment there are 3 search stores that have been implemented -<br />
<br />
* File Search<br />
* Email Search<br />
* Contact Search<br />
<br />
<br />
Each Store can also provide custom APIs for searching the data.<br />
<br />
=== Relations ===<br />
Baloo can be used to create relations between two uniquely identifiable identifiers. The key aspect is that when creating a relation between A and B, both of them are uniquely identifiable. For most of the PIM data, Akonadi already provides a unique identifier of the 'akonadi:?item=x'. For File data, Baloo provides unique identifiers of the form 'file:x'.<br />
<br />
Each relation is stored in an independent store in the desired mechanism. A sample sqlite implementation is provided which maps both the identifiers in a 2 column sqlite database.<br />
<br />
For example, there exists a TagRelation which maps a Tag and any unique identifier. Similarly, there can be an ActivityRelation, and relations for other aspects such as mapping a file received via Bluetooth to a Bluetooth device.<br />
<br />
== Implementation ==<br />
=== Files ===<br />
Baloo concentrates heavily on files and provides both a data store and search store for files. These are stored using a combination of sqlite and xapian.<br />
<br />
=== Akonadi ===<br />
In the case of PIM, since Akonadi already stores (caches) the data, only a Search Store is required. There are currently separate search stores for contacts and emails. They are both implemented using Xapian.<br />
<br />
=== Tags ===<br />
Tags are stored in a custom format. In order to relate tags with files / email, a TagRelation is provided.<br />
<br />
=== Baloo and extended attributes ===<br />
:''[https://userbase.kde.org/Baloo#Baloo_and_extended_attributes See the Baloo page on the Userbase wiki]</div>Skierpagehttps://community.kde.org/index.php?title=Solid/Projects/ScreenManagement&diff=95689Solid/Projects/ScreenManagement2023-01-26T02:05:46Z<p>Skierpage: /* Debugging Information */ motivate kscreen-console, note it doesn't work under Wayland</p>
<hr />
<div>{{SolidProject |<br />
<br />
description=KScreen is the new screen management software for KDE Plasma Workspaces which tries to be as magic and automatic as possible for users with basic needs and easy to configure for those who want special setups.<br />
<br />
The project is composed of a few components:<br />
*KDED Module: Saving and restoring configurations<br />
*KCM Module: Freely configure setups for each set of connected/plugged screens.<br />
*kscreen-console: Debugging tool|<br />
<br />
projectStatus=KScreen is part of the Plasma Desktop.|<br />
<br />
documentation=Currently we're lacking a good End user documentation, help is needed. |<br />
<br />
howToCollaborate=KScreen is a KDE project, so we use the usual ways to communicate to each other and to work together (reviewboard, mailist, irc)| <br />
<br />
projectPage = KScreen is currently located in<br />
[https://projects.kde.org/projects/playground/base/kscreen playground/base] and libkscreen in [https://projects.kde.org/projects/playground/libs/libkscreen playground/libs] |<br />
}}<br />
<br />
==Debugging Information==<br />
We can't fix bugs if we don't have the needed information to diagnose the problem, so please provide the following information with your bug report:<br />
<br />
Create a script with the following content:<br />
<br />
#!/bin/sh<br />
export KSCREEN_LOGGING=1<br />
export QT_MESSAGE_PATTERN="[%{time hh::mm:s.zzz}] %{function}: %{message}"<br />
<br />
And add it in a script in ~/.config/plasma-workspace/env (don't forget to make the script executable!). This will create a log file in ~/.local/share/kscreen/kscreen.log with relevant debugging information. If you don't have kscreen.log, then fix this, first.<br />
<br />
Enable debugging output by opening ~/.config/QtProject/qtlogging.ini (if the file doesn't exist, create it) and make sure you have the following in it:<br />
<br />
[Rules]<br />
kscreen.*=true<br />
<br />
The output of:<br />
kscreen-console bug<br />
may be helpful (but as of January 2023 it does not work under Wayland, {{bug|464835}}).<br />
<br />
If your bug is related to the SystemSettings module, please reproduce the bug while executing in a terminal:<br />
kcmshell5 kcm_kscreen<br />
<br />
If your bug is related to how KScreen reacts to certain events (for example you plug your monitor and nothing happens), execute the following in a terminal and reproduce the bug:<br />
<br />
export QT_MESSAGE_PATTERN="[%{time hh::mm:s.zzz}] %{function}: %{message}"<br />
kquitapp kded<br />
kded5<br />
<br />
This adds timestamps to the debugging output and then restarts the kded5 daemon. kded5 loads a kscreen plugin that restores a screen setup from the configuration and reacts to hardware changes, suspending, etc..<br />
<br />
These configuration files contains screen configurations, please attach the files located in <br />
<br />
~/.local/share/kscreen/* <br />
<br />
These are files with long hashnames that contain information about your screen setup. The filenames are relevant, please don't rename them. These configuration files contain the setup for different combinations of outputs, the files are picked based on connected displays (you can see that in the output of kded5 above).</div>Skierpagehttps://community.kde.org/index.php?title=Baloo&diff=95265Baloo2022-11-23T22:22:49Z<p>Skierpage: /* Indexing limitations */ catdoc home page</p>
<hr />
<div>[[File:Mascot konqi-support-search.png|thumbnail|right|Help [[Konqi]] find what he wants!]]<br />
Baloo is the file indexing and file search framework for KDE Plasma, with a focus on providing a very small memory footprint along with with extremely fast searching.<br />
<br />
== Ways to communicate ==<br />
:Mailing List: kde-devel@kde.org ([https://mail.kde.org/mailman/listinfo/kde-devel info page])<br />
:IRC Channel: #kde-devel on Libera Chat<br />
:Phabricator project: https://phabricator.kde.org/project/view/261<br />
<br />
== Top bugs and feature requests ==<br />
'''Bugs:''' https://bugs.kde.org/buglist.cgi?bug_severity=critical&bug_severity=grave&bug_severity=major&bug_severity=crash&bug_severity=normal&bug_severity=minor&bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=ASSIGNED&bug_status=REOPENED&list_id=1629910&priority=VHI&priority=HI&product=frameworks-baloo&query_format=advanced<br />
<br/><br/><br />
'''Feature requests:''' https://bugs.kde.org/buglist.cgi?bug_severity=wishlist&bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=ASSIGNED&bug_status=REOPENED&list_id=1629911&priority=VHI&priority=HI&product=frameworks-baloo&query_format=advanced<br />
<br />
== Indexing limitations ==<br />
Baloo uses the file metadata extractors in [https://invent.kde.org/frameworks/kfilemetadata KFileMetadata] to get information about each file it indexes.<br />
This means for a file's content to be indexed<br />
* the file must have a recognizable MIME type<br />
* KDE must have an extractor for that MIME type. Use the command-line utility <code>kmimetypefinder5</code> to determine a file's mime type.<br />
** Due to a [https://gitlab.gnome.org/GNOME/glib/-/issues/2511#note_1293471 glib bug], the MIME type of HTML files can change from <code>text/html</code> to <code>application/x-extension-html</code>. The KDE file metadata extractors don't recognize the latter. That bug has a workaround to reset the MIME types to the usual values.<br />
* KFileMetadata uses the aging utilities <code>catdoc</code>, <code>xls2csv</code>, <code>catppt</code> to index content of files using the Microsoft Office Word, Excel, and PowerPoint file formats ([https://invent.kde.org/frameworks/kfilemetadata/-/blob/master/src/extractors/officeextractor.cpp#L20 source]), and these utilities have undocumented limitations ([https://bugs.kde.org/show_bug.cgi?id=438455 bug 438455]).<br />
** [http://www.wagner.pp.ru/~vitus/software/catdoc/ catdoc home page]<br />
** [https://bugs.debian.org/cgi-bin/pkgreport.cgi?repeatmerged=no&src=catdoc Debian's bug list for catdoc]; [https://bugzilla.redhat.com/buglist.cgi?quicksearch=catdoc RedHat's bug list for catdoc]<br />
* KFileMetadata does not index file names or file contents in ZIP archives.<br />
* KFileMetadata does not index the contents of Open Document Format files that are ZIP archives, nor does it index "flat" Open Document Format files that are complex XML files.<br />
<br />
Other limitations:<br />
* Baloo doesn't index text files (those whose MIME type is detected as "text/''something''") over 10 MB ([https://invent.kde.org/frameworks/baloo/-/blob/master/src/file/extractor/app.cpp#L143 source]).<br />
* The KFileMetadata extractor for text attempts to convert text to Unicode. If the file uses another encoding, such as iso-8859-1, any file contents after the first character that is invalid in Unicode will not be indexed ([https://bugs.kde.org/show_bug.cgi?id=439857 bug 439857]). You may find the <code>-i</code> option to the <code>file</code> command-line utility useful; it tries to infer the character set of a file, e.g. <kbd>file -i ''path/to/myfile.txt''</kbd>.<br />
* If a file's modification time is January 1 1970 ("zero" in the Unix epoch) or earlier, baloo will reindex it each time it starts (or you run `balooctl check`) ([https://bugs.kde.org/show_bug.cgi?id=456108 bug 456108]), and <code>balooshow</code> will be confused about the file's "Mtime" if it is before January 1 1970. As a workaround you can change th e modification time to something after 1970, e.g. <kbd>touch -m --date=2022-01-01 path/to/myfile</kbd>.<br />
<br />
== Other Baloo pages here ==<br />
Information may be obsolete.<br />
{{Special:PrefixIndex/{{FULLPAGENAME}}/}}<br />
<br />
== Using Baloo ==<br />
<br />
Baloo is not an application, but a daemon to index files. Applications can use the Baloo framework to provide file search results. For example, [[Dolphin]]'s Content search can use Baloo.<br />
<br />
KDE System Settings > File Search provides an [http://vhanda.in/blog/2014/04/desktop-search-configuration/ intentionally limited number of settings]. You can make additional adjustments in [[Baloo/Configuration | Baloo's configuration file]].<br />
<br />
== balooctl ==<br />
<br />
<code>balooctl</code> is a CLI command to perform certain operations on Baloo. Enter <code>balooctl --help</code> in a terminal app such as [[userbase:Konsole]] to list its available subcommands.<br />
<br />
See also [[Baloo/Debugging]].</div>Skierpagehttps://community.kde.org/index.php?title=Baloo&diff=95264Baloo2022-11-23T22:20:51Z<p>Skierpage: /* Indexing limitations */ simpler RedHat bug search for catdoc</p>
<hr />
<div>[[File:Mascot konqi-support-search.png|thumbnail|right|Help [[Konqi]] find what he wants!]]<br />
Baloo is the file indexing and file search framework for KDE Plasma, with a focus on providing a very small memory footprint along with with extremely fast searching.<br />
<br />
== Ways to communicate ==<br />
:Mailing List: kde-devel@kde.org ([https://mail.kde.org/mailman/listinfo/kde-devel info page])<br />
:IRC Channel: #kde-devel on Libera Chat<br />
:Phabricator project: https://phabricator.kde.org/project/view/261<br />
<br />
== Top bugs and feature requests ==<br />
'''Bugs:''' https://bugs.kde.org/buglist.cgi?bug_severity=critical&bug_severity=grave&bug_severity=major&bug_severity=crash&bug_severity=normal&bug_severity=minor&bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=ASSIGNED&bug_status=REOPENED&list_id=1629910&priority=VHI&priority=HI&product=frameworks-baloo&query_format=advanced<br />
<br/><br/><br />
'''Feature requests:''' https://bugs.kde.org/buglist.cgi?bug_severity=wishlist&bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=ASSIGNED&bug_status=REOPENED&list_id=1629911&priority=VHI&priority=HI&product=frameworks-baloo&query_format=advanced<br />
<br />
== Indexing limitations ==<br />
Baloo uses the file metadata extractors in [https://invent.kde.org/frameworks/kfilemetadata KFileMetadata] to get information about each file it indexes.<br />
This means for a file's content to be indexed<br />
* the file must have a recognizable MIME type<br />
* KDE must have an extractor for that MIME type. Use the command-line utility <code>kmimetypefinder5</code> to determine a file's mime type.<br />
** Due to a [https://gitlab.gnome.org/GNOME/glib/-/issues/2511#note_1293471 glib bug], the MIME type of HTML files can change from <code>text/html</code> to <code>application/x-extension-html</code>. The KDE file metadata extractors don't recognize the latter. That bug has a workaround to reset the MIME types to the usual values.<br />
* KFileMetadata uses the aging utilities <code>catdoc</code>, <code>xls2csv</code>, <code>catppt</code> to index content of files using the Microsoft Office Word, Excel, and PowerPoint file formats ([https://invent.kde.org/frameworks/kfilemetadata/-/blob/master/src/extractors/officeextractor.cpp#L20 source]), and these utilities have undocumented limitations ([https://bugs.kde.org/show_bug.cgi?id=438455 bug 438455]).<br />
** [https://bugs.debian.org/cgi-bin/pkgreport.cgi?repeatmerged=no&src=catdoc Debian's bug list for catdoc]; [https://bugzilla.redhat.com/buglist.cgi?quicksearch=catdoc RedHat's bug list for catdoc]<br />
* KFileMetadata does not index file names or file contents in ZIP archives.<br />
* KFileMetadata does not index the contents of Open Document Format files that are ZIP archives, nor does it index "flat" Open Document Format files that are complex XML files.<br />
<br />
Other limitations:<br />
* Baloo doesn't index text files (those whose MIME type is detected as "text/''something''") over 10 MB ([https://invent.kde.org/frameworks/baloo/-/blob/master/src/file/extractor/app.cpp#L143 source]).<br />
* The KFileMetadata extractor for text attempts to convert text to Unicode. If the file uses another encoding, such as iso-8859-1, any file contents after the first character that is invalid in Unicode will not be indexed ([https://bugs.kde.org/show_bug.cgi?id=439857 bug 439857]). You may find the <code>-i</code> option to the <code>file</code> command-line utility useful; it tries to infer the character set of a file, e.g. <kbd>file -i ''path/to/myfile.txt''</kbd>.<br />
* If a file's modification time is January 1 1970 ("zero" in the Unix epoch) or earlier, baloo will reindex it each time it starts (or you run `balooctl check`) ([https://bugs.kde.org/show_bug.cgi?id=456108 bug 456108]), and <code>balooshow</code> will be confused about the file's "Mtime" if it is before January 1 1970. As a workaround you can change th e modification time to something after 1970, e.g. <kbd>touch -m --date=2022-01-01 path/to/myfile</kbd>.<br />
<br />
== Other Baloo pages here ==<br />
Information may be obsolete.<br />
{{Special:PrefixIndex/{{FULLPAGENAME}}/}}<br />
<br />
== Using Baloo ==<br />
<br />
Baloo is not an application, but a daemon to index files. Applications can use the Baloo framework to provide file search results. For example, [[Dolphin]]'s Content search can use Baloo.<br />
<br />
KDE System Settings > File Search provides an [http://vhanda.in/blog/2014/04/desktop-search-configuration/ intentionally limited number of settings]. You can make additional adjustments in [[Baloo/Configuration | Baloo's configuration file]].<br />
<br />
== balooctl ==<br />
<br />
<code>balooctl</code> is a CLI command to perform certain operations on Baloo. Enter <code>balooctl --help</code> in a terminal app such as [[userbase:Konsole]] to list its available subcommands.<br />
<br />
See also [[Baloo/Debugging]].</div>Skierpagehttps://community.kde.org/index.php?title=Baloo&diff=95263Baloo2022-11-23T22:19:23Z<p>Skierpage: /* Indexing limitations */ link to Debian and RedHat bug lists</p>
<hr />
<div>[[File:Mascot konqi-support-search.png|thumbnail|right|Help [[Konqi]] find what he wants!]]<br />
Baloo is the file indexing and file search framework for KDE Plasma, with a focus on providing a very small memory footprint along with with extremely fast searching.<br />
<br />
== Ways to communicate ==<br />
:Mailing List: kde-devel@kde.org ([https://mail.kde.org/mailman/listinfo/kde-devel info page])<br />
:IRC Channel: #kde-devel on Libera Chat<br />
:Phabricator project: https://phabricator.kde.org/project/view/261<br />
<br />
== Top bugs and feature requests ==<br />
'''Bugs:''' https://bugs.kde.org/buglist.cgi?bug_severity=critical&bug_severity=grave&bug_severity=major&bug_severity=crash&bug_severity=normal&bug_severity=minor&bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=ASSIGNED&bug_status=REOPENED&list_id=1629910&priority=VHI&priority=HI&product=frameworks-baloo&query_format=advanced<br />
<br/><br/><br />
'''Feature requests:''' https://bugs.kde.org/buglist.cgi?bug_severity=wishlist&bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=ASSIGNED&bug_status=REOPENED&list_id=1629911&priority=VHI&priority=HI&product=frameworks-baloo&query_format=advanced<br />
<br />
== Indexing limitations ==<br />
Baloo uses the file metadata extractors in [https://invent.kde.org/frameworks/kfilemetadata KFileMetadata] to get information about each file it indexes.<br />
This means for a file's content to be indexed<br />
* the file must have a recognizable MIME type<br />
* KDE must have an extractor for that MIME type. Use the command-line utility <code>kmimetypefinder5</code> to determine a file's mime type.<br />
** Due to a [https://gitlab.gnome.org/GNOME/glib/-/issues/2511#note_1293471 glib bug], the MIME type of HTML files can change from <code>text/html</code> to <code>application/x-extension-html</code>. The KDE file metadata extractors don't recognize the latter. That bug has a workaround to reset the MIME types to the usual values.<br />
* KFileMetadata uses the aging utilities <code>catdoc</code>, <code>xls2csv</code>, <code>catppt</code> to index content of files using the Microsoft Office Word, Excel, and PowerPoint file formats ([https://invent.kde.org/frameworks/kfilemetadata/-/blob/master/src/extractors/officeextractor.cpp#L20 source]), and these utilities have undocumented limitations ([https://bugs.kde.org/show_bug.cgi?id=438455 bug 438455]).<br />
** [https://bugs.debian.org/cgi-bin/pkgreport.cgi?repeatmerged=no&src=catdoc Debian's bug list for catdoc]; [https://bugzilla.redhat.com/buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=POST&bug_status=MODIFIED&bug_status=ON_DEV&bug_status=ON_QA&bug_status=VERIFIED&bug_status=RELEASE_PENDING&columnlist=product%2Ccomponent%2Cassigned_to%2Cbug_status%2Cshort_desc%2Cchangeddate%2Cbug_severity&f0=OP&f1=OP&f2=product&f3=component&f4=alias&f5=short_desc&f6=status_whiteboard&f7=CP&f8=CP&j1=OR&o2=substring&o3=substring&o4=substring&o5=substring&o6=substring&order=status%2C%20assigned_to%2C%20id%2C%20&query_format=advanced&v3=catdoc RedHat's bug list for catdoc]<br />
* KFileMetadata does not index file names or file contents in ZIP archives.<br />
* KFileMetadata does not index the contents of Open Document Format files that are ZIP archives, nor does it index "flat" Open Document Format files that are complex XML files.<br />
<br />
Other limitations:<br />
* Baloo doesn't index text files (those whose MIME type is detected as "text/''something''") over 10 MB ([https://invent.kde.org/frameworks/baloo/-/blob/master/src/file/extractor/app.cpp#L143 source]).<br />
* The KFileMetadata extractor for text attempts to convert text to Unicode. If the file uses another encoding, such as iso-8859-1, any file contents after the first character that is invalid in Unicode will not be indexed ([https://bugs.kde.org/show_bug.cgi?id=439857 bug 439857]). You may find the <code>-i</code> option to the <code>file</code> command-line utility useful; it tries to infer the character set of a file, e.g. <kbd>file -i ''path/to/myfile.txt''</kbd>.<br />
* If a file's modification time is January 1 1970 ("zero" in the Unix epoch) or earlier, baloo will reindex it each time it starts (or you run `balooctl check`) ([https://bugs.kde.org/show_bug.cgi?id=456108 bug 456108]), and <code>balooshow</code> will be confused about the file's "Mtime" if it is before January 1 1970. As a workaround you can change th e modification time to something after 1970, e.g. <kbd>touch -m --date=2022-01-01 path/to/myfile</kbd>.<br />
<br />
== Other Baloo pages here ==<br />
Information may be obsolete.<br />
{{Special:PrefixIndex/{{FULLPAGENAME}}/}}<br />
<br />
== Using Baloo ==<br />
<br />
Baloo is not an application, but a daemon to index files. Applications can use the Baloo framework to provide file search results. For example, [[Dolphin]]'s Content search can use Baloo.<br />
<br />
KDE System Settings > File Search provides an [http://vhanda.in/blog/2014/04/desktop-search-configuration/ intentionally limited number of settings]. You can make additional adjustments in [[Baloo/Configuration | Baloo's configuration file]].<br />
<br />
== balooctl ==<br />
<br />
<code>balooctl</code> is a CLI command to perform certain operations on Baloo. Enter <code>balooctl --help</code> in a terminal app such as [[userbase:Konsole]] to list its available subcommands.<br />
<br />
See also [[Baloo/Debugging]].</div>Skierpagehttps://community.kde.org/index.php?title=Baloo&diff=94150Baloo2022-06-29T04:13:03Z<p>Skierpage: /* Indexing limitations */ add many, many more</p>
<hr />
<div>[[File:Mascot konqi-support-search.png|thumbnail|right|Help [[Konqi]] find what he wants!]]<br />
Baloo is the file indexing and file search framework for KDE Plasma, with a focus on providing a very small memory footprint along with with extremely fast searching.<br />
<br />
== Ways to communicate ==<br />
:Mailing List: kde-devel@kde.org ([https://mail.kde.org/mailman/listinfo/kde-devel info page])<br />
:IRC Channel: #kde-devel on freenode<br />
:Phabricator project: https://phabricator.kde.org/project/view/261<br />
<br />
== Top bugs and feature requests ==<br />
'''Bugs:''' https://bugs.kde.org/buglist.cgi?bug_severity=critical&bug_severity=grave&bug_severity=major&bug_severity=crash&bug_severity=normal&bug_severity=minor&bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=ASSIGNED&bug_status=REOPENED&list_id=1629910&priority=VHI&priority=HI&product=frameworks-baloo&query_format=advanced<br />
<br/><br/><br />
'''Feature requests:''' https://bugs.kde.org/buglist.cgi?bug_severity=wishlist&bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=ASSIGNED&bug_status=REOPENED&list_id=1629911&priority=VHI&priority=HI&product=frameworks-baloo&query_format=advanced<br />
<br />
== Indexing limitations ==<br />
Baloo uses the file metadata extractors in [https://invent.kde.org/frameworks/kfilemetadata KFileMetadata] to get information about each file it indexes.<br />
This means for a file's content to be indexed<br />
* the file must have a recognizable MIME type<br />
* KDE must have an extractor for that MIME type. Use the command-line utility <code>kmimetypefinder5</code> to determine a file's mime type.<br />
** Due to a [https://gitlab.gnome.org/GNOME/glib/-/issues/2511#note_1293471 glib bug], the MIME type of HTML files can change from <code>text/html</code> to <code>application/x-extension-html</code>. The KDE file metadata extractors don't recognize the latter. That bug has a workaround to reset the MIME types to the usual values.<br />
* KFileMetadata uses the aging utilities <code>catdoc</code>, <code>xls2csv</code>, <code>catppt</code> to index content of files using the Microsoft Office Word, Excel, and PowerPoint file formats ([https://invent.kde.org/frameworks/kfilemetadata/-/blob/master/src/extractors/officeextractor.cpp#L20 source]), and these utilities have undocumented limitations ([https://bugs.kde.org/show_bug.cgi?id=438455 bug 438455]).<br />
* KFileMetadata does not index file names or file contents in ZIP archives.<br />
* KFileMetadata does not index the contents of Open Document Format files that are ZIP archives, nor does it index "flat" Open Document Format files that are complex XML files.<br />
<br />
Other limitations:<br />
* Baloo doesn't index text files (those whose MIME type is detected as "text/''something''") over 10 MB ([https://invent.kde.org/frameworks/baloo/-/blob/master/src/file/extractor/app.cpp#L143 source]).<br />
* The KFileMetadata extractor for text attempts to convert text to Unicode. If the file uses another encoding, such as iso-8859-1, any file contents after the first character that is invalid in Unicode will not be indexed ([https://bugs.kde.org/show_bug.cgi?id=439857 bug 439857]). You may find the <code>-i</code> option to the <code>file</code> command-line utility useful; it tries to infer the character set of a file, e.g. <kbd>file -i ''path/to/myfile.txt''</kbd>.<br />
* If a file's modification time is January 1 1970 ("zero" in the Unix epoch) or earlier, baloo will reindex it each time it starts (or you run `balooctl check`) ([https://bugs.kde.org/show_bug.cgi?id=456108 bug 456108]), and <code>balooshow</code> will be confused about the file's "Mtime" if it is before January 1 1970. As a workaround you can change th e modification time to something after 1970, e.g. <kbd>touch -m --date=2022-01-01 path/to/myfile</kbd>.<br />
<br />
== Other Baloo pages here ==<br />
Information may be obsolete.<br />
{{Special:PrefixIndex/{{FULLPAGENAME}}/}}<br />
<br />
== Using Baloo ==<br />
<br />
Baloo is not an application, but a daemon to index files. Applications can use the Baloo framework to provide file search results. For example, [[Dolphin]]'s Content search can use Baloo.<br />
<br />
KDE System Settings > File Search provides an [http://vhanda.in/blog/2014/04/desktop-search-configuration/ intentionally limited number of settings]. You can make additional adjustments in [[Baloo/Configuration | Baloo's configuration file]].<br />
<br />
== balooctl ==<br />
<br />
<code>balooctl</code> is a CLI command to perform certain operations on Baloo. Enter <code>balooctl --help</code> in a terminal app such as [[userbase:Konsole]] to list its available subcommands.<br />
<br />
See also [[Baloo/Debugging]].</div>Skierpagehttps://community.kde.org/index.php?title=Baloo&diff=94091Baloo2022-06-17T00:14:25Z<p>Skierpage: /* Indexing limitations */ link to non-UTF-8 bug report</p>
<hr />
<div>[[File:Mascot konqi-support-search.png|thumbnail|right|Help [[Konqi]] find what he wants!]]<br />
Baloo is the file indexing and file search framework for KDE Plasma, with a focus on providing a very small memory footprint along with with extremely fast searching.<br />
<br />
== Ways to communicate ==<br />
:Mailing List: kde-devel@kde.org ([https://mail.kde.org/mailman/listinfo/kde-devel info page])<br />
:IRC Channel: #kde-devel on freenode<br />
:Phabricator project: https://phabricator.kde.org/project/view/261<br />
<br />
== Top bugs and feature requests ==<br />
'''Bugs:''' https://bugs.kde.org/buglist.cgi?bug_severity=critical&bug_severity=grave&bug_severity=major&bug_severity=crash&bug_severity=normal&bug_severity=minor&bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=ASSIGNED&bug_status=REOPENED&list_id=1629910&priority=VHI&priority=HI&product=frameworks-baloo&query_format=advanced<br />
<br/><br/><br />
'''Feature requests:''' https://bugs.kde.org/buglist.cgi?bug_severity=wishlist&bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=ASSIGNED&bug_status=REOPENED&list_id=1629911&priority=VHI&priority=HI&product=frameworks-baloo&query_format=advanced<br />
<br />
== Indexing limitations ==<br />
Baloo uses the file metadata extractors in [https://invent.kde.org/frameworks/kfilemetadata KFileMetadata] to get information about each file it indexes.<br />
This means for a file's content to be indexed<br />
* the file must have a recognizable MIME type<br />
* KDE must have an extractor for that MIME type. Use the command-line utility <code>kmimetypefinder5</code> to determine a file's mime type.<br />
** Due to a [https://gitlab.gnome.org/GNOME/glib/-/issues/2511#note_1293471 glib bug], the MIME type of HTML files can change from <code>text/html</code> to <code>application/x-extension-html</code>. The KDE file metadata extractors don't recognize the latter. That bug has a workaround to reset the MIME types to the usual values.<br />
<br />
Other limitations:<br />
* Baloo doesn't index text files (those whose MIME type is detected as "text/''something''") over 10 MB ([https://invent.kde.org/frameworks/baloo/-/blob/master/src/file/extractor/app.cpp#L143 source]).<br />
* The KFileMetadata extractor for text attempts to convert text to Unicode. If the file uses another encoding, such as iso-8859-1, any file contents after the first character that is invalid in Unicode will not be indexed ([https://bugs.kde.org/show_bug.cgi?id=439857 bug 439857]). You may find the <code>-i</code> option to the <code>file</code> command-line utility useful; it tries to infer the character set of a file, e.g. <kbd>file -i ''path/to/myfile.txt''</kbd>.<br />
<br />
== Other Baloo pages here ==<br />
Information may be obsolete.<br />
{{Special:PrefixIndex/{{FULLPAGENAME}}/}}<br />
<br />
== Using Baloo ==<br />
<br />
Baloo is not an application, but a daemon to index files. Applications can use the Baloo framework to provide file search results. For example, [[Dolphin]]'s Content search can use Baloo.<br />
<br />
KDE System Settings > File Search provides an [http://vhanda.in/blog/2014/04/desktop-search-configuration/ intentionally limited number of settings]. You can make additional adjustments in [[Baloo/Configuration | Baloo's configuration file]].<br />
<br />
== balooctl ==<br />
<br />
<code>balooctl</code> is a CLI command to perform certain operations on Baloo. Enter <code>balooctl --help</code> in a terminal app such as [[userbase:Konsole]] to list its available subcommands.<br />
<br />
See also [[Baloo/Debugging]].</div>Skierpagehttps://community.kde.org/index.php?title=Baloo/Configuration&diff=94090Baloo/Configuration2022-06-17T00:08:07Z<p>Skierpage: re-add note about having to disable/enable baloo for some changes</p>
<hr />
<div>This page documents all of the values that can be used to configure Baloo File Indexing. The config file is generally present as <code>~/.config/baloofilerc</code> for Frameworks 5 (including Plasma 5), and <code>~/.kde4/share/apps/config/baloofilerc</code> in the kdelibs 4.x world (old Plasma).<br />
<br />
Some of these changes will only take place on restarting the <tt>baloo_file</tt> process, e.g. with <kbd>balooctl disable</kbd> then <kbd>balooctl enable</kbd>.<br />
<br />
=== Enable / Disable ===<br />
[Basic Settings]<br />
Indexing-Enabled=true<br />
<br />
This can be changed to true / false.<br />
<br />
=== First Run ===<br />
[General]<br />
first run=false<br />
<br />
This `first run` config value determines if Baloo has run through the entire file system and checked every file for indexing. If you ever delete the baloo db manually, this should be set to false so that baloo scans the entire file system tree again on startup.<br />
<br />
=== Exclude Filters ===<br />
[General]<br />
exclude filters=autom4te,*.rcore,CTestTestfile.cmake,*.o,*.omf,.hg,*.m4,*.orig,.obj,moc_*.cpp,conftest,.pch,.xsession-errors*,CMakeTmpQmake,*.tmp,qrc_*.cpp,po,.svn,.histfile.*,lzo,.bzr,.git,litmain.sh,cmake_install.cmake,CMakeFiles,*.pc,*.nvram,*.elc,*.la,.moc,CMakeCache.txt,confdefs.h,*.gmo,*.csproj,*.rej,config.status,lost+found,confstat,*.pyc,_darcs,CVS,.uic,*.part,libtool,*.aux,*.po,CMakeTmp,Makefile.am,*.lo,ui_*.h,*.loT,*~,*.moc,*.vm*,*.class,core-dumps<br />
<br />
This list of patterns is run against each file in order to determine if the file should be indexed.<br />
<br />
=== Exclude Mimetypes ===<br />
[General]<br />
exclude mimetypes=text/plain, image/jpeg<br />
<br />
By default a lot of source code is not indexed<br />
<br />
=== Exclude Folders ===<br />
[General]<br />
exclude folders[$e]=$HOME/FolderA/,$HOME/FolderB/<br />
<br />
This list is comma separated and is used to check which directories should never be indexed. By default this list is empty.<br />
<br />
=== Include Folders ===<br />
[General]<br />
folders[$e]=$HOME/<br />
<br />
This list governs which folders Baloo should index recursively. By default, it will index your $HOME directory. The <code>$e</code> allows environment variable expansion. Baloo does not follow symbolic links, so give the actual paths to directories you want Baloo to index.<br />
<br />
For example, if you have a Windows drive mounted at <code>/media/Windows</code>, here is a sample line to index some common folders of user "Alice".<br />
folders[$e]=$HOME/,/media/Windows/Users/Alice/Desktop/,/media/Windows/Users/Alice/Documents/,/media/Windows/Users/Alice/Downloads/,/media/Windows/Users/Alice/Music/,/media/Windows/Users/Alice/Pictures/,/media/Windows/Users/Alice/Videos/<br />
<br />
=== Only index Files Names ===<br />
[General]<br />
only basic indexing=true<br />
<br />
This will trigger Baloo to only index the filename.<br />
<br />
== Reindexing ==<br />
After changing what Baloo indexes, you may have to make Baloo index existing files. Entering the command <kbd>balooctl check</kbd> in a terminal ''should'' make Baloo search for unindexed files and index them. If this doesn't happen, you can manually tell Baloo to index specific files with a terminal command like <kbd>balooctl index ''local/path/to/file1 path/to/file2 ...</kbd>.</div>Skierpagehttps://community.kde.org/index.php?title=User_talk:IdlesHand&diff=94089User talk:IdlesHand2022-06-17T00:07:14Z<p>Skierpage: why I added back to Baloo/Configuration</p>
<hr />
<div>== You ''do'' need to re-enable Baloo for some changes ==<br />
You removed the note made by a Baloo engineer in [[Baloo/Configuration]] "Many of these changes will only take place on restarting the baloo_file process", with the comment<br />
: removed incorrect info as balooctl does not have a stop or start command. It seems baloo_file checks the config on every call so no need to restart the process/daemon.<br />
<br />
I trust what [[User:Vhanda]] wrote, and in my experience if you change folders to index Baloo does not index the new locations until you disable and enable. So I added the note back, rephrased to use the correct <code>disable</code>/<code>enable</code> commands. Cheers -- [[User:Skierpage|Skierpage]] ([[User talk:Skierpage|talk]]) 00:07, 17 June 2022 (UTC)</div>Skierpagehttps://community.kde.org/index.php?title=Baloo/Configuration&diff=94088Baloo/Configuration2022-06-16T23:55:49Z<p>Skierpage: /* Include Folders */ mention use actual paths not symlinks</p>
<hr />
<div>This page documents all of the values that can be used to configure Baloo File Indexing. The config file is generally present as <code>~/.config/baloofilerc</code> for Frameworks 5 (including Plasma 5), and <code>~/.kde4/share/apps/config/baloofilerc</code> in the kdelibs 4.x world (old Plasma).<br />
<br />
=== Enable / Disable ===<br />
[Basic Settings]<br />
Indexing-Enabled=true<br />
<br />
This can be changed to true / false.<br />
<br />
=== First Run ===<br />
[General]<br />
first run=false<br />
<br />
This `first run` config value determines if Baloo has run through the entire file system and checked every file for indexing. If you ever delete the baloo db manually, this should be set to false so that baloo scans the entire file system tree again on startup.<br />
<br />
=== Exclude Filters ===<br />
[General]<br />
exclude filters=autom4te,*.rcore,CTestTestfile.cmake,*.o,*.omf,.hg,*.m4,*.orig,.obj,moc_*.cpp,conftest,.pch,.xsession-errors*,CMakeTmpQmake,*.tmp,qrc_*.cpp,po,.svn,.histfile.*,lzo,.bzr,.git,litmain.sh,cmake_install.cmake,CMakeFiles,*.pc,*.nvram,*.elc,*.la,.moc,CMakeCache.txt,confdefs.h,*.gmo,*.csproj,*.rej,config.status,lost+found,confstat,*.pyc,_darcs,CVS,.uic,*.part,libtool,*.aux,*.po,CMakeTmp,Makefile.am,*.lo,ui_*.h,*.loT,*~,*.moc,*.vm*,*.class,core-dumps<br />
<br />
This list of patterns is run against each file in order to determine if the file should be indexed.<br />
<br />
=== Exclude Mimetypes ===<br />
[General]<br />
exclude mimetypes=text/plain, image/jpeg<br />
<br />
By default a lot of source code is not indexed<br />
<br />
=== Exclude Folders ===<br />
[General]<br />
exclude folders[$e]=$HOME/FolderA/,$HOME/FolderB/<br />
<br />
This list is comma separated and is used to check which directories should never be indexed. By default this list is empty.<br />
<br />
=== Include Folders ===<br />
[General]<br />
folders[$e]=$HOME/<br />
<br />
This list governs which folders Baloo should index recursively. By default, it will index your $HOME directory. The <code>$e</code> allows environment variable expansion. Baloo does not follow symbolic links, so give the actual paths to directories you want Baloo to index.<br />
<br />
For example, if you have a Windows drive mounted at <code>/media/Windows</code>, here is a sample line to index some common folders of user "Alice".<br />
folders[$e]=$HOME/,/media/Windows/Users/Alice/Desktop/,/media/Windows/Users/Alice/Documents/,/media/Windows/Users/Alice/Downloads/,/media/Windows/Users/Alice/Music/,/media/Windows/Users/Alice/Pictures/,/media/Windows/Users/Alice/Videos/<br />
<br />
=== Only index Files Names ===<br />
[General]<br />
only basic indexing=true<br />
<br />
This will trigger Baloo to only index the filename.<br />
<br />
== Reindexing ==<br />
After changing what Baloo indexes, you may have to make Baloo index existing files. Entering the command <kbd>balooctl check</kbd> in a terminal ''should'' make Baloo search for unindexed files and index them. If this doesn't happen, you can manually tell Baloo to index specific files with a terminal command like <kbd>balooctl index ''local/path/to/file1 path/to/file2 ...</kbd>.</div>Skierpagehttps://community.kde.org/index.php?title=Plasma/Environment_Variables&diff=94062Plasma/Environment Variables2022-06-04T01:43:54Z<p>Skierpage: /* Available Environment Variables */ mention Userbase:Session Environment Variables</p>
<hr />
<div>= Available Environment Variables =<br />
Plasmashell supports a number of environment variables to overwrite some settings or checks. To set these variables on startup, see [[userbase:Session Environment Variables]]. The following variables are supported:<br />
<br />
=DEBUGGING=<br />
<br />
==PLASMA_TRACK_STARTUP==<br />
Tracks startup time in a log file in /tmp<br />
<br />
==PLASMA_PRELOAD_POLICY==<br />
whether we want to preload the popups of all plasmoids in the session<br />
can have 3 values (case insensitive)<br />
* "none": never preload popups<br />
* "adaptive": preload popups of most frequently used plasmoids<br />
* "aggressive" preload popups of every plasmoid<br />
<br />
==PLASMA_ENABLE_QML_DEBUG==<br />
'''(Since Plasma 5.19'<br />
<br />
Enables various debugging features:<br />
<br />
* QQmlDebuggingEnabler (see Qt docs for how to connect to Plasma)<br />
* Expanded error information when an applet fails to load<br />
<br />
==KDE_NO_GLOBAL_MENU==<br />
''(since Plasma 5.11)''<br />
<br />
Disable global menu, even if it is enabled in settings. This only affects Qt-based applications using Plasma-Integration.<br />
<br />
It can be useful to disable global menu for individual applications that have issues with global menu support (please do file bug reports about this to either the application or global menu in plasmashell!).<br />
<br />
<code>KDE_NO_GLOBAL_MENU=1 kwrite</code><br />
<br />
You can disable global menu for all application in System Settings → Application Appearance → Widget Style → "Fine Tuning" tab.</div>Skierpagehttps://community.kde.org/index.php?title=Guidelines_and_HOWTOs/Flatpak&diff=93928Guidelines and HOWTOs/Flatpak2022-04-13T02:14:13Z<p>Skierpage: /* Qt and KF5 Runtime */ update runtime versions, rephrase</p>
<hr />
<div>Flatpak is a solution for creating sandboxed software builds for GNU/Linux systems. You can find more information [http://flatpak.org/ here].<br />
<br />
= Applications =<br />
We are building release versions of most KDE applications and distributing them on flathub, https://flathub.org.<br />
We are also building "nightly" versions of most KDE applications and distributing them from the kdeapps remote at https://distribute.kde.org. The latter builds the latest source code of the application, so expect some unstable development quirks; on the bright side, if you find one, you get to tell the developers so they can fix it!<br />
<br />
The "app store" or software center in many distributions is able to install Flatpaks.<br />
You can simply open the flatpakrepo files with Discover or your otherwise favorite software center:<br />
* https://flathub.org/repo/flathub.flatpakrepo<br />
* https://distribute.kde.org/kdeapps.flatpakrepo<br />
and then when you search for a KDE application it should offer to install the flatpak version.<br />
<br />
Here's how to install a Flatpak application from the terminal:<br />
<syntaxhighlight lang="bash"><br />
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo<br />
flatpak remote-add --if-not-exists kdeapps --from https://distribute.kde.org/kdeapps.flatpakrepo<br />
flatpak install kdeapps org.kde.okular<br />
</syntaxhighlight><br />
<br />
If you added both the Flathub and kdeapps repos, the `flatpak` command-line tool will prompt you which one you want, something like:<br />
<syntaxhighlight><br />
flatpak install skrooge<br />
Looking for matches…<br />
Remotes found with refs similar to ‘skrooge’:<br />
<br />
1) ‘flathub’ (system)<br />
2) ‘kdeapps’ (system)<br />
<br />
Which do you want to use (0 to abort)? [0-2]: 2<br />
Found ref ‘app/org.kde.skrooge/x86_64/master’ in remote ‘kdeapps’ (system).<br />
Use this ref? [Y/n]: y<br />
</syntaxhighlight><br />
<br />
=== Using Flatpak Applications ===<br />
Once a flatpak package is installed, it can be run with<br />
<syntaxhighlight><br />
flatpak run org.kde.okular<br />
</syntaxhighlight><br />
<br />
and be updated with the latest version from the binary factory by<br />
<br />
<syntaxhighlight><br />
flatpak update org.kde.okular<br />
</syntaxhighlight><br />
<br />
== Build status ==<br />
The Continuous Integration that triggers many of the nightly flatpak builds is at https://binary-factory.kde.org. If a flatpak is not updated or has a problem, you may be able to look at build logs here and puzzle out why.<br />
<br />
Similarly, https://flathub.org/builds/ monitors flatpak builds on Flathub.<br />
<br />
= For developers =<br />
== Qt and KF5 Runtime ==<br />
We provide a runtime with Qt and all KDE Frameworks 5 (except for the 4th tier) to make sure it's easily adaptable for any KDE Application and possibly most Qt-based applications as well.<br />
Installing a KDE application's flatpak should automatically install an appropriate version of the runtime.<br />
<br />
This runtime, and optionally its SDK for program development, can be added with the following commands:<br />
<syntaxhighlight lang="bash"><br />
flatpak install flathub org.kde.Platform//5.15-21.08<br />
flatpak install flathub org.kde.Sdk//5.15-21.08<br />
</syntaxhighlight><br />
<br />
{{ Note | All flatpak commands (such as <code>remote-add</code> and <code>install</code>) accept a <code>--user</code> option to install things at the user level, without being prompted for the sudo password every time. }}<br />
<br />
== Compile your application ==<br />
<br />
Now you get to compile your favorite application. If you want to see how it's done, you can see some of the ones that have already been built. You can find it [https://invent.kde.org/packaging/flatpak-kde-applications/ here].<br />
<br />
To compile applications, you should create a json file similar to the ones in the previous link. Then you'd just need to trigger the build and get it into a repository. For testing, I recommend just creating a local one (to publish an rsync will be required).<br />
<br />
<syntaxhighlight lang="bash"><br />
mkdir app repo<br />
flatpak-builder --ccache --repo=repo --subject="Build of AWESOMEAPP `date`" app org.kde.AWESOMEAPP.json<br />
</syntaxhighlight><br />
<br />
This will do everything required and create a repository in ./repo. To test the application we add the repository (called remotes), we install the application and then we run it:<br />
<syntaxhighlight lang="bash"><br />
flatpak remote-add awesomeapp repo --no-gpg-verify<br />
flatpak install awesomeapp org.kde.AWESOMEAPP<br />
flatpak run org.kde.AWESOMEAPP<br />
</syntaxhighlight><br />
<br />
Now you will see that some things don't work and you'll have the privilege to start fixing things!<br />
<br />
== Contribute! ==<br />
In the following repositories you'll find the code in charge of packaging the runtime (Qt 5 and KF5) and then several (but not all, yet) KDE Applications.<br />
* Runtime: https://invent.kde.org/packaging/flatpak-kde-runtime/<br />
* Applications: https://invent.kde.org/packaging/flatpak-kde-applications/<br />
* Our XDG portals: https://invent.kde.org/plasma/xdg-desktop-portal-kde/<br />
<br />
== Flatpak portals ==<br />
Portals are high-level session bus APIs that provide selective access to resources to sandboxed applications. The implicit expectation of portals is that the user will always be involved in granting or rejecting a portal request, thus most portal APIs will lead to user interaction in the form of dialogs.<br />
<br />
Since such dialogs must fit into the user experience of the desktop shell, the portal APIs are implemented by a generic frontend called [https://github.com/flatpak/xdg-desktop-portal xdg-desktop-portal] which calls out to desktop-specific implementations that provide the actual UI. The bus name through which the portal APIs are available is org.freedesktop.portal.Desktop, with the object path /org/freedesktop/portal/desktop implementing the various portal interfaces.<br />
{{ Note | You can find more information about flatpak portals [https://github.com/flatpak/flatpak/wiki/Portals here]. }}<br />
<br />
=== KDE implementation of portals ===<br />
The KDE backend for flatpak portals is called [https://invent.kde.org/plasma/xdg-desktop-portal-kde xdg-desktop-portal-kde] and is now part of Plasma releases (starting with Plasma 5.10). Currently it supports most of the portals. If you want to test KDE flatpak portals, you can use this [https://invent.kde.org/libraries/xdg-portal-test-kde simple test app].<br />
<br />
====Debugging portals====<br />
To get some debug information, you first kill the running '''xdg-desktop-portal-kde''' instance. Then first start xdg-desktop-portal-kde with:<br />
<syntaxhighlight lang="bash"><br />
QT_LOGGING_RULES='xdg-desktop*.debug=true' /usr/lib/$(uname -m)-linux-gnu/libexec/xdg-desktop-portal-kde<br />
</syntaxhighlight><br />
then in another terminal session restart '''xdg-desktop-portal''' with:<br />
<syntaxhighlight lang="bash"><br />
G_MESSAGES_DEBUG=all /usr/libexec/xdg-desktop-portal --verbose --replace<br />
</syntaxhighlight><br />
You can use above mentioned testing application to test various portals. You should then see debug output from xdp-kde similar to:<br />
<syntaxhighlight lang="bash"><br />
xdg-desktop-portal-kde: Desktop portal registered successfuly<br />
xdg-desktop-portal-kde-file-chooser: OpenFile called with parameters:<br />
xdg-desktop-portal-kde-file-chooser: handle: "/org/freedesktop/portal/desktop/request/1_255/t"<br />
xdg-desktop-portal-kde-file-chooser: parent_window: "x11:1"<br />
xdg-desktop-portal-kde-file-chooser: title: "Flatpak test - open dialog"<br />
xdg-desktop-portal-kde-file-chooser: options: QMap(("accept_label", QVariant(QString, "Open (portal)"))("filters", QVariant(QDBusArgument, ))("modal", QVariant(bool, true))("multiple", QVariant(bool, true)))<br />
</syntaxhighlight><br />
You can see which portal has been called, whether it has been called or when you check output from '''xdg-desktop-portal''' then you should see message in case of portal error (usually related to DBus). You can also monitor dbus messages using '''dbus-monitor''', which indicates whether portals get involved at all as everything goes through DBus.<br />
<br />
= Styles and integration with other desktops =<br />
We are aware that not everyone is using KDE/Qt applications in Plasma desktop. For this flatpak comes with extensions, where you specify a directory (with themes, icons) where third-party is allowed to install additional stuff as an addition to what we have in our runtimes. At this moment we have added support for Gnome in form of adwaita icons and adwaita-qt style. All you need to is install following extensions using commands below:<br />
<syntaxhighlight lang="bash"><br />
flatpak install flathub org.freedesktop.Platform.Icontheme.Adwaita<br />
flatpak install flathub org.kde.KStyle.Adwaita<br />
flatpak install flathub org.kde.PlatformTheme.QGnomePlatform<br />
</syntaxhighlight></div>Skierpagehttps://community.kde.org/index.php?title=Guidelines_and_HOWTOs/Flatpak&diff=93927Guidelines and HOWTOs/Flatpak2022-04-13T02:01:47Z<p>Skierpage: /* Build status */ mention Flathub build monitoring</p>
<hr />
<div>Flatpak is a solution for creating sandboxed software builds for GNU/Linux systems. You can find more information [http://flatpak.org/ here].<br />
<br />
= Applications =<br />
We are building release versions of most KDE applications and distributing them on flathub, https://flathub.org.<br />
We are also building "nightly" versions of most KDE applications and distributing them from the kdeapps remote at https://distribute.kde.org. The latter builds the latest source code of the application, so expect some unstable development quirks; on the bright side, if you find one, you get to tell the developers so they can fix it!<br />
<br />
The "app store" or software center in many distributions is able to install Flatpaks.<br />
You can simply open the flatpakrepo files with Discover or your otherwise favorite software center:<br />
* https://flathub.org/repo/flathub.flatpakrepo<br />
* https://distribute.kde.org/kdeapps.flatpakrepo<br />
and then when you search for a KDE application it should offer to install the flatpak version.<br />
<br />
Here's how to install a Flatpak application from the terminal:<br />
<syntaxhighlight lang="bash"><br />
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo<br />
flatpak remote-add --if-not-exists kdeapps --from https://distribute.kde.org/kdeapps.flatpakrepo<br />
flatpak install kdeapps org.kde.okular<br />
</syntaxhighlight><br />
<br />
If you added both the Flathub and kdeapps repos, the `flatpak` command-line tool will prompt you which one you want, something like:<br />
<syntaxhighlight><br />
flatpak install skrooge<br />
Looking for matches…<br />
Remotes found with refs similar to ‘skrooge’:<br />
<br />
1) ‘flathub’ (system)<br />
2) ‘kdeapps’ (system)<br />
<br />
Which do you want to use (0 to abort)? [0-2]: 2<br />
Found ref ‘app/org.kde.skrooge/x86_64/master’ in remote ‘kdeapps’ (system).<br />
Use this ref? [Y/n]: y<br />
</syntaxhighlight><br />
<br />
=== Using Flatpak Applications ===<br />
Once a flatpak package is installed, it can be run with<br />
<syntaxhighlight><br />
flatpak run org.kde.okular<br />
</syntaxhighlight><br />
<br />
and be updated with the latest version from the binary factory by<br />
<br />
<syntaxhighlight><br />
flatpak update org.kde.okular<br />
</syntaxhighlight><br />
<br />
== Build status ==<br />
The Continuous Integration that triggers many of the nightly flatpak builds is at https://binary-factory.kde.org. If a flatpak is not updated or has a problem, you may be able to look at build logs here and puzzle out why.<br />
<br />
Similarly, https://flathub.org/builds/ monitors flatpak builds on Flathub.<br />
<br />
= For developers =<br />
== Qt and KF5 Runtime ==<br />
We provide a runtime with Qt and all KDE Frameworks 5 (except for the 4th tier) to make sure it's easily adaptable for any KDE Application and possibly most Qt-based applications as well.<br />
Installing a KDE application's flatpak should automatically install an appropriate version of the runtime.<br />
<br />
This runtime, and optionally its SDK for program development, can be added by following these instructions:<br />
<syntaxhighlight lang="bash"><br />
flatpak install flathub org.kde.Platform//5.15<br />
flatpak install flathub org.kde.Sdk//5.15<br />
</syntaxhighlight><br />
<br />
{{ Note | All flatpak commands (such as <code>remote-add</code> and <code>install</code>) accept a <code>--user</code> option to install things at the user level, without being prompted for the sudo password every time. }}<br />
<br />
== Compile your application ==<br />
<br />
Now you get to compile your favorite application. If you want to see how it's done, you can see some of the ones that have already been built. You can find it [https://invent.kde.org/packaging/flatpak-kde-applications/ here].<br />
<br />
To compile applications, you should create a json file similar to the ones in the previous link. Then you'd just need to trigger the build and get it into a repository. For testing, I recommend just creating a local one (to publish an rsync will be required).<br />
<br />
<syntaxhighlight lang="bash"><br />
mkdir app repo<br />
flatpak-builder --ccache --repo=repo --subject="Build of AWESOMEAPP `date`" app org.kde.AWESOMEAPP.json<br />
</syntaxhighlight><br />
<br />
This will do everything required and create a repository in ./repo. To test the application we add the repository (called remotes), we install the application and then we run it:<br />
<syntaxhighlight lang="bash"><br />
flatpak remote-add awesomeapp repo --no-gpg-verify<br />
flatpak install awesomeapp org.kde.AWESOMEAPP<br />
flatpak run org.kde.AWESOMEAPP<br />
</syntaxhighlight><br />
<br />
Now you will see that some things don't work and you'll have the privilege to start fixing things!<br />
<br />
== Contribute! ==<br />
In the following repositories you'll find the code in charge of packaging the runtime (Qt 5 and KF5) and then several (but not all, yet) KDE Applications.<br />
* Runtime: https://invent.kde.org/packaging/flatpak-kde-runtime/<br />
* Applications: https://invent.kde.org/packaging/flatpak-kde-applications/<br />
* Our XDG portals: https://invent.kde.org/plasma/xdg-desktop-portal-kde/<br />
<br />
== Flatpak portals ==<br />
Portals are high-level session bus APIs that provide selective access to resources to sandboxed applications. The implicit expectation of portals is that the user will always be involved in granting or rejecting a portal request, thus most portal APIs will lead to user interaction in the form of dialogs.<br />
<br />
Since such dialogs must fit into the user experience of the desktop shell, the portal APIs are implemented by a generic frontend called [https://github.com/flatpak/xdg-desktop-portal xdg-desktop-portal] which calls out to desktop-specific implementations that provide the actual UI. The bus name through which the portal APIs are available is org.freedesktop.portal.Desktop, with the object path /org/freedesktop/portal/desktop implementing the various portal interfaces.<br />
{{ Note | You can find more information about flatpak portals [https://github.com/flatpak/flatpak/wiki/Portals here]. }}<br />
<br />
=== KDE implementation of portals ===<br />
The KDE backend for flatpak portals is called [https://invent.kde.org/plasma/xdg-desktop-portal-kde xdg-desktop-portal-kde] and is now part of Plasma releases (starting with Plasma 5.10). Currently it supports most of the portals. If you want to test KDE flatpak portals, you can use this [https://invent.kde.org/libraries/xdg-portal-test-kde simple test app].<br />
<br />
====Debugging portals====<br />
To get some debug information, you first kill the running '''xdg-desktop-portal-kde''' instance. Then first start xdg-desktop-portal-kde with:<br />
<syntaxhighlight lang="bash"><br />
QT_LOGGING_RULES='xdg-desktop*.debug=true' /usr/lib/$(uname -m)-linux-gnu/libexec/xdg-desktop-portal-kde<br />
</syntaxhighlight><br />
then in another terminal session restart '''xdg-desktop-portal''' with:<br />
<syntaxhighlight lang="bash"><br />
G_MESSAGES_DEBUG=all /usr/libexec/xdg-desktop-portal --verbose --replace<br />
</syntaxhighlight><br />
You can use above mentioned testing application to test various portals. You should then see debug output from xdp-kde similar to:<br />
<syntaxhighlight lang="bash"><br />
xdg-desktop-portal-kde: Desktop portal registered successfuly<br />
xdg-desktop-portal-kde-file-chooser: OpenFile called with parameters:<br />
xdg-desktop-portal-kde-file-chooser: handle: "/org/freedesktop/portal/desktop/request/1_255/t"<br />
xdg-desktop-portal-kde-file-chooser: parent_window: "x11:1"<br />
xdg-desktop-portal-kde-file-chooser: title: "Flatpak test - open dialog"<br />
xdg-desktop-portal-kde-file-chooser: options: QMap(("accept_label", QVariant(QString, "Open (portal)"))("filters", QVariant(QDBusArgument, ))("modal", QVariant(bool, true))("multiple", QVariant(bool, true)))<br />
</syntaxhighlight><br />
You can see which portal has been called, whether it has been called or when you check output from '''xdg-desktop-portal''' then you should see message in case of portal error (usually related to DBus). You can also monitor dbus messages using '''dbus-monitor''', which indicates whether portals get involved at all as everything goes through DBus.<br />
<br />
= Styles and integration with other desktops =<br />
We are aware that not everyone is using KDE/Qt applications in Plasma desktop. For this flatpak comes with extensions, where you specify a directory (with themes, icons) where third-party is allowed to install additional stuff as an addition to what we have in our runtimes. At this moment we have added support for Gnome in form of adwaita icons and adwaita-qt style. All you need to is install following extensions using commands below:<br />
<syntaxhighlight lang="bash"><br />
flatpak install flathub org.freedesktop.Platform.Icontheme.Adwaita<br />
flatpak install flathub org.kde.KStyle.Adwaita<br />
flatpak install flathub org.kde.PlatformTheme.QGnomePlatform<br />
</syntaxhighlight></div>Skierpagehttps://community.kde.org/index.php?title=Guidelines_and_HOWTOs/Flatpak&diff=93881Guidelines and HOWTOs/Flatpak2022-03-21T23:31:25Z<p>Skierpage: /* Applications */ kdeapps remote at https://distribute.kde.org</p>
<hr />
<div>Flatpak is a solution for creating sandboxed software builds for GNU/Linux systems. You can find more information [http://flatpak.org/ here].<br />
<br />
= Applications =<br />
We are building release versions of most KDE applications and distributing them on flathub, https://flathub.org.<br />
We are also building "nightly" versions of most KDE applications and distributing them from the kdeapps remote at https://distribute.kde.org. The latter builds the latest source code of the application, so expect some unstable development quirks; on the bright side, if you find one, you get to tell the developers so they can fix it!<br />
<br />
The "app store" or software center in many distributions is able to install Flatpaks.<br />
You can simply open the flatpakrepo files with Discover or your otherwise favorite software center:<br />
* https://flathub.org/repo/flathub.flatpakrepo<br />
* https://distribute.kde.org/kdeapps.flatpakrepo<br />
and then when you search for a KDE application it should offer to install the flatpak version.<br />
<br />
Here's how to install a Flatpak application from the terminal:<br />
<syntaxhighlight lang="bash"><br />
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo<br />
flatpak remote-add --if-not-exists kdeapps --from https://distribute.kde.org/kdeapps.flatpakrepo<br />
flatpak install kdeapps org.kde.okular<br />
</syntaxhighlight><br />
<br />
If you added both the Flathub and kdeapps repos, the `flatpak` command-line tool will prompt you which one you want, something like:<br />
<syntaxhighlight><br />
flatpak install skrooge<br />
Looking for matches…<br />
Remotes found with refs similar to ‘skrooge’:<br />
<br />
1) ‘flathub’ (system)<br />
2) ‘kdeapps’ (system)<br />
<br />
Which do you want to use (0 to abort)? [0-2]: 2<br />
Found ref ‘app/org.kde.skrooge/x86_64/master’ in remote ‘kdeapps’ (system).<br />
Use this ref? [Y/n]: y<br />
</syntaxhighlight><br />
<br />
=== Using Flatpak Applications ===<br />
Once a flatpak package is installed, it can be run with<br />
<syntaxhighlight><br />
flatpak run org.kde.okular<br />
</syntaxhighlight><br />
<br />
and be updated with the latest version from the binary factory by<br />
<br />
<syntaxhighlight><br />
flatpak update org.kde.okular<br />
</syntaxhighlight><br />
<br />
== Build status ==<br />
The Continuous Integration that triggers many of the nightly flatpak builds is at https://binary-factory.kde.org. If a flatpak is not updated or has a problem, you may be able to look at build logs here and puzzle out why.<br />
<br />
= For developers =<br />
== Qt and KF5 Runtime ==<br />
We provide a runtime with Qt and all KDE Frameworks 5 (except for the 4th tier) to make sure it's easily adaptable for any KDE Application and possibly most Qt-based applications as well.<br />
Installing a KDE application's flatpak should automatically install an appropriate version of the runtime.<br />
<br />
This runtime, and optionally its SDK for program development, can be added by following these instructions:<br />
<syntaxhighlight lang="bash"><br />
flatpak install flathub org.kde.Platform//5.15<br />
flatpak install flathub org.kde.Sdk//5.15<br />
</syntaxhighlight><br />
<br />
{{ Note | All flatpak commands (such as <code>remote-add</code> and <code>install</code>) accept a <code>--user</code> option to install things at the user level, without being prompted for the sudo password every time. }}<br />
<br />
== Compile your application ==<br />
<br />
Now you get to compile your favorite application. If you want to see how it's done, you can see some of the ones that have already been built. You can find it [https://invent.kde.org/packaging/flatpak-kde-applications/ here].<br />
<br />
To compile applications, you should create a json file similar to the ones in the previous link. Then you'd just need to trigger the build and get it into a repository. For testing, I recommend just creating a local one (to publish an rsync will be required).<br />
<br />
<syntaxhighlight lang="bash"><br />
mkdir app repo<br />
flatpak-builder --ccache --repo=repo --subject="Build of AWESOMEAPP `date`" app org.kde.AWESOMEAPP.json<br />
</syntaxhighlight><br />
<br />
This will do everything required and create a repository in ./repo. To test the application we add the repository (called remotes), we install the application and then we run it:<br />
<syntaxhighlight lang="bash"><br />
flatpak remote-add awesomeapp repo --no-gpg-verify<br />
flatpak install awesomeapp org.kde.AWESOMEAPP<br />
flatpak run org.kde.AWESOMEAPP<br />
</syntaxhighlight><br />
<br />
Now you will see that some things don't work and you'll have the privilege to start fixing things!<br />
<br />
== Contribute! ==<br />
In the following repositories you'll find the code in charge of packaging the runtime (Qt 5 and KF5) and then several (but not all, yet) KDE Applications.<br />
* Runtime: https://invent.kde.org/packaging/flatpak-kde-runtime/<br />
* Applications: https://invent.kde.org/packaging/flatpak-kde-applications/<br />
* Our XDG portals: https://invent.kde.org/plasma/xdg-desktop-portal-kde/<br />
<br />
== Flatpak portals ==<br />
Portals are high-level session bus APIs that provide selective access to resources to sandboxed applications. The implicit expectation of portals is that the user will always be involved in granting or rejecting a portal request, thus most portal APIs will lead to user interaction in the form of dialogs.<br />
<br />
Since such dialogs must fit into the user experience of the desktop shell, the portal APIs are implemented by a generic frontend called [https://github.com/flatpak/xdg-desktop-portal xdg-desktop-portal] which calls out to desktop-specific implementations that provide the actual UI. The bus name through which the portal APIs are available is org.freedesktop.portal.Desktop, with the object path /org/freedesktop/portal/desktop implementing the various portal interfaces.<br />
{{ Note | You can find more information about flatpak portals [https://github.com/flatpak/flatpak/wiki/Portals here]. }}<br />
<br />
=== KDE implementation of portals ===<br />
The KDE backend for flatpak portals is called [https://invent.kde.org/plasma/xdg-desktop-portal-kde xdg-desktop-portal-kde] and is now part of Plasma releases (starting with Plasma 5.10). Currently it supports most of the portals. If you want to test KDE flatpak portals, you can use this [https://invent.kde.org/libraries/xdg-portal-test-kde simple test app].<br />
<br />
====Debugging portals====<br />
To get some debug information, you first kill the running '''xdg-desktop-portal-kde''' instance. Then first start xdg-desktop-portal-kde with:<br />
<syntaxhighlight lang="bash"><br />
QT_LOGGING_RULES='xdg-desktop*.debug=true' /usr/lib/$(uname -m)-linux-gnu/libexec/xdg-desktop-portal-kde<br />
</syntaxhighlight><br />
then in another terminal session restart '''xdg-desktop-portal''' with:<br />
<syntaxhighlight lang="bash"><br />
G_MESSAGES_DEBUG=all /usr/libexec/xdg-desktop-portal --verbose --replace<br />
</syntaxhighlight><br />
You can use above mentioned testing application to test various portals. You should then see debug output from xdp-kde similar to:<br />
<syntaxhighlight lang="bash"><br />
xdg-desktop-portal-kde: Desktop portal registered successfuly<br />
xdg-desktop-portal-kde-file-chooser: OpenFile called with parameters:<br />
xdg-desktop-portal-kde-file-chooser: handle: "/org/freedesktop/portal/desktop/request/1_255/t"<br />
xdg-desktop-portal-kde-file-chooser: parent_window: "x11:1"<br />
xdg-desktop-portal-kde-file-chooser: title: "Flatpak test - open dialog"<br />
xdg-desktop-portal-kde-file-chooser: options: QMap(("accept_label", QVariant(QString, "Open (portal)"))("filters", QVariant(QDBusArgument, ))("modal", QVariant(bool, true))("multiple", QVariant(bool, true)))<br />
</syntaxhighlight><br />
You can see which portal has been called, whether it has been called or when you check output from '''xdg-desktop-portal''' then you should see message in case of portal error (usually related to DBus). You can also monitor dbus messages using '''dbus-monitor''', which indicates whether portals get involved at all as everything goes through DBus.<br />
<br />
= Styles and integration with other desktops =<br />
We are aware that not everyone is using KDE/Qt applications in Plasma desktop. For this flatpak comes with extensions, where you specify a directory (with themes, icons) where third-party is allowed to install additional stuff as an addition to what we have in our runtimes. At this moment we have added support for Gnome in form of adwaita icons and adwaita-qt style. All you need to is install following extensions using commands below:<br />
<syntaxhighlight lang="bash"><br />
flatpak install flathub org.freedesktop.Platform.Icontheme.Adwaita<br />
flatpak install flathub org.kde.KStyle.Adwaita<br />
flatpak install flathub org.kde.PlatformTheme.QGnomePlatform<br />
</syntaxhighlight></div>Skierpagehttps://community.kde.org/index.php?title=Baloo/Architecture&diff=93879Baloo/Architecture2022-03-21T00:07:09Z<p>Skierpage: /* Baloo and extended attributes */ add a pointer to info that is more up-to-date on userbase to avoid duplication and extra maintenance</p>
<hr />
<div>Baloo is a metadata and search framework by KDE.<br />
<br />
Baloo focuses on providing a very small memory footprint along with with extremely fast searching. It also supports storing additional file based metadata via extended attributes.<br />
<br />
* '''Mailing List: ''' kde-devel@kde.org<br />
* '''IRC Channel:''' #kde-baloo on freenode<br />
<br />
== Architecture ==<br />
{{Remember|2=Outdated architecture|1=The architecture evolved and Baloo is '''only''' a file indexer. The reference to PIM resources (emails, contacts) is historical. KDE PIM uses its own indexing system, which has a similar architecture.}}<br />
<br />
Baloo focuses on decentralization of data, and does not have any central database. At its core it is a set of 3 services:<br />
* Data Stores<br />
* Search Stores<br />
* Relations<br />
<br />
=== Data Store ===<br />
A Data Store is a place to permanently store data. Its format and APIs are not dictated by Baloo, and can be in any way that is most efficient for the data in question.<br />
<br />
=== Search Store ===<br />
A Search Store is a plugin which provides search capabilities for a specific kind of data. Each of these stores provide a plugin which can be used to search through the data using a consistent API. At this moment there are 3 search stores that have been implemented -<br />
<br />
* File Search<br />
* Email Search<br />
* Contact Search<br />
<br />
<br />
Each Store can also provide custom APIs for searching the data.<br />
<br />
=== Relations ===<br />
Baloo can be used to create relations between two uniquely identifiable identifiers. The key aspect is that when creating a relation between A and B, both of them are uniquely identifiable. For most of the PIM data, Akonadi already provides a unique identifier of the 'akonadi:?item=x'. For File data, Baloo provides unique identifiers of the form 'file:x'.<br />
<br />
Each relation is stored in an independent store in the desired mechanism. A sample sqlite implementation is provided which maps both the identifiers in a 2 column sqlite database.<br />
<br />
For example, there exists a TagRelation which maps a Tag and any unique identifier. Similarly, there can be an ActivityRelation, and relations for other aspects such as mapping a file received via Bluetooth to a Bluetooth device.<br />
<br />
== Implementation ==<br />
=== Files ===<br />
Baloo concentrates heavily on files, and provides both a data store and search store for files. These are stored using a combination of sqlite and xapian.<br />
<br />
=== Akonadi ===<br />
In the case of PIM, since Akonadi already stores (caches) the data, only a Search Store is required. There are currently separate search stores for contacts and emails. They are both implemented using Xapian.<br />
<br />
=== Tags ===<br />
Tags are stored in a custom format. In order to relate tags with files / email, a TagRelation is provided.<br />
<br />
Baloo replaced [[Nepomuk]], see https://community.kde.org/Baloo .<br />
<br />
=== Baloo and extended attributes ===<br />
:''[https://userbase.kde.org/Baloo#Baloo_and_extended_attributes See the Baloo page on the Userbase wiki]</div>Skierpagehttps://community.kde.org/index.php?title=KWin/Wayland&diff=93684KWin/Wayland2022-02-04T09:48:54Z<p>Skierpage: /* Starting a nested KWin */ improve, but still garbled</p>
<hr />
<div>= What is Wayland? =<br />
[http://wayland.freedesktop.org Wayland] is a small display server protocol and IPC library which is considered to have the chance to replace X11 as primary windowing system. But Wayland is not a direct successor of X and does not follow the design of X. The display server is directly moved into the Compositor (that is KWin) and clients connect to this server through a Unix socket.<br />
<br />
= Why Plasma needs Wayland? =<br />
<br />
X has some serious issues and is rather old. The protocol is designed for the usecases three decades ago. Over the last years more and more functionality has been moved from X either into the kernel or into the compositors. The X server is more or less only a proxy between kernel, compositor and the X clients.<br />
<br />
Today the compositor does everything the X server used to do. There are some remaining features not yet moved into the compositor (e.g. input handling) but those would make most sense in the compositor. The best situation would be to let the compositor directly work together with the kernel for rendering and input handling and manage the clients directly, which means to remove the Proxy. This is what Wayland is about. More reasons for Wayland in the [http://wayland.freedesktop.org/faq.html FAQ].<br />
<br />
In Plasma we need Wayland support as we are hitting the limitations of X all the time. Wayland will simplify our architecture and allow us to composite the screen in the way we consider as most useful.<br />
<br />
= Wayland Support in Plasma =<br />
<br />
Wayland support in the KDE Plasma Workspaces is in a tech-preview state. The workspaces have been developed for X11 and much functionality relies on X11. To be able to make proper use of Wayland these bits have to be rewritten.<br />
<br />
The most complex task is to implement Wayland support in KWin, KDE Plasma's Compositor and Window Manager. Since 5.4 KWin is able to manage Wayland clients and this allows to start a Plasma session on Wayland.<br />
<br />
= Why not a new Compositor? =<br />
<br />
Given that KWin was designed as a X11 Window Manager and later as a X11 compositor the question is valid, why not to implement a new Wayland compositor from scratch. Most parts of KWin are X11 independent. E.g. the Desktop Effect system is able to integrate Wayland clients without any change, the same is true for Window Decorations and other parts.<br />
<br />
Another reason is that the KWin development team does not have the manpower to maintain an independent X11 window manager and a Wayland compositor. Starting a new Wayland compositor would mean to stop the work on the X11 window manager, which would be a bad move as we cannot know yet whether Wayland will succeed and will be supported on all hardware. Also in future KDE will have to provide an X11 window manager.<br />
<br />
KWin is known as one of the most feature complete and most stable window managers. More than a decade of development effort has gone into this Window Manager. Reaching feature parity in a new Wayland compositor seems hardly possible if rewritten from scratch.<br />
<br />
Writing a new Wayland Compositor would require to rewrite the complete X11 workspace in one go. This includes not only the Window Manager, but also parts of Plasma, Screen Locker and many, many more. This would take a long development time and the transition would not be smooth, very likely buggy and with regressions like the 4.0 introduction. We do not want to break the desktop!<br />
<br />
= Determining and setting the window system that KDE applications use =<br />
System Settings > About this System shows <br />
: Graphics Platform: Wayland<br />
<br />
if running under Wayland, otherwise "X11". Each application's Help > About ''App name'' > Components dialog shows either "The ''xcb'' windowing system" or "The ''wayland'' windowing system".<br />
<br />
== Forcing KDE apps to run as X11 ==<br />
KWin Wayland supports unmodified X11 applications by implmenting the "XWayland" protocol to provide an X11 server. There are various command-line options to <code>/usr/bin/kwin_wayland</code> to enable and configure this. The X11 applications talk to this server and work reasonably well, though utilities such as clipboard managers and screen capture programs will probably have problems. It should start <br />
<br />
To make KDE applications use X11, in a terminal such as Konsole enter<br />
{{Input|1=QT_QPA_PLATFORM=xcb /usr/bin/kfontview<br />
}}<br />
replacing <code>kfontview</code> with the path to the application's binary.<br />
<br />
It is also possible to restart your KDE window system using the other window system. {{TODO|how to do this? Is it standardized}}<br />
<br />
= Starting a nested KWin =<br />
Since 5.3 it is possible to start a nested KWin instance under either X11 or Wayland:<br />
{{Input|1=export $(dbus-launch)<br />
kwin_wayland --xwayland<br />
}}<br />
You can use the <code>--socket</code> option when launching from another Wayland session. It is used to define a different socket name than the one used by the current Wayland session.<br />
<br />
The option <code>--xwayland</code> is required to start a nested X server. The id of the created X11 Display may be printed to stdout, e.g.:<br />
{{Input|1=<br />
X-Server started on display :1<br />
}}<br />
<br />
Normally it picks the next free id, e.g. if the system X11 is on display ":0", it will pick ":1". To run an X11 client application on the nested KWin X11 server, set the DISPLAY variable and set the qpa platform to xcb, e.g.:<br />
{{Input|1=DISPLAY=:1 QT_QPA_PLATFORM=wayland kwrite<br />
}}<br />
<br />
<br />
The nested KWin is started on your primary windowing system. E.g. if the DISPLAY environment variable is defined it will start on X11, if the WAYLAND_DISPLAY environment variable is defined it will start on Wayland. It is also possible to explicitly set the system to use by passing command line argument "--x11-display" or "--wayland-display".<br />
<br />
To run a Qt application as a Wayland client on this KWin instance, as above one just needs to set the qpa platform to wayland, e.g.:<br />
{{Input|1=QT_QPA_PLATFORM=wayland kwrite<br />
}}<br />
<br />
= Running on a tty =<br />
<br />
As an alternative one can also specify which backend to use. On a tty both --drm and --framebuffer are supported, though only --drm provides OpenGL acceleration. If none is specified it will use the DRM backend.<br />
<br />
The option "--xwayland" is required to start a nested X server. Normally it picks the next free display id, so if an X Server is running on ":0" it picks ":1".<br />
<br />
Once the screen turned black KWin has taken over the display and one can open windows on the Xwayland server. Therefore go to another tty and start an application by passing the correct DISPLAY variable:<br />
{{Input|1=DISPLAY=:1 kwrite<br />
}}<br />
<br />
Now switching back to the tty KWin is running on should show the started window and allow to interact with it. Support for running KWin on a tty is still in it's early stages. Bugs are to be expected and there are known missing features. Please consider it only as a mode to experiment with.<br />
<br />
= Start a Plasma session on Wayland =<br />
First go to a tty (Press Ctrl+Alt+F3 for instance) and log in.<br />
Then run the following command:<br />
{{Input|1=dbus-run-session startplasma-wayland<br />
}}<br />
<br />
= Reading wayland session logs =<br />
If you started the wayland session from SDDM, logs are located at ''~/.local/share/sddm/wayland-session.log'' :<br />
{{Input|1=tail -f ~/.local/share/sddm/wayland-session.log<br />
}}<br />
<br />
= I found a bug, what should I do? =<br />
<br />
[https://bugs.kde.org Fill a bug!] associated with the wayland keyword.<br />
<br />
Then if you have the time open your text editor, fix it and open a review request on [https://phabricator.kde.org/ phabricator].<br />
You can find phabricator and arc documentation at https://community.kde.org/Infrastructure/Phabricator<br />
<br />
= I want to help =<br />
<br />
Great, get in touch with us either through kwin at kde dot org or plasma dash devel at kde dot org or find us in #kwin or #plasma on Libera Chat. There is lots to work on and we can use every helping hand.<br />
<br />
= More Information =<br />
* [https://www.proli.net/2020/04/03/developing-kwin-wayland/ "Blog post about developing KWin Wayland"]<br />
* Presentation on Desktop Summit 2011: [[Media:KWin_Wayland.pdf|Slides]]<br />
* Presentation at Akademy 2014: [https://conf.kde.org/system/attachments/43/original/kwin-akademy-2014.pdf Slides "The state of KWin/Wayland"]<br />
* Presentation at Akademy 2015: [https://conf.kde.org/system/attachments/75/original/presentation.pdf Slides "Welcome to Masachusetts"]</div>Skierpagehttps://community.kde.org/index.php?title=KDE/FAQs/Debugging_FAQ&diff=93637KDE/FAQs/Debugging FAQ2022-01-20T02:10:02Z<p>Skierpage: fix the path to source kde-dev-scripts, better but may be incorrect.</p>
<hr />
<div><languages /><br />
<translate><br />
==General== <!--T:1--><br />
<br />
===How do I avoid Dr Konqi?=== <!--T:2--><br />
<br />
<!--T:3--><br />
You must set the environment variable KDE_DEBUG (to 1 or whatever you want in fact).<br />
<br />
<!--T:4--><br />
To get Dr Konqi back, unset the KDE_DEBUG environment variable.<br />
<br />
<!--T:5--><br />
Example:<br /><br />
*To avoid Dr Konqi:<br />
::<syntaxhighlight lang="bash">export KDE_DEBUG=1</syntaxhighlight><br />
*To see Dr Konqi:<br />
::<syntaxhighlight lang="bash">unset KDE_DEBUG</syntaxhighlight><br />
<br />
===How do I switch Dr Konqi to developer mode?=== <!--T:6--><br />
<br />
<!--T:7--><br />
Edit file $KDEHOME/share/config/drkonqirc and add the following:<br />
<syntaxhighlight lang="ini"><br />
[drkonqi]<br />
ConfigName=developer<br />
</syntaxhighlight><br />
<br />
===What is a core file? How do I get a core file?=== <!--T:8--><br />
<br />
<!--T:9--><br />
A core file is an image of the memory when your application crashed. Using the core file, you can know which variables were set and where your application crashed. <br />
<br />
<!--T:10--><br />
Some distributions disable the generation of core files. To re-enable them, use <code>ulimit -c unlimited</code>.<br />
<br />
<!--T:11--><br />
Once you have a core file for a crash, you can examine it with gdb appname core . This will open gdb on the core file for the given application. Once at the gdb prompt, the most useful command is <code>bt</code> which generates a backtrace of the crash.<br />
For more information about how to use gdb, see [[Special:myLanguage/Development/Tutorials/Debugging/Debugging_with_GDB|this page]]<br />
<br />
===What tools are available to debug my application?=== <!--T:12--><br />
<br />
<!--T:13--><br />
* KDE5 uses <code>qCDebug()</code> calls to control debugging output. See [[Guidelines and HOWTOs/Debugging/Using Error Messages#Controlling Messages]] to learn how to enable output from these calls.<br />
*<code>qDebug()</code> calls are a simple yet efficient way to debug an application; simply add a <code>qDebug()</code> call in the code to print e.g. the value of some variable, compile the application, then run it from a terminal emulator. The application needs to be built with debugging symbols (CMAKE_BUILD_TYPE=debug or CMAKE_BUILD_TYPE=RelWithDebInfo); if the build type is "release", <code>qDebug()</code> calls won't output anything<br />
*gdb, the GNU debugger, is the quickest way to execute step-by-step and investigate variables (recommended versions are gdb >= 6.x)<br />
*Valgrind<br />
*kdbg is a nice graphical frontend to gdb with a KDE GUI. It has support for many Qt types (including QString).<br />
*Memory leak tracer : See kdesdk/kmtrace. The README explains it all.<br />
*qdbus and dbusviewer from Qt allow to browse DBus interfaces and to easily make DBus calls.<br />
<br />
<!--T:14--><br />
Check [[Special:myLanguage/Development/Tools|this page]] and kdesdk, there are a bunch of useful scripts there.<br />
<br />
===How do I print a QString in gdb?=== <!--T:15--><br />
<br />
<!--T:16--><br />
Check out <tt>sdk/kde-dev-scripts</tt>, and add this line to your ~/.gdbinit :<br />
{{Input|1=source /path/to/kde/sources/kde/sdk/kde-dev-scripts/kde-devel-gdb}}<br />
Then in gdb you can enter <code>qs myqstring</code> to see its contents.<br />
For instance, <code>QString myqstring = QString::fromLatin1("contents");</code> can be examined using<br />
<br />
<!--T:17--><br />
{{Input|1=<br />
(gdb) qs myqstring<br />
$1 = "contents"}}<br />
<br />
<!--T:18--><br />
Look in the <tt>[https://invent.kde.org/sdk/kde-dev-scripts/-/blob/master/kde-devel-gdb kde-devel-gdb]</tt> file for other useful macros it defines.<br />
<br />
===I have no symbol when I debug an app that uses kpart, what should I do?=== <!--T:19--><br />
<br />
<!--T:20--><br />
You must stop just after the main to load the debugging symbols of the shared library. After that, you can debug normally. <br />
One can go as far as creating a gdb macro, to stop right after the part was loaded. For kword, by example, I use:<br />
{{Input|1=<br />
define startkword<br />
break main<br />
run<br />
break 'KoDocument::KoDocument(int, QWidget *, char const *, <br />
QObject *, char const *, bool)' cont}}<br />
<br />
===How do I debug an ioslave?=== <!--T:21--><br />
<br />
<!--T:22--><br />
See [[Guidelines and HOWTOs/Debugging/Debugging IOSlaves|debugging ioslaves]]<br />
<br />
=== Why isn't my signal and slot connection working? === <!--T:23--><br />
<br />
<!--T:24--><br />
Here are some steps that you can use to troubleshoot why your signal/slot connection is not working (your slot does not get called for some reason).<br />
<br />
<!--T:25--><br />
1) Verify that the connect() doesn't print a warning to the console at runtime.<br />
<br />
<!--T:26--><br />
If it does, check that you wrote Q_OBJECT, that the parameter names are not in the connect, that the parameter types are compatible, and that the slot is defined, and that the moc was compiled.<br />
<br />
<!--T:27--><br />
1b) Or you can just check to see what connect() returns as a bool. Although this won't give you the error message.<br />
2) Verify that the signal is indeed emitted<br />
3) Verify that the receiver isn't already deleted at that time<br />
4) Verify that emitter->signalsBlocked() returns false<br />
<br />
===Is there a preferred way to print debug output on stderr?=== <!--T:29--><br />
<br />
<!--T:40--><br />
Yes; see [[Special:myLanguage/Guidelines_and_HOWTOs/Debugging/Using_Error_Messages|this tutorial]].<br />
<br />
<!--T:39--><br />
[[Category:FAQs]]<br />
[[Category:Programming]]<br />
</translate></div>Skierpagehttps://community.kde.org/index.php?title=Guidelines_and_HOWTOs/Debugging/Debugging_with_GDB&diff=93636Guidelines and HOWTOs/Debugging/Debugging with GDB2022-01-20T02:00:02Z<p>Skierpage: /* Improving your gdb experience for KDE/Qt applications */ warn that KDE has a ''different'' set of KDE debugging scripts</p>
<hr />
<div>{{Review|Outdated info. Port to KF5}}<br />
<br />
This is a short tutorial on debugging KDE applications. Throughout this<br />
tutorial I will use "kedit" as an example application.<br />
<br />
==Debugging with GDB==<br />
<br />
The recommended version of gdb to use is version 4.95 or higher; older<br />
versions have problems generating proper backtraces.<br />
<br />
There are three ways to debug an application with gdb:<br />
<br />
# You can start the application from within gdb.<br />
# You can attach gdb to an already running application.<br />
# You can run gdb after an application has crashed using a core file.<br />
<br />
==Starting applications from within gdb==<br />
<br />
To start an application with gdb you can start gdb as follows:<br />
<br />
<pre><br />
> gdb kedit<br />
GNU gdb 4.95.0<br />
Copyright 2000 Free Software Foundation, Inc.<br />
GDB is free software, covered by the GNU General Public License, and you are<br />
welcome to change it and/or distribute copies of it under certain conditions.<br />
Type "show copying" to see the conditions.<br />
There is absolutely no warranty for GDB. Type "show warranty" for details.<br />
This GDB was configured as "i686-pc-linux-gnu"...<br />
(gdb)<br />
</pre><br />
<br />
You can now set the command line arguments that you want to pass to kedit with<br />
the gdb command "<tt>set args</tt>":<br />
<br />
<pre><br />
(gdb) set args myfile.txt<br />
(gdb)<br />
</pre><br />
<br />
gdb has loaded the kedit executable on startup but it hasn't loaded any of<br />
the libraries yet. This means that you can't set any breakpoints in the<br />
libraries yet. The easiest way to do that is to set a breakpoint in the<br />
first line of main and then start the program:<br />
<br />
<pre><br />
(gdb) break main<br />
Breakpoint 1 at 0x804855c<br />
(gdb) run<br />
Starting program: /ext/kde2.0/bin/kedit myfile.txt<br />
Breakpoint 1 at 0x4002cf18: file kedit.cpp, line 1595.<br />
<br />
Breakpoint 1, main (argc=2, argv=0xbffff814) at kedit.cpp:1595<br />
1595 bool have_top_window = false;<br />
Current language: auto; currently c++<br />
(gdb)<br />
</pre><br />
<br />
You can now set breakpoints everywhere. For example lets set a breakpoint<br />
in the KApplication constructor. Unfortunately, gdb is not very good in<br />
handling C++ names, so it is not really possible to specify the constructor<br />
directly after the break command. Instead we look up a line of source<br />
code where we want to place the breakpoint. An external editor is of great<br />
use at this point. With the list command we can select the source file we<br />
are interested in and verify that we have found the correct source line:<br />
<br />
<pre><br />
(gdb) list kapp.cpp:220<br />
215 parseCommandLine( argc, argv );<br />
216 }<br />
217<br />
218 KApplication::KApplication( bool allowStyles, bool GUIenabled ) :<br />
219 QApplication( *KCmdLineArgs::qt_argc(), *KCmdLineArgs::qt_argv(),<br />
220 GUIenabled ),<br />
221 KInstance( KCmdLineArgs::about),<br />
222 d (new KApplicationPrivate)<br />
223 {<br />
224 if (!GUIenabled)<br />
(gdb) break 224<br />
Breakpoint 2 at 0x4048aa7e: file kapp.cpp, line 224.<br />
(gdb)<br />
</pre><br />
<br />
We can now continue the execution of kedit. Execution will stop when it hits<br />
a breakpoint or when the program exits. In this case execution will stop<br />
in the first line of the KApplication constructor:<br />
<br />
<pre><br />
(gdb) continue<br />
Continuing.<br />
Qt: gdb: -nograb added to command-line options.<br />
Use the -dograb option to enforce grabbing.<br />
<br />
Breakpoint 2, KApplication::KApplication (this=0xbffff6a8, allowStyles=true,<br />
GUIenabled=true) at kapp.cpp:224<br />
224 if (!GUIenabled)<br />
(gdb)<br />
</pre><br />
<br />
{{Note|<br />
Important: many applications use "KUniqueApplication" to ensure that only one instance can exist at a given time in a given KDE session. This is the case for kwin, kontact, konsole, plasma, etc. To debug those applications, attach to them while they're running (see next section) or use <tt>set args --nofork</tt><br />
}}<br />
<br />
==Attaching gdb to already running applications==<br />
<br />
Sometimes it is not practical to start an application from within gdb.<br />
E.g. in those cases where you didn't know the application was about to<br />
crash :-) When you get the friendly DrKonqi dialog informing you about<br />
a crash you are just in time to start your debugger.<br />
<br />
First lets attach gdb to an application that hasn't crashed (yet).<br />
<br />
You start with finding the process of the application with e.g. <tt>ps -aux</tt>:<br />
<br />
<pre><br />
> ps -aux | grep kedit<br />
bastian 21570 15.1 6.8 13740 8800 pts/6 S 15:34 0:01 kedit<br />
bastian 21582 0.0 0.3 1132 412 pts/6 R 15:34 0:00 grep kedit<br />
</pre><br />
<br />
From this you learn that kedit has process id 21570. Now you can start gdb as<br />
follows:<br />
<br />
<pre><br />
> gdb kedit 21570<br />
GNU gdb 4.95.0<br />
Copyright 2000 Free Software Foundation, Inc.<br />
GDB is free software, covered by the GNU General Public License, and you are<br />
welcome to change it and/or distribute copies of it under certain conditions.<br />
Type "show copying" to see the conditions.<br />
There is absolutely no warranty for GDB. Type "show warranty" for details.<br />
This GDB was configured as "i686-pc-linux-gnu"...<br />
/home1/bastian/21570: No such file or directory.<br />
Attaching to program: /ext/kde2.0/bin/kedit, Pid 21570<br />
Reading symbols from /ext/kde2.0/lib/kedit.so.0...done.<br />
Loaded symbols for /ext/kde2.0/lib/kedit.so.0<br />
...<br />
Reading symbols from /lib/ld-linux.so.2...done.<br />
Loaded symbols for /lib/ld-linux.so.2<br />
Reading symbols from /lib/libnss_compat.so.2...done.<br />
Loaded symbols for /lib/libnss_compat.so.2<br />
Reading symbols from /lib/libnsl.so.1...done.<br />
Loaded symbols for /lib/libnsl.so.1<br />
0x40c3d88e in __select () from /lib/libc.so.6<br />
(gdb)<br />
</pre><br />
<br />
You will usually end up in the middle of a select() call from the event-loop.<br />
This is the place where a KDE application spends most of its time, waiting<br />
for things to happen.<br />
<br />
A backtrace will typically look something like this:<br />
<br />
<pre><br />
(gdb) bt<br />
#0 0x40c3d88e in __select () from /lib/libc.so.6<br />
#1 0x40a22844 in __DTOR_END__ () at fam.c++:356<br />
#2 0x407293bf in QApplication::enter_loop (this=0xbffff6e8)<br />
at kernel/qapplication.cpp:2552<br />
#3 0x406b1d7b in QApplication::exec (this=0xbffff6e8)<br />
at kernel/qapplication_x11.cpp:2217<br />
#4 0x4002d500 in main (argc=1, argv=0xbffff854) at kedit.cpp:1662<br />
#5 0x40bbba5e in __libc_start_main (main=0x8048568 &lt;main&gt;, argc=1,<br />
argv=0xbffff854, init=0x8048514 &lt;_init&gt;, fini=0x80486cc &lt;_fini&gt;,<br />
rtld_fini=0x4000aa20 &lt;_dl_fini&gt;, stack_end=0xbffff84c)<br />
at ../sysdeps/generic/libc-start.c:92<br />
(gdb)<br />
</pre><br />
<br />
==Debugging core files with GDB==<br />
<br />
Debugging process requires much memory. If you have to inspect crash, you can debug core files. It's much faster and requires less memory. First limit the maximum size of core files and run the application:<br />
<pre><br />
ulimit -c 100000<br />
kedit --nocrashhandler<br />
</pre><br />
Do not forget to use <tt>--nocrashhandler</tt> option. Core file would be created if the application crashed, so you can use gdb with created core file:<br />
<pre><br />
gdb kedit ./core-file #in my system it is core.PID<br />
</pre><br />
<br />
==Improving your gdb experience for KDE/Qt applications==<br />
{{Warning|[[KDE/FAQs/Debugging FAQ#How do I print a QString in gdb?]] refers to ''different'' GDB scripts, in [https://invent.kde.org/sdk/kde-dev-scripts/ sdk/kde-dev-scripts]}}<br />
<br />
Since version 7 GDB supports Python scripting for pretty printers. There are such scripts for basic Qt types (QString, QList, QMap, QHash, QDateTime and many others) in [https://invent.kde.org/kdevelop/kdevelop/-/tree/master/plugins/gdb/printers KDevelop git repository]. Download the scripts and add following lines to your ~/.gdbinit to load the scripts automatically as start:<br />
<pre><br />
python<br />
import sys<br />
sys.path.insert(0, '/folder/where/you/downloaded/the/scripts')<br />
from qt import register_qt_printers<br />
from kde import register_kde_printers<br />
<br />
register_qt_printers (None)<br />
register_kde_printers (None)<br />
end<br />
<br />
set print pretty on<br />
</pre><br />
<br />
If you want to go even further, you can apply those [http://developer.kde.org/documentation/other/gdb-patches patches to the gdb source],<br />
to fix a few annoyances in gdb:<br />
<br />
* source.c: don't try to open a directory in "." that has the same name as the executable we want to open (not needed for gdb-6.0 and above)<br />
* symfile.c: no prompting at end of page while opening shared libraries (not needed for gdb-6.2 and above)<br />
* solib.c: less output when opening shared libraries<br />
<br />
Those patches are maintained by [mailto:faure@kde.org David Faure].<br />
<br />
Have fun with gdb! Hmm, ok, the definition of 'fun' is very relative...</div>Skierpagehttps://community.kde.org/index.php?title=Baloo&diff=93564Baloo2022-01-12T02:56:09Z<p>Skierpage: /* Indexing limitations */ mention kmimetypefinder5 and the glib bug that changes HTML mime types</p>
<hr />
<div>[[File:Mascot konqi-support-search.png|thumbnail|right|Help [[Konqi]] find what he wants!]]<br />
Baloo is the file indexing and file search framework for KDE Plasma, with a focus on providing a very small memory footprint along with with extremely fast searching.<br />
<br />
== Ways to communicate ==<br />
:Mailing List: kde-devel@kde.org ([https://mail.kde.org/mailman/listinfo/kde-devel info page])<br />
:IRC Channel: #kde-devel on freenode<br />
:Phabricator project: https://phabricator.kde.org/project/view/261<br />
<br />
== Top bugs and feature requests ==<br />
'''Bugs:''' https://bugs.kde.org/buglist.cgi?bug_severity=critical&bug_severity=grave&bug_severity=major&bug_severity=crash&bug_severity=normal&bug_severity=minor&bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=ASSIGNED&bug_status=REOPENED&list_id=1629910&priority=VHI&priority=HI&product=frameworks-baloo&query_format=advanced<br />
<br/><br/><br />
'''Feature requests:''' https://bugs.kde.org/buglist.cgi?bug_severity=wishlist&bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=ASSIGNED&bug_status=REOPENED&list_id=1629911&priority=VHI&priority=HI&product=frameworks-baloo&query_format=advanced<br />
<br />
== Indexing limitations ==<br />
Baloo uses the file metadata extractors in [https://invent.kde.org/frameworks/kfilemetadata KFileMetadata] to get information about each file it indexes.<br />
This means for a file's content to be indexed<br />
* the file must have a recognizable MIME type<br />
* KDE must have an extractor for that MIME type. Use the command-line utility <code>kmimetypefinder5</code> to determine a file's mime type.<br />
** Due to a [https://gitlab.gnome.org/GNOME/glib/-/issues/2511#note_1293471 glib bug], the MIME type of HTML files can change from <code>text/html</code> to <code>application/x-extension-html</code>. The KDE file metadata extractors don't recognize the latter. That bug has a workaround to reset the MIME types to the usual values.<br />
<br />
Other limitations:<br />
* Baloo doesn't index text files (those whose MIME type is detected as "text/''something''") over 10 MB ([https://invent.kde.org/frameworks/baloo/-/blob/master/src/file/extractor/app.cpp#L143 source]).<br />
* The KFileMetadata extractor for text attempts to convert text to Unicode. If the file uses another encoding, such as iso-8859-1, any file contents after the first character that is invalid in Unicode will not be indexed. You may find the <code>-i</code> option to the <code>file</code> command-line utility useful; it tries to infer the character set of a file, e.g. <kbd>file -i ''path/to/myfile.txt''</kbd>.<br />
<br />
== Other Baloo pages here ==<br />
Information may be obsolete.<br />
{{Special:PrefixIndex/{{FULLPAGENAME}}/}}<br />
<br />
== Using Baloo ==<br />
<br />
Baloo is not an application, but a daemon to index files. Applications can use the Baloo framework to provide file search results. For example, [[Dolphin]]'s Content search can use Baloo.<br />
<br />
KDE System Settings > File Search provides an [http://vhanda.in/blog/2014/04/desktop-search-configuration/ intentionally limited number of settings]. You can make additional adjustments in [[Baloo/Configuration | Baloo's configuration file]].<br />
<br />
== balooctl ==<br />
<br />
<code>balooctl</code> is a CLI command to perform certain operations on Baloo. Enter <code>balooctl --help</code> in a terminal app such as [[userbase:Konsole]] to list its available subcommands.<br />
<br />
See also [[Baloo/Debugging]].</div>Skierpagehttps://community.kde.org/index.php?title=Baloo/Debugging&diff=93563Baloo/Debugging2022-01-11T10:13:08Z<p>Skierpage: /* General testing procedure */ add section about indexing a file</p>
<hr />
<div>Baloo is responsible for searching through files. Given that every system is quite different, and many different files can have different results, there can be some issues with Baloo. This page aims at helping you debug what exactly is going on and how to report the issue appropriately.<br />
<br />
If you're in doubt, and not sure what is going on, please just file a bug and provide whatever information you feel may be appropriate. The developers will ask for more information and provide steps for you to follow.<br />
<br />
== Baloo is consuming too much CPU / RAM / Disk IO ? ==<br />
The Baloo Project is responsible for many different parts of KDE. The developers need to know exactly which component is problematic. It would be best if you checked what the offending process is called.<br />
<br />
KSysGuard and Plasma System Monitor should be able to tell CPU, RAM and disk usage for baloo processes, but KSysGuard requires you to manually add disk usage columns.<br />
<br />
=== <tt>baloo_file</tt> === <br />
<br />
This process is responsible for scheduling the indexing of files and save the name of the file. If this process is consuming too much CPU or Disk IO, it's probably due to the initial indexing. Based on your hard drive speed, baloo_file is able to do somewhere between 100 to 1000 files per second. Depending on how many files you have, it could take a couple of minutes. It would be best to just wait for a couple of minutes.<br />
<br />
You can check which files are currently being scanned with <tt>balooctl monitor</tt> and the current indexing status with <tt>balooctl status</tt>.<br />
<br />
If you feel that you have been waiting for quite some time, and the <tt>baloo_file</tt> process is still consuming too much CPU or disk IO, please file a bug.<br />
<br />
<br />
=== <tt>balooshow</tt> ===<br />
<br />
<tt>balooshow</tt>prints debug information about a file. <br />
<br />
$ balooshow /home/vishesh/file.jpg<br />
4 /home/vishesh/file.jpg<br />
Width: 713<br />
Height: 955<br />
Photo X Dimension: 713<br />
Photo X Dimension: 955 <br />
<br />
If <tt>baloosearch <i>search terms</i></tt> does not find a file that should match, then run <tt>balooshow -x <i>/path/to/file</i></tt> for the file which Baloo does not return. It should print information similar to what is being printed above, including the file information and terms in the file that Baloo should have indexed. If no information is printed, then please check the following<br />
<br />
* The file is not in Baloo's list of exclude folders<br />
* The <tt>baloo_file</tt> process is running.<br />
<br />
=== Find by filename ===<br />
<tt>balooshow -x</tt> displays additional information, including the terms that Dolphin's Find > by Filename search matches. For example,<br />
<br />
$ balooshow -x path/to/日本国_déjà_γενεος.txt`<br />
...<br />
File Name Terms: Fdeja Ftxt Fγενεος deja txt γενεος<br />
<br />
If you type more than one character in the Dolphin file browser's find by Filename field, it searches these terms anchored at the start, thus searching for "de", "γε", etc. should return this file.<br />
<br />
=== <tt>baloosearch</tt> ===<br />
<br />
The Baloosearch tool can be used to perform simple searches.<br />
<br />
$ baloosearch fire<br />
77040 /home/vishesh/kde5/src/qt5/qtimageformats/tests/shared/images/mng/fire.mng<br />
237751 /home/vishesh/Videos/Catching Fire Epic Review Special Edition.mp4<br />
237788 /home/vishesh/Videos/The Hunger Games Catching Fire (2013) [1080p]<br />
237790 /home/vishesh/Videos/fire.mp4<br />
53907 /home/vishesh/kde5/src/qt5/qtwebkit/Source/WebCore/html/MediaController.cpp<br />
54051 /home/vishesh/kde5/src/qt5/qtwebkit/Source/WebCore/html/HTMLMediaElement.cpp<br />
52257 /home/vishesh/kde5/src/qt5/qtwebkit/Source/WebCore/platform/ThreadTimers.cpp<br />
52867 /home/vishesh/kde5/src/qt5/qtwebkit/Source/WebCore/loader/NavigationScheduler.cpp<br />
53568 /home/vishesh/kde5/src/qt5/qtwebkit/Source/WebCore/html/track/TrackListBase.cpp<br />
52255 /home/vishesh/kde5/src/qt5/qtwebkit/Source/WebCore/platform/Timer.cpp<br />
<br />
You should try searching for the file with this command.<br />
<br />
If the file is not found even though it is indexed, then please file a bug with the exact search term, and the relevant words in the file.<br />
<br />
== General testing procedure ==<br />
<br />
This procedure should provide you a cozy method to check if '''baloo''' is experiencing issues as well as files to attach to your bug reports. It assumes you have a single file that has failed indexing for whatever reason.<br />
<br />
* Open two '''Konsole''' windows and tile one to the left (A) and the other to the right (B);<br />
* On '''Konsole''' A, run <code>balooctl monitor | tee -a baloomon.txt</code> and leave it running, this should leave a log of a full index by the end of this procedure;<br />
* On '''Konsole''' B, run <code>balooctl status</code><br />
<br />
You should get output like the following if everything has already been indexed and one file failed:<br />
{{Output|1=<nowiki><br />
Baloo File Indexer is running<br />
Indexer state: Idle<br />
Total files indexed: 1.000<br />
Files waiting for content indexing: 0<br />
Files failed to index: 1<br />
Current size of index is 10,00 MiB<br />
</nowiki>}}<br />
<br />
* If you do have a failed file, run <code>balooctl failed | tee -a baloofailed.txt</code> to show which file has failed on your terminal and append it to a file named <tt>baloofailed.txt</tt>. Then, manually check the file path and run <code>balooshow /path/to/faulty/file | tee -a baloofailed.txt</code> to append the debug information about the file;<br />
<br />
* On '''Konsole''' B, run <code>balooctl purge</code>;<br />
<br />
* See if there's anything on Konsole A running the monitor tool that seems suspicious, like if it's staggering at the failing file;<br />
<br />
* By the end, on Konsole B, run <code>balooctl status</code> again, and on Konsole A cancel the monitoring with <keycap>Ctrl+C</keycap>.<br />
<br />
Is the file still failing to index? Then the issue is consistently reproducible, please report it over https://bugs.kde.org.<br />
<br />
If the file is now indexing correctly, then it's not a consistently reproducible issue, but this might still indicate something to be worked on, requiring further reporting steps. Please report the issue over https://bugs.kde.org and follow any instructions the developers might ask of you.<br />
<br />
Remember to attach the generated files on your bug report!<br />
<br />
{{Note | If you have manually enabled the new systemd initialization, then you may also use <nowiki>journalctl --unit plasma-baloorunner --output=cat > baloojournal.txt</nowiki> to create a log file of baloo.}}<br />
<br />
=== Indexing a file directly ===<br />
Using the above technique you can copy or modify a problematic file and watch for errors. You can also run <code>balooctl clear <em>/path/to/problemfile</em></code> followed by <code>balooctl index <em>/path/to/problemfile</em></code> to force a reindex and possibly see additional debug output.<br />
<br />
== Determining content indexing duration ==<br />
<br />
Here's a simple bash script to output and log the state and date of balooctl status immediately after purging the index in order to determine how fast your files get indexed:<br />
<br />
<syntaxhighlight lang="bash" line><br />
#!/bin/bash<br />
balooctl purge &>/dev/null<br />
sleep 2<br />
balooctl status | grep -B1 "indexing" | tee balootime.txt 2>/dev/null<br />
date "+%T" | tee -a balootime.txt<br />
while sleep 2; do<br />
balooctl status | grep -B1 "indexing" | tee -a balootime.txt 2>/dev/null<br />
date "+%T" | tee -a balootime.txt<br />
done<br />
</syntaxhighlight><br />
<br />
What it does:<br />
* Purges the database<br />
* Fetches only the lines "Total files indexed" and "Files waiting for content indexing", redirecting standard output to a file named <tt>balootime.txt</tt> and removes standard error<br />
* Prints that and the current time continuously every two seconds<br />
Since it ends on a loop, you'll need to press <keycap>Ctrl+C</keycap> once "Files waiting for content indexing" reaches 0. If you have over 10,000 files, you may want to change the loop time to 5 to 15 seconds instead.<br />
<br />
For a general comparison, on a machine with an SSD and 1559 files to be indexed, immediately after a purge, 4 seconds are required to index all files (going from 0 to 1559 instantly) and 35 seconds are required to index the content of all files. These values might be different for you depending on your machine's specs, the number of total files, and their format.<br />
<br />
In case you think your indexing is taking more time than it should, please refer to the above general testing procedure to determine whether you should file a bug report.</div>Skierpagehttps://community.kde.org/index.php?title=Baloo&diff=93562Baloo2022-01-11T10:08:00Z<p>Skierpage: /* balooctl */ link to Debugging</p>
<hr />
<div>[[File:Mascot konqi-support-search.png|thumbnail|right|Help [[Konqi]] find what he wants!]]<br />
Baloo is the file indexing and file search framework for KDE Plasma, with a focus on providing a very small memory footprint along with with extremely fast searching.<br />
<br />
== Ways to communicate ==<br />
:Mailing List: kde-devel@kde.org ([https://mail.kde.org/mailman/listinfo/kde-devel info page])<br />
:IRC Channel: #kde-devel on freenode<br />
:Phabricator project: https://phabricator.kde.org/project/view/261<br />
<br />
== Top bugs and feature requests ==<br />
'''Bugs:''' https://bugs.kde.org/buglist.cgi?bug_severity=critical&bug_severity=grave&bug_severity=major&bug_severity=crash&bug_severity=normal&bug_severity=minor&bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=ASSIGNED&bug_status=REOPENED&list_id=1629910&priority=VHI&priority=HI&product=frameworks-baloo&query_format=advanced<br />
<br/><br/><br />
'''Feature requests:''' https://bugs.kde.org/buglist.cgi?bug_severity=wishlist&bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=ASSIGNED&bug_status=REOPENED&list_id=1629911&priority=VHI&priority=HI&product=frameworks-baloo&query_format=advanced<br />
<br />
== Indexing limitations ==<br />
Baloo uses the file metadata extractors in [https://invent.kde.org/frameworks/kfilemetadata KFileMetadata] to get information about each file it indexes.<br />
This means for a file's content to be indexed<br />
* the file must have a recognizable MIME type<br />
* KDE must have an extractor for that MIME type<br />
<br />
Other limitations:<br />
* Baloo doesn't index text files (those whose MIME type is detected as "text/''something''") over 10 MB ([https://invent.kde.org/frameworks/baloo/-/blob/master/src/file/extractor/app.cpp#L143 source]).<br />
* The KFileMetadata extractor for text attempts to convert text to Unicode. If the file uses another encoding, such as iso-8859-1, any file contents after the first character that is invalid in Unicode will not be indexed. You may find the <code>-i</code> option to the <code>file</code> command-line utility useful; it tries to infer the character set of a file, e.g. <kbd>file -i ''path/to/myfile.txt''</kbd>.<br />
<br />
== Other Baloo pages here ==<br />
Information may be obsolete.<br />
{{Special:PrefixIndex/{{FULLPAGENAME}}/}}<br />
<br />
== Using Baloo ==<br />
<br />
Baloo is not an application, but a daemon to index files. Applications can use the Baloo framework to provide file search results. For example, [[Dolphin]]'s Content search can use Baloo.<br />
<br />
KDE System Settings > File Search provides an [http://vhanda.in/blog/2014/04/desktop-search-configuration/ intentionally limited number of settings]. You can make additional adjustments in [[Baloo/Configuration | Baloo's configuration file]].<br />
<br />
== balooctl ==<br />
<br />
<code>balooctl</code> is a CLI command to perform certain operations on Baloo. Enter <code>balooctl --help</code> in a terminal app such as [[userbase:Konsole]] to list its available subcommands.<br />
<br />
See also [[Baloo/Debugging]].</div>Skierpagehttps://community.kde.org/index.php?title=KWin/Wayland&diff=93453KWin/Wayland2021-12-08T06:20:36Z<p>Skierpage: add new section "Determining and setting the window system that KDE applications use"; I apologize if this info is somewhere else</p>
<hr />
<div>= What is Wayland? =<br />
[http://wayland.freedesktop.org Wayland] is a small display server protocol and IPC library which is considered to have the chance to replace X11 as primary windowing system. But Wayland is not a direct successor of X and does not follow the design of X. The display server is directly moved into the Compositor (that is KWin) and clients connect to this server through a Unix socket.<br />
<br />
= Why Plasma needs Wayland? =<br />
<br />
X has some serious issues and is rather old. The protocol is designed for the usecases three decades ago. Over the last years more and more functionality has been moved from X either into the kernel or into the compositors. The X server is more or less only a proxy between kernel, compositor and the X clients.<br />
<br />
Today the compositor does everything the X server used to do. There are some remaining features not yet moved into the compositor (e.g. input handling) but those would make most sense in the compositor. The best situation would be to let the compositor directly work together with the kernel for rendering and input handling and manage the clients directly, which means to remove the Proxy. This is what Wayland is about. More reasons for Wayland in the [http://wayland.freedesktop.org/faq.html FAQ].<br />
<br />
In Plasma we need Wayland support as we are hitting the limitations of X all the time. Wayland will simplify our architecture and allow us to composite the screen in the way we consider as most useful.<br />
<br />
= Wayland Support in Plasma =<br />
<br />
Wayland support in the KDE Plasma Workspaces is in a tech-preview state. The workspaces have been developed for X11 and much functionality relies on X11. To be able to make proper use of Wayland these bits have to be rewritten.<br />
<br />
The most complex task is to implement Wayland support in KWin, KDE Plasma's Compositor and Window Manager. Since 5.4 KWin is able to manage Wayland clients and this allows to start a Plasma session on Wayland.<br />
<br />
= Why not a new Compositor? =<br />
<br />
Given that KWin was designed as a X11 Window Manager and later as a X11 compositor the question is valid, why not to implement a new Wayland compositor from scratch. Most parts of KWin are X11 independent. E.g. the Desktop Effect system is able to integrate Wayland clients without any change, the same is true for Window Decorations and other parts.<br />
<br />
Another reason is that the KWin development team does not have the manpower to maintain an independent X11 window manager and a Wayland compositor. Starting a new Wayland compositor would mean to stop the work on the X11 window manager, which would be a bad move as we cannot know yet whether Wayland will succeed and will be supported on all hardware. Also in future KDE will have to provide an X11 window manager.<br />
<br />
KWin is known as one of the most feature complete and most stable window managers. More than a decade of development effort has gone into this Window Manager. Reaching feature parity in a new Wayland compositor seems hardly possible if rewritten from scratch.<br />
<br />
Writing a new Wayland Compositor would require to rewrite the complete X11 workspace in one go. This includes not only the Window Manager, but also parts of Plasma, Screen Locker and many, many more. This would take a long development time and the transition would not be smooth, very likely buggy and with regressions like the 4.0 introduction. We do not want to break the desktop!<br />
<br />
= Determining and setting the window system that KDE applications use =<br />
System Settings > About this System shows <br />
: Graphics Platform: Wayland<br />
<br />
if running under Wayland, otherwise "X11". Each application's Help > About ''App name'' > Components dialog shows either "The ''xcb'' windowing system" or "The ''wayland'' windowing system".<br />
<br />
== Forcing KDE apps to run as X11 ==<br />
KWin Wayland supports unmodified X11 applications by implmenting the "XWayland" protocol to provide an X11 server. There are various command-line options to <code>/usr/bin/kwin_wayland</code> to enable and configure this. The X11 applications talk to this server and work reasonably well, though utilities such as clipboard managers and screen capture programs will probably have problems. It should start <br />
<br />
To make KDE applications use X11, in a terminal such as Konsole enter<br />
{{Input|1=QT_QPA_PLATFORM=xcb /usr/bin/kfontview<br />
}}<br />
replacing <code>kfontview</code> with the path to the application's binary.<br />
<br />
It is also possible to restart your KDE window system using the other window system. {{TODO|how to do this? Is it standardized}}<br />
<br />
= Starting a nested KWin =<br />
Since 5.3 it is possible to start a nested KWin instance under either X11 or Wayland:<br />
{{Input|1=export $(dbus-launch)<br />
kwin_wayland --xwayland<br />
}}<br />
You can use the <code>--socket</code> option when launching from another Wayland session. It is used to define a different socket name than the one used by the current Wayland session.<br />
<br />
The option <code>--xwayland</code> is required to start a nested X server. The id of the created X11 Display is printed to stdout, e.g.:<br />
{{Input|1=<br />
X-Server started on display :1<br />
}}<br />
<br />
Normally it picks the next free id, e.g. if the system X is on display ":0", it will pick ":1".<br />
<br />
With that it's possible to start an application on the nested X Server, e.g.:<br />
{{Input|1=DISPLAY=:1 kwrite<br />
}}<br />
<br />
The nested KWin is started on your primary windowing system. E.g. if the DISPLAY environment variable is defined it will start on X11, if the WAYLAND_DISPLAY environment variable is defined it will start on Wayland. It is also possible to explicitly set the system to use by passing command line argument "--x11-display" or "--wayland-display".<br />
<br />
To run a Qt application as a Wayland client on this KWin instance, as above one just needs to set the qpa platform to wayland:<br />
{{Input|1=QT_QPA_PLATFORM=wayland kwrite<br />
}}<br />
<br />
= Running on a tty =<br />
<br />
As an alternative one can also specify which backend to use. On a tty both --drm and --framebuffer are supported, though only --drm provides OpenGL acceleration. If none is specified it will use the DRM backend.<br />
<br />
The option "--xwayland" is required to start a nested X server. Normally it picks the next free display id, so if an X Server is running on ":0" it picks ":1".<br />
<br />
Once the screen turned black KWin has taken over the display and one can open windows on the Xwayland server. Therefore go to another tty and start an application by passing the correct DISPLAY variable:<br />
{{Input|1=DISPLAY=:1 kwrite<br />
}}<br />
<br />
Now switching back to the tty KWin is running on should show the started window and allow to interact with it. Support for running KWin on a tty is still in it's early stages. Bugs are to be expected and there are known missing features. Please consider it only as a mode to experiment with.<br />
<br />
= Start a Plasma session on Wayland =<br />
First go to a tty (Press Ctrl+Alt+F3 for instance) and log in.<br />
Then run the following command:<br />
{{Input|1=dbus-run-session startplasma-wayland<br />
}}<br />
<br />
= Reading wayland session logs =<br />
If you started the wayland session from SDDM, logs are located at ''~/.local/share/sddm/wayland-session.log'' :<br />
{{Input|1=tail -f ~/.local/share/sddm/wayland-session.log<br />
}}<br />
<br />
= I found a bug, what should I do? =<br />
<br />
[https://bugs.kde.org Fill a bug!] associated with the wayland keyword.<br />
<br />
Then if you have the time open your text editor, fix it and open a review request on [https://phabricator.kde.org/ phabricator].<br />
You can find phabricator and arc documentation at https://community.kde.org/Infrastructure/Phabricator<br />
<br />
= I want to help =<br />
<br />
Great, get in touch with us either through kwin at kde dot org or plasma dash devel at kde dot org or find us in #kwin or #plasma on Libera Chat. There is lots to work on and we can use every helping hand.<br />
<br />
= More Information =<br />
* [https://www.proli.net/2020/04/03/developing-kwin-wayland/ "Blog post about developing KWin Wayland"]<br />
* Presentation on Desktop Summit 2011: [[Media:KWin_Wayland.pdf|Slides]]<br />
* Presentation at Akademy 2014: [https://conf.kde.org/system/attachments/43/original/kwin-akademy-2014.pdf Slides "The state of KWin/Wayland"]<br />
* Presentation at Akademy 2015: [https://conf.kde.org/system/attachments/75/original/presentation.pdf Slides "Welcome to Masachusetts"]</div>Skierpagehttps://community.kde.org/index.php?title=Guidelines_and_HOWTOs/Flatpak&diff=93452Guidelines and HOWTOs/Flatpak2021-12-08T03:09:58Z<p>Skierpage: /* Applications */ rephrase for clarity</p>
<hr />
<div>Flatpak is a solution for creating sandboxed software builds for GNU/Linux systems. You can find more information [http://flatpak.org/ here].<br />
<br />
= Applications =<br />
We are building release versions of most KDE applications and distributing them on flathub, https://flathub.org.<br />
We are also building "nightly" versions of most KDE applications and distributing them at https://distribute.kde.org. The latter builds the latest source code of the application, so expect some unstable development quirks; on the bright side, if you find one, you get to tell the developers so they can fix it!<br />
<br />
The "app store" or software center in many distributions is able to install Flatpaks.<br />
You can simply open the flatpakrepo files with Discover or your otherwise favorite software center:<br />
* https://flathub.org/repo/flathub.flatpakrepo<br />
* https://distribute.kde.org/kdeapps.flatpakrepo<br />
and then when you search for a KDE application it should offer to install the flatpak version.<br />
<br />
Here's how to install a Flatpak application from the terminal:<br />
<syntaxhighlight lang="bash"><br />
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo<br />
flatpak remote-add --if-not-exists kdeapps --from https://distribute.kde.org/kdeapps.flatpakrepo<br />
flatpak install kdeapps org.kde.okular<br />
</syntaxhighlight><br />
<br />
If you added both the Flathub and kdeapps repos, the `flatpak` command-line tool will prompt you which one you want, something like:<br />
<syntaxhighlight><br />
flatpak install skrooge<br />
Looking for matches…<br />
Remotes found with refs similar to ‘skrooge’:<br />
<br />
1) ‘flathub’ (system)<br />
2) ‘kdeapps’ (system)<br />
<br />
Which do you want to use (0 to abort)? [0-2]: 2<br />
Found ref ‘app/org.kde.skrooge/x86_64/master’ in remote ‘kdeapps’ (system).<br />
Use this ref? [Y/n]: y<br />
</syntaxhighlight><br />
<br />
== Build status ==<br />
The Continuous Integration that triggers many of the nightly flatpak builds is at https://binary-factory.kde.org. If a flatpak is not updated or has a problem, you may be able to look at build logs here and puzzle out why.<br />
<br />
= For developers =<br />
== Qt and KF5 Runtime ==<br />
We provide a runtime with Qt and all KDE Frameworks 5 (except for the 4th tier) to make sure it's easily adaptable for any KDE Application and possibly most Qt-based applications as well.<br />
Installing a KDE application's flatpak should automatically install an appropriate version of the runtime.<br />
<br />
This runtime, and optionally its SDK for program development, can be added by following these instructions:<br />
<syntaxhighlight lang="bash"><br />
flatpak install flathub org.kde.Platform//5.15<br />
flatpak install flathub org.kde.Sdk//5.15<br />
</syntaxhighlight><br />
<br />
{{ Note | All flatpak commands (such as <code>remote-add</code> and <code>install</code>) accept a <code>--user</code> option to install things at the user level, without being prompted for the sudo password every time. }}<br />
<br />
== Compile your application ==<br />
<br />
Now you get to compile your favorite application. If you want to see how it's done, you can see some of the ones that have already been built. You can find it [https://invent.kde.org/packaging/flatpak-kde-applications/ here].<br />
<br />
To compile applications, you should create a json file similar to the ones in the previous link. Then you'd just need to trigger the build and get it into a repository. For testing, I recommend just creating a local one (to publish an rsync will be required).<br />
<br />
<syntaxhighlight lang="bash"><br />
mkdir app repo<br />
flatpak-builder --ccache --repo=repo --subject="Build of AWESOMEAPP `date`" app org.kde.AWESOMEAPP.json<br />
</syntaxhighlight><br />
<br />
This will do everything required and create a repository in ./repo. To test the application we add the repository (called remotes), we install the application and then we run it:<br />
<syntaxhighlight lang="bash"><br />
flatpak remote-add awesomeapp repo --no-gpg-verify<br />
flatpak install awesomeapp org.kde.AWESOMEAPP<br />
flatpak run org.kde.AWESOMEAPP<br />
</syntaxhighlight><br />
<br />
Now you will see that some things don't work and you'll have the privilege to start fixing things!<br />
<br />
== Contribute! ==<br />
In the following repositories you'll find the code in charge of packaging the runtime (Qt 5 and KF5) and then several (but not all, yet) KDE Applications.<br />
* Runtime: https://invent.kde.org/packaging/flatpak-kde-runtime/<br />
* Applications: https://invent.kde.org/packaging/flatpak-kde-applications/<br />
* Our XDG portals: https://invent.kde.org/plasma/xdg-desktop-portal-kde/<br />
<br />
== Flatpak portals ==<br />
Portals are high-level session bus APIs that provide selective access to resources to sandboxed applications. The implicit expectation of portals is that the user will always be involved in granting or rejecting a portal request, thus most portal APIs will lead to user interaction in the form of dialogs.<br />
<br />
Since such dialogs must fit into the user experience of the desktop shell, the portal APIs are implemented by a generic frontend called [https://github.com/flatpak/xdg-desktop-portal xdg-desktop-portal] which calls out to desktop-specific implementations that provide the actual UI. The bus name through which the portal APIs are available is org.freedesktop.portal.Desktop, with the object path /org/freedesktop/portal/desktop implementing the various portal interfaces.<br />
{{ Note | You can find more information about flatpak portals [https://github.com/flatpak/flatpak/wiki/Portals here]. }}<br />
<br />
=== KDE implementation of portals ===<br />
The KDE backend for flatpak portals is called [https://invent.kde.org/plasma/xdg-desktop-portal-kde xdg-desktop-portal-kde] and is now part of Plasma releases (starting with Plasma 5.10). Currently it supports most of the portals. If you want to test KDE flatpak portals, you can use this [https://invent.kde.org/libraries/xdg-portal-test-kde simple test app].<br />
<br />
====Debugging portals====<br />
To get some debug information, you first kill the running '''xdg-desktop-portal-kde''' instance. Then first start xdg-desktop-portal-kde with:<br />
<syntaxhighlight lang="bash"><br />
QT_LOGGING_RULES='xdg-desktop*.debug=true' /usr/lib/$(uname -m)-linux-gnu/libexec/xdg-desktop-portal-kde<br />
</syntaxhighlight><br />
then in another terminal session restart '''xdg-desktop-portal''' with:<br />
<syntaxhighlight lang="bash"><br />
G_MESSAGES_DEBUG=all /usr/libexec/xdg-desktop-portal --verbose --replace<br />
</syntaxhighlight><br />
You can use above mentioned testing application to test various portals. You should then see debug output from xdp-kde similar to:<br />
<syntaxhighlight lang="bash"><br />
xdg-desktop-portal-kde: Desktop portal registered successfuly<br />
xdg-desktop-portal-kde-file-chooser: OpenFile called with parameters:<br />
xdg-desktop-portal-kde-file-chooser: handle: "/org/freedesktop/portal/desktop/request/1_255/t"<br />
xdg-desktop-portal-kde-file-chooser: parent_window: "x11:1"<br />
xdg-desktop-portal-kde-file-chooser: title: "Flatpak test - open dialog"<br />
xdg-desktop-portal-kde-file-chooser: options: QMap(("accept_label", QVariant(QString, "Open (portal)"))("filters", QVariant(QDBusArgument, ))("modal", QVariant(bool, true))("multiple", QVariant(bool, true)))<br />
</syntaxhighlight><br />
You can see which portal has been called, whether it has been called or when you check output from '''xdg-desktop-portal''' then you should see message in case of portal error (usually related to DBus). You can also monitor dbus messages using '''dbus-monitor''', which indicates whether portals get involved at all as everything goes through DBus.<br />
<br />
= Styles and integration with other desktops =<br />
We are aware that not everyone is using KDE/Qt applications in Plasma desktop. For this flatpak comes with extensions, where you specify a directory (with themes, icons) where third-party is allowed to install additional stuff as an addition to what we have in our runtimes. At this moment we have added support for Gnome in form of adwaita icons and adwaita-qt style. All you need to is install following extensions using commands below:<br />
<syntaxhighlight lang="bash"><br />
flatpak install flathub org.freedesktop.Platform.Icontheme.Adwaita<br />
flatpak install flathub org.kde.KStyle.Adwaita<br />
flatpak install flathub org.kde.PlatformTheme.QGnomePlatform<br />
</syntaxhighlight></div>Skierpagehttps://community.kde.org/index.php?title=Guidelines_and_HOWTOs/Flatpak&diff=93451Guidelines and HOWTOs/Flatpak2021-12-08T03:07:34Z<p>Skierpage: move the information for developers into its own top-level section</p>
<hr />
<div>Flatpak is a solution for creating sandboxed software builds for GNU/Linux systems. You can find more information [http://flatpak.org/ here].<br />
<br />
= Applications =<br />
We are building release versions of most KDE applications and distributing them on flathub, https://flathub.org.<br />
We are also building nightlies of most KDE applications and distributing them at https://distribute.kde.org. This has the master version of the applications, so expect some unstable development quirks; on the bright side, if you find one, you get to tell the developers so they can fix it!<br />
<br />
The "app store" or software center in many distributions is able to install Flatpaks.<br />
You can simply open the flatpakrepo files with Discover or your otherwise favorite software center:<br />
* https://flathub.org/repo/flathub.flatpakrepo<br />
* https://distribute.kde.org/kdeapps.flatpakrepo<br />
and then when you search for a KDE application it should offer to install the flatpak version.<br />
<br />
Here's how to install a Flatpak application from the terminal:<br />
<syntaxhighlight lang="bash"><br />
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo<br />
flatpak remote-add --if-not-exists kdeapps --from https://distribute.kde.org/kdeapps.flatpakrepo<br />
flatpak install kdeapps org.kde.okular<br />
</syntaxhighlight><br />
<br />
If you added both the Flathub and kdeapps repos, the `flatpak` command-line tool will prompt you which one you want, something like:<br />
<syntaxhighlight><br />
flatpak install skrooge<br />
Looking for matches…<br />
Remotes found with refs similar to ‘skrooge’:<br />
<br />
1) ‘flathub’ (system)<br />
2) ‘kdeapps’ (system)<br />
<br />
Which do you want to use (0 to abort)? [0-2]: 2<br />
Found ref ‘app/org.kde.skrooge/x86_64/master’ in remote ‘kdeapps’ (system).<br />
Use this ref? [Y/n]: y<br />
</syntaxhighlight><br />
<br />
== Build status ==<br />
The Continuous Integration that triggers many of the nightly flatpak builds is at https://binary-factory.kde.org. If a flatpak is not updated or has a problem, you may be able to look at build logs here and puzzle out why.<br />
<br />
= For developers =<br />
== Qt and KF5 Runtime ==<br />
We provide a runtime with Qt and all KDE Frameworks 5 (except for the 4th tier) to make sure it's easily adaptable for any KDE Application and possibly most Qt-based applications as well.<br />
Installing a KDE application's flatpak should automatically install an appropriate version of the runtime.<br />
<br />
This runtime, and optionally its SDK for program development, can be added by following these instructions:<br />
<syntaxhighlight lang="bash"><br />
flatpak install flathub org.kde.Platform//5.15<br />
flatpak install flathub org.kde.Sdk//5.15<br />
</syntaxhighlight><br />
<br />
{{ Note | All flatpak commands (such as <code>remote-add</code> and <code>install</code>) accept a <code>--user</code> option to install things at the user level, without being prompted for the sudo password every time. }}<br />
<br />
== Compile your application ==<br />
<br />
Now you get to compile your favorite application. If you want to see how it's done, you can see some of the ones that have already been built. You can find it [https://invent.kde.org/packaging/flatpak-kde-applications/ here].<br />
<br />
To compile applications, you should create a json file similar to the ones in the previous link. Then you'd just need to trigger the build and get it into a repository. For testing, I recommend just creating a local one (to publish an rsync will be required).<br />
<br />
<syntaxhighlight lang="bash"><br />
mkdir app repo<br />
flatpak-builder --ccache --repo=repo --subject="Build of AWESOMEAPP `date`" app org.kde.AWESOMEAPP.json<br />
</syntaxhighlight><br />
<br />
This will do everything required and create a repository in ./repo. To test the application we add the repository (called remotes), we install the application and then we run it:<br />
<syntaxhighlight lang="bash"><br />
flatpak remote-add awesomeapp repo --no-gpg-verify<br />
flatpak install awesomeapp org.kde.AWESOMEAPP<br />
flatpak run org.kde.AWESOMEAPP<br />
</syntaxhighlight><br />
<br />
Now you will see that some things don't work and you'll have the privilege to start fixing things!<br />
<br />
== Contribute! ==<br />
In the following repositories you'll find the code in charge of packaging the runtime (Qt 5 and KF5) and then several (but not all, yet) KDE Applications.<br />
* Runtime: https://invent.kde.org/packaging/flatpak-kde-runtime/<br />
* Applications: https://invent.kde.org/packaging/flatpak-kde-applications/<br />
* Our XDG portals: https://invent.kde.org/plasma/xdg-desktop-portal-kde/<br />
<br />
== Flatpak portals ==<br />
Portals are high-level session bus APIs that provide selective access to resources to sandboxed applications. The implicit expectation of portals is that the user will always be involved in granting or rejecting a portal request, thus most portal APIs will lead to user interaction in the form of dialogs.<br />
<br />
Since such dialogs must fit into the user experience of the desktop shell, the portal APIs are implemented by a generic frontend called [https://github.com/flatpak/xdg-desktop-portal xdg-desktop-portal] which calls out to desktop-specific implementations that provide the actual UI. The bus name through which the portal APIs are available is org.freedesktop.portal.Desktop, with the object path /org/freedesktop/portal/desktop implementing the various portal interfaces.<br />
{{ Note | You can find more information about flatpak portals [https://github.com/flatpak/flatpak/wiki/Portals here]. }}<br />
<br />
=== KDE implementation of portals ===<br />
The KDE backend for flatpak portals is called [https://invent.kde.org/plasma/xdg-desktop-portal-kde xdg-desktop-portal-kde] and is now part of Plasma releases (starting with Plasma 5.10). Currently it supports most of the portals. If you want to test KDE flatpak portals, you can use this [https://invent.kde.org/libraries/xdg-portal-test-kde simple test app].<br />
<br />
====Debugging portals====<br />
To get some debug information, you first kill the running '''xdg-desktop-portal-kde''' instance. Then first start xdg-desktop-portal-kde with:<br />
<syntaxhighlight lang="bash"><br />
QT_LOGGING_RULES='xdg-desktop*.debug=true' /usr/lib/$(uname -m)-linux-gnu/libexec/xdg-desktop-portal-kde<br />
</syntaxhighlight><br />
then in another terminal session restart '''xdg-desktop-portal''' with:<br />
<syntaxhighlight lang="bash"><br />
G_MESSAGES_DEBUG=all /usr/libexec/xdg-desktop-portal --verbose --replace<br />
</syntaxhighlight><br />
You can use above mentioned testing application to test various portals. You should then see debug output from xdp-kde similar to:<br />
<syntaxhighlight lang="bash"><br />
xdg-desktop-portal-kde: Desktop portal registered successfuly<br />
xdg-desktop-portal-kde-file-chooser: OpenFile called with parameters:<br />
xdg-desktop-portal-kde-file-chooser: handle: "/org/freedesktop/portal/desktop/request/1_255/t"<br />
xdg-desktop-portal-kde-file-chooser: parent_window: "x11:1"<br />
xdg-desktop-portal-kde-file-chooser: title: "Flatpak test - open dialog"<br />
xdg-desktop-portal-kde-file-chooser: options: QMap(("accept_label", QVariant(QString, "Open (portal)"))("filters", QVariant(QDBusArgument, ))("modal", QVariant(bool, true))("multiple", QVariant(bool, true)))<br />
</syntaxhighlight><br />
You can see which portal has been called, whether it has been called or when you check output from '''xdg-desktop-portal''' then you should see message in case of portal error (usually related to DBus). You can also monitor dbus messages using '''dbus-monitor''', which indicates whether portals get involved at all as everything goes through DBus.<br />
<br />
= Styles and integration with other desktops =<br />
We are aware that not everyone is using KDE/Qt applications in Plasma desktop. For this flatpak comes with extensions, where you specify a directory (with themes, icons) where third-party is allowed to install additional stuff as an addition to what we have in our runtimes. At this moment we have added support for Gnome in form of adwaita icons and adwaita-qt style. All you need to is install following extensions using commands below:<br />
<syntaxhighlight lang="bash"><br />
flatpak install flathub org.freedesktop.Platform.Icontheme.Adwaita<br />
flatpak install flathub org.kde.KStyle.Adwaita<br />
flatpak install flathub org.kde.PlatformTheme.QGnomePlatform<br />
</syntaxhighlight></div>Skierpagehttps://community.kde.org/index.php?title=Get_Involved/Issue_Reporting&diff=93450Get Involved/Issue Reporting2021-12-08T02:55:36Z<p>Skierpage: /* Step 2: Make sure it hasn't already been fixed */ split into upgrading packages and trying nightly Flatpak.</p>
<hr />
<div>[[File:Mascot konqi-support-bughunt.png|thumbnail|right|Help [[Konqi]] catch some bugs!]]<br />
Have you found a problem with KDE Software, or a way that you think it could be improved? KDE would like to know about it! This page will give you an overview of the process of reporting a bug or making a feature request, teach you how to submit a good report, and walk you through the process of doing so using https://bugs.kde.org, KDE's Bugzilla issue tracker.<br />
<br />
= Issue reporting involves responsibility =<br />
Before you report a Bugzilla ticket, please make sure that you are:<br />
* ...using relatively recent versions of KDE software (≤ 1 year old) or an LTS supported version<br />
* ...willing to do whatever is necessary to get the bug to happen again (if reporting a bug)<br />
* ...willing to correspond with KDE developers about the issue, potentially over an extended period of time<br />
* ...prepared to gather and report a lot of additional information<br />
* ...ready to potentially use a terminal program to execute command line debugging tools<br />
<br />
If those points all apply to you, then we can move on! Let's see now make sure that the issue you're experiencing is something that can be reported.<br />
<br />
= Step 0: Is it a security issue? =<br />
Do not file bug reports for security issues, as this makes the vulnerability public and could expose users to exploits. Instead, send an email to security@kde.org. For more information, see https://kde.org/info/security/.<br />
<br />
= Step 1: Make sure it's a valid bug or feature request =<br />
Real issues involve any of the following:<br />
* Crashes<br />
* Broken functionality<br />
* Anything that causes data loss<br />
* Design issues, such as faulty paddings/margins, misplaced content, lack of consistency with the rest of the desktop, incorrect icon/image rendering, or other user interface anomalies<br />
* Translation problems, where certain words or expressions are inappropriate for a given context, or a part of a program that was not properly translated or is lacking translation<br />
* Typographic errors (typos), unclear instructions or general communication, inappropriate grammar or style, or not conveying a program's functionality correctly<br />
* Usability issues, such as inappropriate default window sizes, excessive or non-optimal amount of clicks to achieve a task, and others<br />
* Accessibility issues, such as text or software itself that cannot be used with a text-to-speech interface or screen reader<br />
* Request for missing features or ideas about how something that's already working could be further improved<br />
<br />
If your issue is on this list, '''proceed onto step 2'''.<br />
<br />
By contrast, here are some examples of issues that are almost never real issues:<br />
* Vague and subjective matters of aesthetics or personal preference (e.g. "The program is ugly")<br />
* Design choices too broad to be changed by a Bugzilla ticket (e.g. "The program should work more like this other program that I'm used to")<br />
* Anything caused by user or vendor configuration choices (e.g. "The program disappeared after I did a system update")<br />
* Support questions ("How do I change such-and-such behavior of the program?")<br />
* Development assistance requests ("Can you help me compile the program?")<br />
<br />
'''Do not file Bugzilla tickets for these kinds of issues'''. Instead, you might try bringing up the matter on the [https://forum.kde.org/ KDE forum] or another online discussion group of your choice.<br />
<br />
Here are examples of issues that ''may'' be valid, but require some more investigation:<br />
* "The program is really slow" (It could be a bug in the software, or it could be an issue with your computer or its configuration)<br />
* "Some of the program's icons are inconsistent" (If you're using a 3rd-party icon theme, that could be causing the problem)<br />
* "The program did something unexpected in response to an action that I took" (this could be a bug or a usability issue, or it could just be that the program's operation is unfamiliar to you)<br />
* "The label for one of the program's user interface controls doesn't clearly indicate what it does" (It could be a badly-worded or badly-translated piece of text, or it could be a 3rd-party widget theme mangling the user interface)<br />
<br />
If your issue is on this list, '''proceed to Step 2''', but be prepared for the issue to be caused by configuration or hardware issues, or simply be an example of unfamiliar behavior.<br />
<br />
= Step 2: Make sure it hasn't already been fixed =<br />
If you've found a real bug or want to report a valid feature request, you're well on your way! But wait... are you using the latest version of the program? If not, it may have already been fixed or implemented in a later release. For example, if you are experiencing an issue with Dolphin 16.04, but the current version of Dolphin is 18.04, then you're missing out on two years worth of bugfixes and new features! Many Linux distros--including popular ones like Linux Mint, Debian Stable, Kubuntu, and openSUSE Leap--will intentionally hold back newer versions in the name of stability.<br />
<br />
== Option A: upgrade your KDE packages ==<br />
You should first upgrade your packages. Here's how to do it for various distros.<br />
{{Warning|Due to the nature of package dependencies, this will upgrade the entire KDE software stack. Do not proceed unless you are okay with this.}}<br />
* Kubuntu: <pre>sudo add-apt-repository ppa:kubuntu-ppa/backports && sudo apt update && sudo apt upgrade</pre><br />
* Fedora: <pre>sudo dnf copr enable zawertun/kde && sudo dnf upgrade --refresh</pre><br />
* openSUSE Leap: [insert openSUSE Leap instructions here; delete list item if it isn't possible]<br />
<br />
If you are unable to upgrade your packages, '''please don't file Bugzilla issues against a version of KDE Software that's more than a year old'''. Many of these bug reports will be closed as already fixed, and this takes up our faithful bug triagers' valuable time!<br />
<br />
If the problem is still present in a recent version of the software, '''proceed to step 3'''.<br />
<br />
== Option B: try a developer Flatpak build ==<br />
Many KDE projects regularly build a "nightly" version of their latest code under development, which you can install. For applications on Linux, the easiest way to try reproducing with this "bleeding edge" code is to install the nightly Flatpak of the application, which you can run independently of updating your system's KDE packages. See [[Guidelines_and_HOWTOs/Flatpak]].<br />
<br />
If the problem is still present in a recent version of the software, '''proceed to step 3'''.<br />
<br />
= Step 3: Make sure you can reproduce it (bugs only) =<br />
So your issue is a real bug, and it's still present in a recent version of the software. But if it only happened once and you cannot get it to happen again no matter what you do, then there is almost no chance that it can be fixed. '''Please do not report bugs that you cannot reproduce'''.<br />
<br />
If you can reproduce the bug, '''proceed to step 4'''.<br />
<br />
= Step 4: Log into or set up a Bugzilla account =<br />
Navigate to https://bugs.kde.org/. If you already have an account, click the "Log in" text and enter your username and password, then '''proceed to Step 5'''. Please note that https://bugs.kde.org does not use the accounts defined on identity.kde.org right now.<br />
<br />
If this is your first time on the KDE Bugzilla, it's time to sign up for an account! Click on the "New Account" text at the top of the page. You will be prompted for your email address and can then proceed with the usual process of setting up an account. Log into your new account and '''proceed to step 5'''.<br />
<br />
= Step 5: Make sure it hasn't already been filed =<br />
First, let's make sure that this issue hasn't already been reported. Navigate to https://bugs.kde.org/query.cgi and search for a few keywords that describe your problem. For example, if the problem is that Dolphin crashes when you attempt to access a Samba share, you might search for "dolphin samba crash".<br />
<br />
Look through the Bugzilla tickets that show up in the search results. If you find one that matches, great! '''Please do not intentionally file a duplicate'''.<br />
<br />
If none of the Bugzilla tickets returned by the search seem to describe your issue, '''proceed to step 6'''.<br />
<br />
= Step 6: File a high-quality Bugzilla ticket =<br />
It's time to file a new Bugzilla ticket! Click on the "New" text in the top-left corner of the screen. You will be presented with a list of products. Take your best guess for what product the ticket should belong to, and don't worry if you get it wrong. This is what KDE's bug triagers are for! Over time you'll get a feel for which products correspond to which issues. Keep in mind the following guidelines:<br />
<br />
=== One issue per Bugzilla ticket ===<br />
A Bugzilla ticket describing multiple issues is not actionable and is likely to be closed. Each Bugzilla ticket '''must''' describe only a single issue; file multiple Bugzilla ticket to report multiple issues. If the conversation in your Bugzilla ticket derails and starts to describe multiple issues, file other Bugzilla ticket to describe them, and try to redirect the conversation back to the original issue.<br />
<br />
=== Describe the problem instead of proposing a solution ===<br />
The problem you're encountering is obvious to you, but it will only be equally obvious to KDE's bug triagers and developers if you describe it with detail and accuracy. If you propose an initial solution without adequately describing the problem, they will have a hard time helping you because they won't be able to figure out what's actually going on. Even if your proposed solution actually makes sense, it will be difficult to verify this without knowing what problem it would be solving. Always describe the problem itself.<br />
<br />
=== Crash reports must include backtraces ===<br />
If you use the DrKonqi crash reporting assistant to report the bug, this will happen automatically. If not, or if the issue is a hang rather than a crash, [[Guidelines and HOWTOs/Debugging/How to create useful crash reports|you must include a backtrace yourself]]. Do not submit a Bugzilla ticket about a crash or a hang if you are unable to include a backtrace, as it is not actionable and will be closed.<br />
<br />
<br/> <br/><br />
In your Bugzilla ticket, include the following information:<br />
<br />
=== Summary ===<br />
Every Bugzilla ticket needs a good title, which goes in the "Summary" field. A good title succinctly describes the issue, can be read as a complete sentence, and avoids using charged language. Examples of good titles:<br />
* "Discover 5.12 crashes when I navigate to an app page and search twice"<br />
* "Gwenview's "Exit Full Screen" button becomes inaccessible when the sidebar is opened"<br />
* "KIO Local copy performance with 50,000 small files in Dolphin is 4.5x slower than using `cp`"<br />
<br />
And here are the kinds of titles that you should avoid:<br />
* "App always crashes"<br />
* "HELP HELP HELP CANNOT ACCESS MY FILES ANYMORE THX"<br />
* "Old version worked much better; new version is terrible"<br />
* "Cannot do anything"<br />
* "bug"<br />
<br />
=== Software versions ===<br />
First, find out what versions of various pieces of KDE software you're running. Open the Info Center program (which is installed in all KDE Plasma environments) and write the following in the top of the Bugzilla ticket:<br />
<blockquote><br />
Distro and version (e.g Kubuntu 17.10)<br /><br />
Qt version (e.g. Qt 5.9.1) <br /><br />
KDE Plasma version (e.g. Plasma 5.12)<br /><br />
KDE Frameworks version (e.g. Frameworks 5.42)<br /><br />
</blockquote><br />
<br />
If your issue involves a KDE app, we need to know the app version, too. You can find that in the Program itself, in the Help menu > About <program> window<br />
<br />
=== Steps to Reproduce ===<br />
Write a detailed ''Steps To Reproduce'' section in the Bugzilla ticket. Here is an example of a perfect Steps to Reproduce section:<br />
<blockquote><br />
'''Steps to Reproduce:'''<br /><br />
1. Open Discover<br /><br />
2. Click on Applications<br /><br />
3. Click on the search box, type an application name (Eg. VLC) and press enter<br /><br />
4. Click on the icon to enter the app description<br /><br />
5. Click on the cross to delete the text written in the search box<br /><br />
6. Click on the search box in order to write another word<br /><br />
7. Write another app name (Eg. Chromium)<br /><br />
8. Press ENTER to confirm the search<br /><br />
9. It always crashes<br /><br />
</blockquote><br />
<br />
=== Screenshots and screen recordings ===<br />
If the Bugzilla ticket involves anything visible in the program's user interface, it is '''highly''' recommended to include screenshots--or better yet, a screen recording. Bugzilla tickets that can show the issue visually have a much higher chance of being promptly resolved.<br />
<br />
You can use Spectacle to take a screenshot. By default, it will open in response to the "Print Screen" button on your keyboard. To take a screen recording, we recommend the SimpleScreenRecorder app. Screen recordings must use the webm format and be under 4MB in size.<br />
<br />
Use the "Add Attachment" button to attach your screenshot or screen recording. Don't post links to images hosted elsewhere, as they will eventually go stale and the images will become inaccessible.<br />
<br />
=== Additional information ===<br />
If there is any additional information or attachments that you feel would help KDE developers reproduce, investigate, or fix the issue, please mention it here!<br />
<br />
<br />
= Next steps =<br />
Thanks for the Bugzilla ticket! You just helped make KDE software a little bit better.<br />
<br />
Monitor the email address that you use for your Bugzilla account. You will receive an email if a KDE bug triager or developer needs to contact you for any reason.<br />
<br />
Nevertheless, since KDE is a mostly volunteer project, you may not receive an immediate response. This is normal and should not be taken to mean that your Bugzilla ticket is not valued! Rather, it is a reflection of KDE's limited bug triaging resources. If you would like to help alleviate this situation, [[Guidelines and HOWTOs/Bug triaging | becoming a KDE bug triager]] is one of the absolute best ways to contribute!<br />
<br />
= Issue tracker etiquette =<br />
Using an issue tracker may be an unfamiliar experience. Here are some tips to help your interpersonal interactions be as smooth as possible:<br />
<br />
=== Remember your manners ===<br />
Filing a Bugzilla ticket is akin to mildly criticizing someone's work--work that was likely done for free, on personal time, as a labor of love. Please respect the developers by being polite, and not using rudeness or insults; think to yourself, "what would my mother say if she read this?" In addition to being bad manners, it's counterproductive because you will provoke defensiveness and spark arguments, and developers will not feel like doing the work that you're requesting. Think about it: Would ''you'' do unpaid work for a stranger who you felt had insulted you?<br />
<br />
=== Avoid arguments ===<br />
Arguing almost always gets nowhere, and both parties simply become more entrenched in their existing opinions. If you feel resistance building, take a few hours or a day to cool down, and then try another approach later.<br />
<br />
=== Have realistic expectations ===<br />
Bugzilla ticket are not assigned to specific people; anyone can fix a bug, respond to the Bugzilla ticket reporter, engage in discussion, and so on. Sometimes KDE developers will have a Bugzilla ticket resolved in under 24 hours, which is amazing. However, most of the time there will be a lot of waiting involved, and possibly a lot of discussion too. This is normal. If a Bugzilla ticket is going unaddressed, this is probably a sign that KDE's development resources are stretched thin. It is not helpful or effective to poke the developers by posting things like "Me too!" or "I have this bug as well!" or "Why doesn't anyone want to fix these very important issues? Doesn't KDE care?????" We definitely care, but we don't always have the resources to fix everything quickly! You might consider trying to help [[Get Involved/development|fix it yourself]]!<br />
<br />
=== Have a thick skin ===<br />
Sometimes your Bugzilla ticket will get closed without the resolution you're hoping for. This feels disappointing, but it's not personal. The project is larger than any one of us.<br />
<br />
=== Don't confirm your own issue ===<br />
Do not set your own Bugzilla ticket to the CONFIRMED status. This status exists for KDE bug triagers and developers.<br />
<br />
=== Submit patches using GitLab, not the issue tracker ===<br />
A Bugzilla ticket with a patch is an incredible blessing. But patches attached to Bugzilla ticket tend to get missed and become stale over time, which is a real shame. Instead of attaching your patch to the Bugzilla ticket, please submit it as a merge mequest using [[Infrastructure/GitLab|GitLab]] instead, and paste a link to the merge request in the Bugzilla ticket.<br />
<br />
=== Understand what the resolution statuses mean ===<br />
Some of them can sound a little harsh, but again, don't take it personally. These words are just descriptions of the different statuses for the Bugzilla ticket itself:<br />
* RESOLVED does not necessarily mean that the issue has been fixed for ''you'', just that the Bugzilla ticket itself is no longer considered actionable by the developers. For example, a Bugzilla ticket may be marked as RESOLVED UPSTREAM if it's traced to a Qt issue, even if the Qt issue has not yet been fixed, or the version of Qt that fixes the bug is not yet released or available in your distro. Similarly, a ticket may be marked as RESOLVED DOWNSTREAM if the problem is caused a 3rd-party software, even if that issue has not yet been fixed or even tracked by a bug report in the 3rd-party app's bug tracker. These are normal outcomes; KDE's issue tracker can only be used to track issues in KDE's own software.<br />
* RESOLVED INTENTIONAL does '''not''' mean "shut up and go away, we don't care!" What is much more likely is that the issue is not actually considered a real issue, or cannot be fixed without a reasonable amount of engineering effort.<br />
* RESOLVED NOT A BUG does '''not''' mean, "you're an idiot who doesn't know how to use issue trackers!" Rather, it means that the Bugzilla ticket itself is describing something that isn't a bug or feature request, or is something that KDE developers can't fix.</div>Skierpagehttps://community.kde.org/index.php?title=OutreachProgramForWomen&diff=92653OutreachProgramForWomen2021-08-06T03:20:02Z<p>Skierpage: "We are currently..." is actively harmful! Change it to "In 2013 KDE..."</p>
<hr />
<div>[[Category:Mentoring]]<br />
[[File:Mascot konqi-app-dev-katie.png|thumbnail|right|[[Katie]] speaks for the girls!]]<br />
In 2013 KDE participated in the [https://live.gnome.org/OutreachProgramForWomen Free and Open Source Outreach Program for Women], which runs two editions every year.<br />
<br />
== Introduction ==<br />
<br />
2013 will be the first time KDE will take part, sponsored by [http://www.kdab.com/ KDAB]. Round 6 will run from June to September 2013<br />
<br />
{| class="wikitable sortable" align="top"<br />
|+ Program details<br />
! Event !! Date <br />
|-<br />
|Application deadline || May 1<br />
|-<br />
| Dates || June 17 - September 23 <br />
|-<br />
| Number of Internships || 1 (sponsored by KDAB)<br />
|}<br />
<br />
<br />
== Goals ==<br />
<br />
The KDE community is participating in this initiative because we aim to:<br />
<br />
* Make strong connections with a few talented people who will stick around<br />
* Encourage people to work on testing, design, documentation, marketing, and other areas as well as code<br />
* Increase the number and proportion of women in an open source community<br />
* Promote age diversity as well<br />
<br />
<br />
== How to contribute ==<br />
<br />
KDE has an extensive wiki documentation on [http://techbase.kde.org/Contribute how to contribute to KDE] as well as a very convenient [http://flossmanuals.net/kde-guide/ KDE Guide in e-book and pdf format].<br />
<br />
<br />
== How to apply ==<br />
<br />
1. Choose a project <br />
<br />
2. Make a contribution<br />
<br />
3. Send your application<br />
<br />
Please see the details here: https://live.gnome.org/OutreachProgramForWomen#Application_Process<br />
<br />
== Contact details ==<br />
<br />
'''Mailing lists:''' KDE has two main lists intended for mentoring programs:<br />
* [https://mail.kde.org/mailman/listinfo/kde-soc KDE SoC, the more generalist Season of Code list]<br />
* [https://mail.kde.org/mailman/listinfo/kde-women KDE Women, for women interested in getting/being involved in KDE]<br />
<br />
<br />
'''IRC:''' The IRC counterparts of the mailing lists on irc.freenode.net:<br />
* #kde-soc <br />
* #kde-women<br />
<br />
<br />
'''Program coordinators:'''<br />
* [mailto:lydia@kde.org Lydia Pintscher], Nightrose on IRC<br />
* [mailto:myriam@kde.org Myriam Schweingruber], Mamarok on IRC<br />
<br />
<br />
== Tasks ==<br />
<br />
We are currently collecting tasks submissions and ask you to [https://live.gnome.org/OutreachProgramForWomen/2013/JuneSeptember/SpreadTheWord Spread the Word]<br />
<br />
=== Your own idea ===<br />
<br />
Do you have an awesome idea you want to work on with KDE but that is not among the ideas below? That's cool. We love that! But please do us a favor: Get in touch with a mentor early on and make sure your project is realistic and within the scope of KDE. That will spare you and us a lot of frustration.<br />
<br />
'''Mentor:''' Try to see who in KDE is interested in what you want to work on and approach them. If you are unsure you can always ask in #kde-soc or #kde-women on Freenode IRC.<br />
<br />
=== Software Projects ===<br />
<br />
All software projects also require design, documentation, marketing and translation. If you are interested in these tasks, you can learn about both the project and the activities of the relevant team to figure out how to best approach it.<br />
<br />
'''For coding tasks please refer to the [[GSoC/2013/Ideas|GSoC Ideas page]].''' All of them are eligible for the Outreach Program for Women as well.<br />
<br />
=== Design, Documentation, Marketing, etc. ===<br />
<br />
==== Project: Artikulate ====<br />
Artikulate is a young language software project that aims helping people to improve their foreign language pronunciation skills. The essential idea is that Artikulate shall provide a set of phrases and corresponding recordings, which are recorded by native speakers. By recording their own attempts and comparing them to the original recordings, students can correct and improve their own pronunciation. The main goal of this task will be to assist in the first release of Artikulate. Since the project is still young, there are still a lot of tasks open in different areas. Your own project proposal will surely reflect this by concentrating only on a subset of the following tasks, tailored to the three months period.<br />
<br />
Your project, if you will take it, consists of the following three tasks and an Add-On task from the appended list.<br />
<br />
'''Task 1: Course Files'''<br />
This is the most important one of all tasks! Artikulate already provides an editor and a specific mechanism how to create a course skeleton that is used as a blueprint for courses of other languages. But neither the course skeleton is filled (the goal is to have a set of about 1000 phrases in the end), nor are there courses that provide this set of phrases in other languages. The goal of this subtask is to extend the course skeleton with useful units and phrases (e.g., think about a unit with sentences a tourist needs when visiting a town, or sentences that are used in a restaurant) and provide (besides the skeleton that gives us already an English language course) a translation of one other language.<br />
Obviously, it is not possible for you to record every phrase (and not event wanted, since we want to have different voices!) or maybe even a prepare a translation of the course skeleton into another language (if you are an English native and do not speak another language well enough, for example). But no problem! As the internet is full of helpful people (and the KDE community in particular), it will be also part of this task to write blog posts, asking at mailing lists, or even asking friends and teachers to provide recordings or help you with the translations.<br />
<br />
'''Task 2: Documentation'''<br />
As every project, also Artikulate needs a handbook. This handbook must describe for users how to use the program, but also for contributors how to contribute new languages and course files. The handbook will be created at the Userbase Wiki (this also allows later integration into the program).<br />
<br />
'''Task 3: Workflow Planning'''<br />
We need to think about a reliable workflow on how to update and provide course files. A lot of ideas are already partially implemented or drafted. But it needs a written plan to remember those ideas. Also, when writing things down, usually the pitfalls will be discovered that weren't visible before.<br />
<br />
=====The Add-On Tasks:=====<br />
<br />
'''Add-On Task a: User Interface'''<br />
If you want to dig into QML and QtQuick (this is more a describing language to tell how the user interface shall look than a programming language!) and improve the user interface, this could be a nice subtask for you. If not, it is at least equally good to provide a concept with mockups and sketches how the user interfaces shall be changed to allow better usage for users and language contributors.<br />
<br />
'''Add-On Task b: Implement Highscore System'''<br />
Currently no highscores are saved that remind the user at which phrases or phonemes she/he was good and which she/he still needs to improve. A highscore system will help here. And it will not be that hard to implement it, though it will require coding knowledge in C++.<br />
<br />
'''Add-On Task c: Quality Assurance Protocol'''<br />
Most of the core functionality is implemented or will be implemented when this project starts. But to be sure that everything works as expected, we need a testing protocol that states what functionality we have, what needs to be tested to verify the functionality, and that can be used for every release to test the quality of our software.<br />
<br />
===== Source Code and Junior Jobs =====<br />
* http://techbase.kde.org/Projects/Edu/Artikulate<br />
* Junior Jobs: [https://bugs.kde.org/buglist.cgi?keywords=junior-jobs&bug_status=UNCONFIRMED&product=Artikulate&bug_status=CONFIRMED&bug_status=ASSIGNED&bug_status=REOPENED&list_id=570087 can be found at bugs.kde.org]<br />
<br />
=====Contact Information=====<br />
<br />
'''Mentors:''' [mailto:cordlandwehr@gmail.com Andreas Cord-Landwehr] and [mailto:myriam@kde.org Myriam Schweingruber]<br />
'''Contact:'''<br />
* ''email:'' kde-edu@kde.org<br />
* ''IRC:'' ask in #kde-soc or #kde-edu on irc.freenode.net<br />
<br />
<br />
==== Project: Krita Webshop ====<br />
<br />
Krita is a succesful KDE application for digital painting. Krita development is supported by the Krita Foundation. Krita currently has an embryonic webshop on Zazzle, but there is next to nothing happening. However, with all the great art created by the Krita community, it should be possible to setup and maintain an attractive webshop full of great merchandise. Proceeds would go to funding the further development of Krita, in the widest sense.<br />
<br />
This project is about selecting a webshop platform, setting up shop, filling it with great merchandise and getting the word out. Specifically:<br />
<br />
* is Zazzle the right venue? What others are there? Prepare a report that helps the community make a decision<br />
* design the webshop to have a unique visual identity that works with the krita.org website design<br />
* come up with ideas for merchandise and promotion (for instance, a big 2014 calendar project, Krita brush holders or developer-loyalty gifts, like maybe postcards of the splash screen of the new release that gets sent to everyone who has contributed to that release, or... This needs creative thinking!)<br />
* contact artists about the use of their artwork for Krita promotion and merchandise. We have a great artist community who regularly post artwork on the Krita forums and on deviant art. Part of the task is to search out, contact artists and ask them to contribute artwork for merchandise, and discuss the actual merchandise with them.<br />
* create the actual merchandise in the shop<br />
* promote the shop, also outside the usual open source community forums<br />
* take care of complaints and compliments<br />
* and finally make sure that everything is setup to run smoothly ever after!<br />
<br />
=====Contact Information=====<br />
<br />
'''Mentors:''' [mailto:boud@kde.org Boudewijn Rempt]<br />
'''Contact:'''<br />
* ''email:'' boud@kde.org<br />
* ''IRC:'' ask in #kde-soc or #krita on irc.freenode.net<br />
<br />
=== Translation ===<br />
<br />
* Translate the site http://www.kde.org/documentation/ into various languages.<br />
* Translate the site http://docs.kde.org/ into various languages.</div>Skierpagehttps://community.kde.org/index.php?title=KDE/FAQs/General_FAQ&diff=92652KDE/FAQs/General FAQ2021-08-06T02:33:38Z<p>Skierpage: fix broken link</p>
<hr />
<div><languages /><br />
<translate><br />
<br />
== I want to start this new application. What do you advise? == <!--T:2--><br />
<br />
<!--T:3--><br />
We all agree that there are plenty of KDE applications that need to be written. But there are also a lot of existing kde applications that need your help.<br />
<br />
<!--T:4--><br />
To see the areas where help is needed, check [http://www.kde.org/jobs/ this page].<br />
<br />
<!--T:5--><br />
Before starting a new application, it's always a good idea to check [http://www.kde-apps.org/ KDE-Apps.org] and other open source software hosting services like [https://github.com/ GitHub], [https://code.google.com Google Code], and [http://sourceforge.net/ SourceForge] for existing applications and to ask on the [https://mail.kde.org/mailman/listinfo/kde-devel kde-devel] mailing-list whether someone is already working on a similar project.<br />
<br />
== I am a developer, how can I contribute to KDE software? == <!--T:6--><br />
<br />
<!--T:7--><br />
Calligra and KDevelop, despite being very praised, have very few developers, so you might check there. There is no need to be a developer of the KDE workspaces or KDE platform libraries to help. The whole range of KDE software is very modular so you can perfectly improve one area without knowing how others work.<br />
<br />
<!--T:8--><br />
You can also ask on [https://mail.kde.org/mailman/listinfo/kde-devel kde-devel] if someone needs help on an application.<br />
Use the latest version of your favourite KDE software and spot things that are needed. A theme generator? A konsole schema editor? Improve a game? There is always a small feature missing. Go and implement it!<br />
<br />
<!--T:9--><br />
Are you familiar or attracted with a specific field? See if there is a related application that could use your help. Or write one. KDE especially welcomes more non-geek oriented applications.<br />
<br />
== I am not a developer, how can I help? == <!--T:10--><br />
<br />
<!--T:11--><br />
There are plenty of tasks that don't require development skills. Write reviews of applications for the promoting of KDE (see the [https://mail.kde.org/mailman/listinfo/kde-promo kde-promo] mailing-list), help the documentation team (see [http://l10n.kde.org/docs/ i18n.kde.org/doc]), help the translations (see [http://l10n.kde.org/ i18n.kde.org]), help to filter the incoming bugs (see [https://bugs.kde.org/ bugs.kde.org]). <br />
<br />
== Where can I find images of Konqi the dragon? == <!--T:12--><br />
<br />
<!--T:13--><br />
The Konqi for some people SDK is at [ftp://ftp.kde.org/pub/kde/devel/konqi_sdk.tar.bz2 ftp.kde.org/pub/kde/devel/konqi_sdk.tar.bz2]<br /><br />
It was posted to artist.kde.org before that site ceased to be updated.<br />
<br />
<!--T:14--><br />
Further images are on [http://kde.org/stuff/clipart.php KDE merchandise]. Also you can find some unofficial Konqi images and models from [http://forum.kde.org/viewforum.php?f=254 Create Konqi with Krita Contest] and [http://sourceforge.net/projects/supertuxkart/ SuperTuxKart] game.<br />
<br />
== What is the level required to contribute to KDE? What should I learn? What should I read? == <!--T:15--><br />
<br />
<!--T:16--><br />
You need to know C++. Read the [http://qt-project.org/doc/qt-4.8/tutorials.html Qt tutorials] and browse the Qt docs to get familiar with what's available with Qt. Then read the [http://techbase.kde.org/Development/Tutorials KDE tutorials] and browse architecture and documentation. You can also read the [http://flossmanuals.net/kde-guide/ KDE Book], it can not harm. But you don't have to be familiar with the whole KDE architecture to become a KDE developer. Using KDE's technologies is quite easy, so concentrate on what you really need, you can learn the other bits later on. <br />
[http://techbase.kde.org KDE TechBase] and [http://doc.qt.digia.com/ doc.qt.digia.com] (also in your {{path|$QTDIR/doc/html}}) are invaluable resources, take advantage of them.<br />
Then, browse the source, look for the examples directories, see how the other did code their applications. Reading and writing code is the best way to learn.<br />
<br />
== How do I get KDE software from the KDE git repository? == <!--T:17--><br />
<br />
<!--T:18--><br />
Each project on https://invent.kde.org has a clone button, or read [[Special:myLanguage/Get Involved/development]] to learn how to use <code>kdesrc-build</code> to download and build all of KDE.<br />
<br />
== Can I access KDE source code online? == <!--T:19--><br />
<br />
<!--T:20--><br />
Yes. There are many ways to do this:<br />
* Browse [https://invent.kde.org invent.kde.org]<br />
* Search the source code at [https://lxr.kde.org/search lxr.kde.org/search]<br />
* Browse API docs generated from the source code at [https://api.kde.org api.kde.org]<br />
<br />
== I want to put my app in KDE == <!--T:25--><br />
<br />
<!--T:26--><br />
There are three requirements: <br />
* Your app must compile with the latest version of KDE (git master or SVN trunk).<br />
* Your app must be stable.<br />
* Your app must be maintained. You will probably get a good deal of bug reports and wishes. People expect you to fix the bugs and implement the wishes that make sense.<br />
See also the next question.<br />
<br />
== Is it better to develop inside or outside KDE? == <!--T:27--><br />
<br />
<!--T:28--><br />
As core developer Waldo Bastian explains in a copyrighted mail: <br />
<blockquote><br />
Being part of KDE means that you have to work together with others. Such cooperation brings along advantages but it also brings along responsibilities.<br />
<br /><br /><br />
<br />
<!--T:29--><br />
Some of those advantages are: your code ends up on all distro's, people might fix your bugs, you get free translations and documentation, you get tons of bugreports.<br />
<br /><br /><br />
<br />
<!--T:30--><br />
On the other side there are disadvantages and responsibilities: you will have to communicate with other developers about your work, other people might make changes to your code, you will have to respect release freezes, you get tons of bugreports and people actually expect that you fix them as well (what are they smoking?), people expect you to maintain your code.<br />
<br /><br /><br />
<br />
<!--T:31--><br />
You can't chose for the advantages and ignore the responsibilities that come with it, it's a complete package, it's both or nothing.<br />
<br /><br /><br />
<br />
<!--T:32--><br />
In general it should be the author of a piece of software that chooses to put his application in KDE's repositories. We usually don't put software in KDE's repositories unless the author wishes to do so. The other way around, if the author prefers to work on his application elsewhere then that's his right as well. Unless there is a split in the actual group of people working on the application it makes no sense to fork the development of an application because of that.<br />
<br /><br /><br />
<br />
<!--T:33--><br />
'''BUT'''... by putting your code under and open source license and putting it in a KDE repository you give the world at large, as well as KDE in particular, the irrevocable right to use your code. And KDE will use that right at its discretion to protect the interests of KDE, even if that goes against the wishes of the author at that point in time.<br />
</blockquote><br />
<br />
<!--T:34--><br />
It is important to know that but don't be afraid. Usually, things work very well. In 5 years, it has only happened once that a developer had his work put kept in KDE while he wanted to remove it.<br />
<br />
== How do I get write access to KDE repositories? == <!--T:35--><br />
<br />
<!--T:36--><br />
See full article at [[Special:myLanguage/Infrastructure/Get_a_Developer_Account|Infrastructure/Get a Developer Account]].<br />
<br />
<!--T:37--><br />
Go to [http://identity.kde.org KDE Identity], fill out the form and describe why you need write access. Make sure to specify your full name and e-mail address.<br />
<br />
<!--T:38--><br />
Please also include the name of your [https://bugs.kde.org/ bugs.kde.org] account, if non-existent please create one so that it can be given usual developer rights. Closing bugs.kde.org reports with keywords in commit comments only works if the email address of your KDE Identity and bugs.kde.org accounts match. You can change your bugs.kde.org address in the Bugzilla user settings.<br />
<br />
<!--T:39--><br />
Git requires use of an ssh key, and new accounts for SVN must also choose the svn+ssh protocol. Send a public ssh key (e.g. {{path|~/.ssh/id_dsa.pub}})<br />
<br />
See also [[#How do I create a SSH key?]]<br />
<br />
<!--T:40--><br />
If you are contributing to an application that is not yours, it is a good idea to first submitting your coding as patches to the author and let him apply them. If the author is not maintaining his application, you might become the new maintainer...<br />
<br />
<!--T:41--><br />
Although there are few restrictions on repository commit rights, we expect you not to disrupt other developers' code without their consent. You must also respect the feature freezes of the release schedule (published on [[Schedules]] page)<br />
<br />
<!--T:42--><br />
A detailed list of rules you should follow when committing to KDE repositories are listed in the [[Special:myLanguage/Policies/SVN_Commit_Policy|KDE Commit Policy]].<br />
<br />
== My app is not stable but I would like to have it in KDE == <!--T:43--><br />
<br />
<!--T:44--><br />
As a first step, we can put it in playground, which is essentially "kde-alpha". Develop it there and when it is ready, request that your app to be moved to the appropriate KDE package or the extragear module.<br />
<br />
== I don't want to lose my SVN history. == <!--T:45--><br />
<br />
<!--T:46--><br />
This is no longer possible with Subversion. Maybe in the future, if the server is upgraded and allows that. Note that for git this is not an issue.<br />
<br />
== What is kdebindings? == <!--T:47--><br />
<br />
<!--T:48--><br />
It contains Qt bindings for Ruby, PHP, C# to use Qt classes with those langages, KDE bindings for Ruby, C#, python to use KDE classes with those langages, and XParts to embed non-KDE apps as a KPart. Check the [[Special:myLanguage/Development/Languages|binding page]] of TechBase. <br />
<br />
== Does the feature freeze apply to playground? == <!--T:49--><br />
<br />
<!--T:50--><br />
No, playground are not a released packages. The same is true for kdereview and extragear: they are not frozen and released. But if you want your app to move to a package, ask for it before the beta-release.<br />
<br />
==Can I have a stable and an unstable KDE on the same computer?== <!--T:51--><br />
<br />
<!--T:52--><br />
Yes, check Building KDE Software from git.kde.org video series:<br />
* [http://www.youtube.com/watch?v=cqnNVmJocR4 Building KDE Software from git.kde.org Part 1]<br />
* [http://www.youtube.com/watch?v=OBJjk5q__Cc Building KDE Software from git.kde.org Part 2]<br />
* [http://www.youtube.com/watch?v=SgwEnLeqsg8 Building KDE Software from git.kde.org Part 3]<br />
<br />
== How do I know which version of Qt/KDE I am using? == <!--T:53--><br />
<br />
<!--T:54--><br />
<tt>kde-config</tt> and all KDE programs accept <tt>--version</tt> as argument.<br />
<br />
==Qt-copy or Qt from qt.digia.com: if one were doing a clean build of trunk, which would be preferable?== <!--T:55--><br />
<br />
<!--T:56--><br />
You can use either. They are binary compatible (forward and backward). There can be, however, a few bugfixes in qt-copy over the most recent Qt release. Especially if building from qt-copy, pay attention to the apply-patches script.<br />
<br />
== How can I checkout a single directory from a SVN module? == <!--T:57--><br />
<br />
<!--T:58--><br />
Checkout the top-level dir with 'svn co -N /modulename', 'cd modulename', 'svn up admin' to get the admin/ dir and then finally checkout the dir you want with 'svn up subdir'<br />
<br />
<!--T:59--><br />
For instance, to get only reaktivate from playground/utils:<br />
<code>svn co -N /playground/utils; svn up reaktivate</code><br />
Then compile as usual.<br />
<br />
<!--T:60--><br />
The same answer applies to the question "How do I get a single language out of kde-i18n?".<br />
<br />
<!--T:61--><br />
If you don't know the name of the directory you want to check out, you can browse websvn.kde.org to find it.<br />
<br />
== How can I get one of the KDE application as a standalone tarball? == <!--T:62--><br />
<br />
<!--T:63--><br />
kdesdk/scripts/svn2dist is a script to extract an application from the KDE source tree and package it as a standalone application. <br />
<br />
== How do I close my own bug reports? == <!--T:64--><br />
<br />
<!--T:65--><br />
If you reported a bug that is fixed in a new release of KDE but is still reported as open, you can close it. It might happen because your bug is the same as another one, or simply because the developer fixed something without noticing that it would correct your bug.<br />
<br />
<!--T:66--><br />
You can do that from your Subversion commit. To do so, append to your commit message a line like this:<br />
<br />
<!--T:67--><br />
<Code>BUG: XXXXX</code> where '''''XXXXX''''' is the bug report you want to close. If the report you're closing is adding a new feature, you can use FEATURE instead of BUG. <br />
<br />
<!--T:68--><br />
Managing a bug list is a huge task for the developers and they usually have a lot of bugs listed, some being fixed already without their knowledge, some being unreproducible, some without enough information to be corrected, etc. If you can help by managing and updating the list of outstanding bugs, you will be gladly welcome. And you will receive an even happier welcome if you provide a patch.<br />
<br />
== How do I create a SSH key? == <!--T:69--><br />
<br />
<!--T:70--><br />
SSH makes use of two keys: a private key and a public key. You should keep the private key secret at all times and only place it on machines over which you have direct control. Public, shared, and community machines are not suitable environments to store SSH private keys. Take action to help prevent theft of your SSH private key data. Setting a password on your SSH private key will help reduce the risks involved with private key theft.<br />
<br />
<!--T:71--><br />
Generate a key pair for each major location you work from. This helps to reduce the impact when your key gets stolen. <br />
When someone obtains access to your private key, your key can be abused in attempts to compromise KDE servers. Well known open source projects have been compromised this way in the past, YOU must help us to make sure that this doesn't happen with KDE servers as well. For that reason it is important to notify sysadmin (at) kde (dot) org immediately when you notice that someone may have had access to your private key for example when a computer on which it was stored has been hacked or infected with a virus, worm or trojan.<br />
<br />
<!--T:72--><br />
If you choose to make a backup of your SSH private key data, please ensure that any such backup is stored in a secure manner as well.<br />
<br />
<!--T:73--><br />
For the practical part, the following command can be used to generate a SSH private/public key pair with<br />
<code>ssh-keygen -t dsa</code><br />
This will create a private key as {{path|~/.ssh/id_dsa}} and a public key as {{path|~/.ssh/id_dsa.pub}}.<br />
<br />
<!--T:74--><br />
There are times when you may want to use a key of a different name to the default, perhaps to use separate keys for different projects. To let SSH know which key you want to use for KDE.org, you can keep a list of servers and their corresponding keys in ~/.ssh/config. For example,<br />
{{Input|1= Host svn.kde.org <br />
IdentityFile ~/.ssh/id_dsa_kde }}<br />
In order to use SSH to access KDE servers you need to send your public key to sysadmin (at) kde (dot) org.<br />
<br />
== How can I monitor changes made by others? == <!--T:75--><br />
<br />
<!--T:76--><br />
The [https://mail.kde.org/mailman/listinfo/kde-commits kde-commits] mailinglist carries automatic notifications for all changes made in the KDE repositories. The KDE-Commits mailinglist is very high traffic. An alternative is [http://commitfilter.kde.org/ CommitFilter] which allows you to get notification for only those areas that interest you.<br />
<br />
<!--T:77--><br />
[[Category:FAQs]]<br />
</translate></div>Skierpagehttps://community.kde.org/index.php?title=Get_Involved/development&diff=92651Get Involved/development2021-08-06T02:32:00Z<p>Skierpage: /* Source code cross referencing */ show the URL instead of "here"</p>
<hr />
<div>[[File:Konqui dev close cropped.png|right|x200px|]]<br />
By joining the ranks of KDE developers, you will get to implement new features and defeat bugs both daunting and simple, all while collaborating to make coherent and stable releases. Developers collaborate in teams based on what area they are working in. These can be small teams working on a single application, up to large teams working on a group of related pieces of software. Many developers are in more than one team.<br />
<br />
KDE runs or participates in several mentoring programs to help new developers, including an informal list of people who are willing to help newcomers get started. See the [[Mentoring]] page for more details.<br />
<br />
{{Info|While any operating system can be used to patch or develop KDE software, it's easiest if you use a Linux distribution that provides relatively recent versions of Qt and KDE Frameworks, such as Arch/Manjaro, Fedora, KDE Neon, openSUSE Tumbleweed, or non-LTS versions of Kubuntu.<br /><br />Support for Windows, macOS, and Linux distros that ship older software (such as Debian, Ubuntu/Kubuntu 18.04, and openSUSE Leap 15) is still experimental, and you may have a better experience [[Get Involved/development/Developing in a virtual machine|doing your development in a virtual machine]] when using one of the distributions mentioned above.}}<br />
<br />
== New to C++/Qt software development? ==<br />
Most KDE software is written in C++ using the [https://www.qt.io Qt toolkit] and [[Frameworks | KDE Frameworks]]. Though prior experience with these technologies or other programming languages is helpful, you don't need to be a C++ programmer to get started! For example, no programming knowledge whatsoever is required to do things like improve text labels.<br />
<br />
If you'd like to dive deeper, the Qt wiki contains [https://wiki.qt.io/Books a list of online books] for learning Qt programming. Qt also provides [https://doc.qt.io/qt-5/qtexamplesandtutorials.html lots of examples] you can look at. Information about KDE Frameworks can be found on the [https://develop.kde.org/docs KDE Developer Platform] and [https://api.kde.org/ KDE API website].<br />
<br />
== One-time setup: your development environment ==<br />
To build software, you need a '''development environment''': a set of tools that allows you to access and edit the source code, compile it into a form that the computer can run, and deploy it to a safe location. We will now go through the process of setting one up. To accomplish these tasks, you will need to enter commands using a terminal program, such as KDE's Konsole (but any terminal program will suffice).<br />
<br />
If you're not familiar with the command line interface, you can [https://lifehacker.com/5633909/who-needs-a-mouse-learn-to-use-the-command-line-for-almost-anything find a reasonable tutorial here]. However advanced command-line skills are not required, and you will learn what you need along the way!<br />
<br />
{{Note|'''Everything in this section only needs to be done once.''' Once you've done it, your development environment is set up and you can use it to submit patches and develop KDE Software!}}<br />
<br />
{{Note|As an alternative to the set-up process described here, you can install Docker and the [[KDE PIM/Docker|KDE PIM Docker image]]. It provides a development environment that is isolated from your day-to-day system. However, it is based on KDE Neon Unstable, which might not be to your taste.}}<br />
<br />
If you are a visual learner, you might consider watching the video version at https://www.youtube.com/embed/B4xoc0K5iA4<br />
<br />
=== Install basic tools ===<br />
First you will need to use your operating system's package manager to install some basic tools:<br />
* Arch/Manjaro: <code>sudo pacman -S git cmake dialog</code><br />
* Fedora: <code>sudo dnf install git cmake dialog perl perl-IPC-Cmd perl-MD5 perl-FindBin</code><br />
* KDE Neon/Kubuntu/Ubuntu/Debian: <code>sudo apt install git cmake dialog</code><br />
* openSUSE Leap & Tumbleweed: <code>sudo zypper install git breezy cmake dialog</code><br />
<br /><br />
<br />
=== Configure Git ===<br />
We need to set your authorship information properly so that any changes you make can be properly attributed to you:<br />
{{Input|1=<nowiki><br />
git config --global user.name "Your Name"<br />
git config --global user.email "you@email.com"<br />
</nowiki>}}<br />
<br />
{{Note|The name you provide should be your actual name, not your KDE Identity username.<br />
<nowiki><br />
<br />
</nowiki><br />
The email address you specify above must be the same as the email address used for your https://bugs.kde.org account. If they don't match, then the <code>BUG: </code> and <code>FEATURE: </code> keywords won't work (see [https://techbase.kde.org/Development/Git/Configuration#Basic_Settings this page] for more information).}}<br />
<br /><br />
In order to authenticate yourself when pushing code changes, you need to add an ssh key to your GitLab profile as [https://invent.kde.org/help/ssh/README described here].<br />
<br />
=== Set up kdesrc-build ===<br />
Next, we need a method of '''managing dependencies'''. Every software has dependencies: other pieces of software that provide the functionality they rely on. In order to compile any piece of software, its dependencies must be available.<br />
<br />
Most Linux-based operating systems do not provide development packages that are up-to-date enough for working on KDE software, so we will compile all the KDE dependencies ourselves. To do this, we use a command-line tool called <code>kdesrc-build</code> to download, manage, and build KDE source code repositories. Let's set it up now! First, we create a new directory for all the KDE source code we will be using; you will need many GB of free disk space. We then clone the source code repository that holds <code>kdesrc-build</code> in that directory, so we have a local copy of it on our computer.<br />
<br />
{{Input|1=<nowiki><br />
mkdir -p ~/kde/src<br />
cd ~/kde/src/<br />
git clone https://invent.kde.org/sdk/kdesrc-build.git && cd kdesrc-build<br />
</nowiki>}}<br />
<br />
Next, it's time to set up <code>kdesrc-build</code> and pick up the changes it made to your <code>~/.bashrc</code> (or <code>~/.zshrc</code> for zsh users) for the current terminal session:<br />
<br />
{{Input|1=<nowiki><br />
./kdesrc-build --initial-setup<br />
source ~/.bashrc<br />
</nowiki>}}<br />
<br />
{{Warning|Do not quote or escape any file paths entered in the wizard! And do not run the command <code>kdesrc-build</code> by itself without any arguments because this will build everything, which is probably overkill right now.}}<br />
<br />
The initial setup tries to install the basic packages for compiling Qt and KDE software on your distro. It also creates a <code>~/.kdesrc-buildrc</code> configuration file.<br />
If you want a more guided setup process for <code>kdesrc-build</code>, run the command <code>kdesrc-build-setup</code> instead. However, unlike <code>--initial-setup</code>, it won't install packages from your distro for compiling programs so you will have to do that yourself.<br />
<br />
Consult the [https://docs.kde.org/trunk5/en/kdesrc-build/kdesrc-build/ kdesrc-build manual] for more information and options.<br />
<br />
=== Set up Qt ===<br />
By default, <code>kdesrc-build</code> will build from source all the dependencies that a program or framework needs, including the Qt toolkit itself, because the <code>include-dependencies</code> option is set as default in the <code>~/.kdesrc-buildrc</code> file. <br />
<br />
If your Linux distribution provides a recent version of Qt (5.15 or newer), you can save some time and disk space and use that version instead of building your own. To configure <code>kdesrc-build</code> to skip building Qt, open the configuration file <code>~/.kdesrc-buildrc</code> and comment out the line with <code>qtdir</code> and any lines that begin with <code>include</code> and are related to qt5, but do not comment out the line that includes <code>kf5-qt5-build-include</code>. <br />
<br />
For example, comment/disable (put a <code>#</code> at the start of the line) or delete these lines if you want to use your distro's Qt packages (actual paths may vary):<br />
<br />
{{Input|1=<nowiki><br />
qtdir ~/kde/qt5 # Where to find Qt5<br />
include /path/to/kdesrc-build/qt5-build-include<br />
include /path/to/kdesrc-build/custom-qt5-libs-build-include<br />
</nowiki>}}<br />
<br />
=== Disable indexing for your development environment ===<br />
You'll want to disable indexing for your development-related git repos and the files they will build and install. Add <tt>~/kde</tt> to the exclusions list in System Settings > File Search, like so:<br />
<br />
[[File:Disable indexing.jpeg|center|600px|]]<br />
<br />
=== Download non-KDE dependencies ===<br />
Even though <code>kdesrc-build</code> will take care of the KDE dependencies for you, it does not yet have the ability to install non-KDE dependencies (see https://invent.kde.org/sdk/kdesrc-build/-/issues/9), which are typically acquired using your package manager. To install the required non-KDE dependencies, [[Guidelines and HOWTOs/Build from source/Install the dependencies|read this page]] and follow the instructions laid out there.<br />
<br />
Once that's done, your development environment is set up and ready to build software! Let's take it for a spin.<br />
<br />
== Building software with kdesrc-build ==<br />
It can take an hour or more to compile a KDE Application, Framework, or Plasma itself for the first time. The reason for this is that <code>kdesrc-build</code> is compiling ''all'' of the KDE dependencies (See https://invent.kde.org/sdk/kdesrc-build/-/issues/17). The next time you want to compile that or any other piece of KDE software, it will be much faster since most of the dependencies will have already been compiled. If you don't want to build all dependencies (e.g., because you are using a rolling release distro that provides recent versions of software), edit the same configuration file and simply set <code>include-dependencies</code> to '''false''' or add the <code>--no-include-dependencies</code> option when running <code>kdesrc-build</code>.<br />
<br />
{{warning|A 2021 [https://invent.kde.org/sdk/kdesrc-build/-/issues/78 issue] with <code>kdesrc-build</code> means building may spawn dozens of processes, exhausting your computer's memory and crashing programs. You can either run <kbd>kdesrc-build --initial-setup</kbd> to recreate your <code>~/.kdesrc-buildrc</code> file, or remove the line <code>make-options -j ${num-cores}</code>.}}<br />
<br />
=== Applications ===<br />
'''[https://userbase.kde.org/Applications KDE Applications]''' like [https://userbase.kde.org/Dolphin Dolphin], [https://userbase.kde.org/Okular Okular], [https://userbase.kde.org/Konsole Konsole] and [https://userbase.kde.org/Gwenview Gwenview] are standalone apps that can be run on multiple platforms, such as Plasma, GNOME, even macOS and Windows! New versions of KDE Applications are [[Schedules#Current_Releases_by_KDE|released three times a year]]. Note that the Discover app store (git repo name: <code>plasma-discover</code>) and System Settings app (git repo name: <code>systemsettings</code>) are distributed alongside Plasma, but they build like apps using the below instructions. A list of all KDE applications can be found here: https://userbase.kde.org/Applications.<br />
<br />
The general steps required to build and run an application are described in the following using Dolphin as an example:<br />
<br />
{{Input|1=<nowiki><br />
kdesrc-build dolphin<br />
</nowiki>}}<br />
<br />
As a part of this process, Dolphin was installed to <code>~/kde/usr/bin/dolphin</code>. '''There is no need to manually install anything;''' <code>kdesrc-build</code> installed it for you! Source the project's auto-generated <code>prefix.sh</code> file every time you want to run your custom-compiled version of Dolphin: <br />
<br />
{{Input|1=<nowiki><br />
source ~/kde/build/system/dolphin/prefix.sh<br />
~/kde/usr/bin/dolphin<br />
</nowiki>}}<br />
<br />
Or using <code>kdesrc-run</code> wrapper:<br />
{{Input|1=<nowiki><br />
kdesrc-run dolphin<br />
</nowiki>}}<br />
<br />
Did it run? If so, then '''congratulations, you just compiled your own version of Dolphin from source code!'''<br />
<br />
=== Frameworks ===<br />
'''[[Frameworks|KDE Frameworks]]''' are libraries of tools and features that can be used by any application or Plasma itself. New versions of KDE Frameworks are [[Schedules/Frameworks|released once a month]]. A list of all frameworks can be found here: https://api.kde.org/frameworks.<br />
<br />
For example, here is how to build the KIO framework:<br />
<br />
{{Input|1=<nowiki><br />
kdesrc-build kio<br />
</nowiki>}}<br />
<br />
Now you can run an existing app using your custom-made version of the framework! For example, the following will run Dolphin, but it will be using the KIO library that you just built:<br />
<br />
{{Input|1=<nowiki><br />
source ~/kde/build/frameworks/kio/prefix.sh<br />
~/kde/usr/bin/dolphin<br />
</nowiki>}}<br />
<br />
=== Plasma ===<br />
'''[[Plasma|KDE Plasma]]''' is the environment in which you can run apps. Plasma is responsible for providing a desktop with wallpaper, app launchers, and widgets; displaying notifications; managing wired and wireless networks; and similar operating-system level tasks. New versions of Plasma are [[Schedules/Plasma 5|released three times a year]]. Plasma has multiple ''shells'': [https://kde.org/plasma-desktop Plasma Desktop] for desktop, laptop, and 2-in-1 computers, [https://www.plasma-mobile.org/ Plasma Mobile] for mobile phones, Plasma Bigscreen for televisions, and so on. They all share certain common components, such as a window manager, networking stack, basic graphical components, and so on. Here is how to build them:<br />
{{Input|1=<nowiki><br />
kdesrc-build plasma-workspace plasma-framework plasma-nm plasma-pa plasma-thunderbolt plasma-vault plasma-firewall plasma-workspace-wallpapers kdeplasma-addons krunner milou kwin kscreen sddm-kcm plymouth-kcm breeze discover print-manager plasma-sdk kaccounts-integration kaccounts-providers kdeconnect-kde plasma-browser-integration xdg-desktop-portal-kde kde-gtk-config khotkeys kgamma5 breeze-gtk --include-dependencies<br />
</nowiki>}}<br />
<br />
==== Plasma Desktop ====<br />
To build the plasma Desktop environment and its related apps, also build the following:<br />
{{Input|1=<nowiki><br />
kdesrc-build plasma-desktop systemsettings ksysguard plasma-disks plasma-systemmonitor ksystemstats kinfocenter kmenuedit --include-dependencies<br />
</nowiki>}}<br />
<br />
To get translations in your self-built Plasma, you must build <tt>plasma-workspace</tt>with <tt>-DKDE_L10N_SYNC_TRANSLATIONS=true</tt>. The easiest way to do this is go into the build directory (<tt>~/kde/build/plasma-workspace</tt> by default), run <tt>ccmake .</tt>, turn on that setting, and then rebuild the project.<br />
<br />
Now it's time to make your built-from-source Plasma session accessible from the SDDM login screen, and also copy the built-from-source DBus files into a location where they are visible to them system bus. To do this, run the following command:<br />
{{Input|1=<nowiki><br />
~/kde/build/plasma/plasma-workspace/login-sessions/install-sessions.sh<br />
</nowiki>}}<br />
<br />
{{Note|SELinux can interfere with the new DBus services working correctly, and the path of least resistance may be to simply turn it off if you are using a distro that ships with it on by default (for example, Fedora). See https://www.tecmint.com/disable-selinux-in-centos-rhel-fedora/ for more information.}}<br />
After this, you can log out and select your new plasma session in SDDM's session chooser menu (which is located in the bottom-left corner of the screen if you're using the Breeze SDDM theme).<br />
<br />
Alternatively, you can run the new version of plasma on top of your existing system for quick testing like so:<br />
{{Input|1=<nowiki><br />
source ~/kde/build/plasma/plasma-desktop/prefix.sh<br />
~/kde/usr/bin/plasmashell --replace<br />
</nowiki>}}<br />
<br />
==== Plasma Mobile ====<br />
To build the Plasma Mobile environment and its related apps, also build the following:<br />
{{Input|1=<nowiki><br />
kdesrc-build plasma-nano plasma-phone-components plasma-settings plasma-camera marble koko vvave okular plasma-angelfish plasma-samegame mtp-server kaidan peruse calindori index-fm maui-pix qrca keysmith --include-dependencies<br />
</nowiki>}}<br />
<br />
You can run your custom-built Plasma Mobile in a phone-sized window within your existing session like so:<br />
<br />
{{Input|1=<nowiki><br />
export XDG_RUNTIME_DIR=/tmp/<br />
export QT_QPA_PLATFORM=wayland<br />
export QT_QPA_PLATFORMTHEME=KDE<br />
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1<br />
export XDG_CURRENT_DESKTOP=KDE<br />
export KSCREEN_BACKEND=QScreen<br />
export KDE_FULL_SESSION=1<br />
export KDE_SESSION_VERSION=5<br />
export QT_QUICK_CONTROLS_MOBILE=1<br />
export PLASMA_PLATFORM=phone:handheld<br />
export $(dbus-launch)<br />
dbus-run-session kwin_wayland --width 360 --height 720 --xwayland "plasmashell -p org.kde.plasma.phone"<br />
</nowiki>}}<br />
<br />
Plasma Mobile can also be run on a mobile device itself. For information on how to do that, see https://docs.plasma-mobile.org/DevGuide.html#plasma-mobile-device-environment.<br />
<br />
For more information, see https://docs.plasma-mobile.org/DevGuide.html.<br />
<br />
=== Iterating on a single project ===<br />
When you're working on a project and you want to rebuild it to test your changes, you can save a lot of time by only rebuilding that project, rather than the entire stack. For example if you are working on <code>plasma-desktop</code>, you can rebuild only that project rather than everything by running <code>kdesrc-build --no-src --no-include-dependencies plasma-desktop</code>.<br />
<br />
=== How to solve build problems ===<br />
Did one or more modules fail to build (displayed in red font) using <code>kdesrc-build</code>? Here's what to do:<br />
<br />
# Try building the failing module again from scratch using <code>kdesrc-build [failing module] --refresh-build</code><br />
# Make sure that you have all the dependencies for the failing module. Go back to the [[#Download non-KDE dependencies]] section and re-install the non-KDE dependencies. If that doesn't fix the problem, open the log file for the failing module, which <code>kdesrc-build</code> will print the path at the end of its output. Scroll to the bottom of the log file and read the output to see what missing dependency it is complaining about, then find and install the corresponding package using your distro's package manager your distro. If several look relevant, install them all just to be safe. When you have the necessary dependencies, you can save time and resume from the failing module by adding <code>--resume-from [the name of the module that failed]</code> to your <code>kdesrc-build</code> command.<br />
# Check the [https://build.kde.org/view/Failing/ list of currently broken modules] on the KDE build server. If it's broken there, then it's not your fault. :)<br />
# Ask for help in the the [https://webchat.kde.org/#/room/#kde-devel:kde.org #kde-devel] channel on [[Matrix]] or Libera Chat [[Internet Relay Chat | IRC]]. See [[Get Involved/development#Communicate with the team]]<br />
<br />
== Choose what to do ==<br />
Now that you can compile and deploy custom versions of KDE software, you can open your editor and start hacking on the source code! The code for the version of Dolphin that you built earlier is located at <code>~/kde/src/system/dolphin/</code>; other projects you build with <code>kdesrc-build</code> will live in similar locations.<br />
<br />
A good place to start is with a small bug or feature in an existing piece of software that affects you personally ("scratch your own itch"). Get in touch with the existing developers (see [[#Communicate with the team|Communicate with the team]], below) and they can help you out, by pointing you to the right place in the code and giving advice about how to tackle the problem.<br />
<br />
Try not to start by proposing or working on major features or significant design changes. These can be controversial, and the smoothest way to get going is by working on relatively non-controversial bugfixes. Start slowly and build trust!<br />
<br />
Here are some other ideas for starting points:<br />
<br />
* Improve awkwardly-worded messages and labels that are written in English. This is a great way for non-programmers to contribute! If you can compile software and have a good grasp of English, you can make a big difference here.<br />
* Work on [https://bugs.kde.org/buglist.cgi?bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&keywords=junior-jobs&list_id=1340815 Junior Jobs], which are small tasks that are suitable for beginners (both bugs and features).<br />
* Work on [https://bugs.kde.org/buglist.cgi?bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=ASSIGNED&bug_status=REOPENED&keywords=usability&keywords_type=allwords&list_id=1493316&order=product%2Cchangeddate%20DESC%2Cbug_status%20DESC%2Cresolution%2Cpriority%2Cassigned_to%2Cbug_id&query_format=advanced Bugs related to] KDE's [[Goals/Usability_%26_Productivity | Usability & Productivity initiative]], many of which are small and easy.<br />
<br />
== Test your changes ==<br />
Once you've made some changes, make sure the project still compiles and installs, and make sure the changes have the desired effect when you run the software. Then it's time to run the project's unit tests:<br />
<br />
{{Input|1=<nowiki><br />
cd ~/kde/build/system/dolphin/<br />
source ./prefix.sh<br />
ctest --output-on-failure<br />
</nowiki>}}<br />
<br />
If any test fails, that needs to be investigated and fixed before you can proceed. Once the tests pass, then run the software again to make sure it still behaves properly. If it doesn't, then go back and work on your patch some more, then re-compile and re-deploy, and test again, until the program does what you'd like it to do and all tests pass.<br />
<br />
== Submit a Merge Request ==<br />
Once you're happy with your patch and have verified that it does what you want, it's time to submit your changes for the review!<br />
<br />
KDE uses [https://invent.kde.org GitLab] for merge request submission and review. [[Infrastructure/GitLab#Submitting_a_merge_request|Learn how to submit a Merge Request with GitLab]].<br />
<br />
== Communicate with the team ==<br />
There are several ways to get in touch with KDE developers, either generally or for a specific project. The most important communications channels are:<br />
* The [https://webchat.kde.org/#/room/#kde-devel:kde.org #kde-devel] channel on [[Matrix]] or the Libera Chat [[Internet Relay Chat | IRC]], which is where KDE developers chat in real-time about their work.<br />
* The [https://mail.kde.org/mailman/listinfo/kde-devel kde-devel mailing list] is the primary development mailing list. [http://kde.org/support/#mailinglists Learn more about mailing lists].<br />
<br />
These are general KDE development communication channels, and you may get directed to a more appropriate place for the project you are interested in. There is a [http://www.kde.org/mailinglists/ list of mailing lists] if you want to find a mailing list for a specific team directly. Many teams have their own real-time chat channels, too.<br />
<br />
You can also try looking for the team's section on the [[Main Page]] of this wiki. Many teams have information there for new contributors.<br />
<br />
== Source code cross referencing ==<br />
To search for a class, method, signal name... etc in all KDE repos, KDE uses a code referencing tool to index code in the various KDE repositories, you can search using the web interface available at https://lxr.kde.org/ . This is a very useful tool if you e.g. want to search for code usage examples in existing code... etc.<br />
<br />
Usage:<br />
* From the '''Branch group''' menu, you can select either '''kf5-qt5''', to search the code in the Git ''master'' branches or '''stable-kf5-qt5''' to search only the stable (released) branches<br />
* There are two search ''modes'':<br />
** On the '''Identifier search''' page, you can search for (note that this is case sensitive):<br />
*** class names, e.g. ''RenameDialog'', ''StatJob'', and of course any Qt class (used in KDE code, which is pretty much all of them), ''QLatin1String'', ''QListWidget''<br />
*** method names, e.g. ''addConfigSources()'' (from the KConfig framework) and signal names e.g. ''mimeTypeFound()''<br />
** on the '''General search''' page, you can search for strings, e.g. in Dolphin's context menu (accessed by right- clicking any empty space) there is '''Paste Clipboard Contents''', if you want to find in which source file this string is defined, search for '''Paste Clipboard Contents'''; this search includes classes/methods/signals names.<br />
<br />
== Next steps ==<br />
Sharpen your skills by going through the [https://techbase.kde.org/Development/Tutorials KDE development tutorials]. And try out [http://www.kdevelop.org KDevelop], the KDE IDE.<br />
<br />
After you have had several drama-free patches accepted, a KDE developer is likely to suggest you get a [[Infrastructure/Get a Developer Account|Developer account]], which will allow you to commit directly to KDE projects. With very few limits on where you can commit, you will be expected to act responsibly. At this point, congratulations! You are officially a KDE developer!<br />
<br />
You may also want to set up a more customized development environment. See [[Guidelines and HOWTOs/Build from source]].<br />
<br />
== Best practices & other useful information==<br />
* [[Get Involved/Design/Lessons Learned|Lessons learned over time regarding the development of user-facing software]]<br />
* [[Guidelines_and_HOWTOs/Debugging|Debugging]]<br />
* [[Guidelines and HOWTOs/UnitTests|Unit testing]]<br />
* [[Guidelines and HOWTOs/Code_Checking| Validating code]]<br />
* [[Guidelines and HOWTOs/API Documentation|Writing API documentation]] (related: https://api.kde.org).<br />
* [[Guidelines and HOWTOs/Licensing|Correctly state license information]]<br />
* [[Guidelines_and_HOWTOs/Wayland_Porting_Notes|Writing Wayland-friendly code]]<br />
* [[Frameworks/Porting_Notes|Porting from KDE 4 to Frameworks 5]]<br />
* [[Guidelines_and_HOWTOs/Making_apps_run_uninstalled|Running applications and their unit tests without first installing them]]<br />
* [https://community.kde.org/Infrastructure/GitLab#Testing_someone_else.27s_Merge_Request How to review merge requests]<br />
* [https://github.com/Wenzel/docker-kdesrc-build How to build with Docker]</div>Skierpagehttps://community.kde.org/index.php?title=KDE/FAQs/General_FAQ&diff=92650KDE/FAQs/General FAQ2021-08-06T02:29:50Z<p>Skierpage: remove mention of Subversion, surely it's obsolete</p>
<hr />
<div><languages /><br />
<translate><br />
<br />
== I want to start this new application. What do you advise? == <!--T:2--><br />
<br />
<!--T:3--><br />
We all agree that there are plenty of KDE applications that need to be written. But there are also a lot of existing kde applications that need your help.<br />
<br />
<!--T:4--><br />
To see the areas where help is needed, check [http://www.kde.org/jobs/ this page].<br />
<br />
<!--T:5--><br />
Before starting a new application, it's always a good idea to check [http://www.kde-apps.org/ KDE-Apps.org] and other open source software hosting services like [https://github.com/ GitHub], [https://code.google.com Google Code], and [http://sourceforge.net/ SourceForge] for existing applications and to ask on the [https://mail.kde.org/mailman/listinfo/kde-devel kde-devel] mailing-list whether someone is already working on a similar project.<br />
<br />
== I am a developer, how can I contribute to KDE software? == <!--T:6--><br />
<br />
<!--T:7--><br />
Calligra and KDevelop, despite being very praised, have very few developers, so you might check there. There is no need to be a developer of the KDE workspaces or KDE platform libraries to help. The whole range of KDE software is very modular so you can perfectly improve one area without knowing how others work.<br />
<br />
<!--T:8--><br />
You can also ask on [https://mail.kde.org/mailman/listinfo/kde-devel kde-devel] if someone needs help on an application.<br />
Use the latest version of your favourite KDE software and spot things that are needed. A theme generator? A konsole schema editor? Improve a game? There is always a small feature missing. Go and implement it!<br />
<br />
<!--T:9--><br />
Are you familiar or attracted with a specific field? See if there is a related application that could use your help. Or write one. KDE especially welcomes more non-geek oriented applications.<br />
<br />
== I am not a developer, how can I help? == <!--T:10--><br />
<br />
<!--T:11--><br />
There are plenty of tasks that don't require development skills. Write reviews of applications for the promoting of KDE (see the [https://mail.kde.org/mailman/listinfo/kde-promo kde-promo] mailing-list), help the documentation team (see [http://l10n.kde.org/docs/ i18n.kde.org/doc]), help the translations (see [http://l10n.kde.org/ i18n.kde.org]), help to filter the incoming bugs (see [https://bugs.kde.org/ bugs.kde.org]). <br />
<br />
== Where can I find images of Konqi the dragon? == <!--T:12--><br />
<br />
<!--T:13--><br />
The Konqi for some people SDK is at [ftp://ftp.kde.org/pub/kde/devel/konqi_sdk.tar.bz2 ftp.kde.org/pub/kde/devel/konqi_sdk.tar.bz2]<br /><br />
It was posted to artist.kde.org before that site ceased to be updated.<br />
<br />
<!--T:14--><br />
Further images are on [http://kde.org/stuff/clipart.php KDE merchandise]. Also you can find some unofficial Konqi images and models from [http://forum.kde.org/viewforum.php?f=254 Create Konqi with Krita Contest] and [http://sourceforge.net/projects/supertuxkart/ SuperTuxKart] game.<br />
<br />
== What is the level required to contribute to KDE? What should I learn? What should I read? == <!--T:15--><br />
<br />
<!--T:16--><br />
You need to know C++. Read the [http://qt-project.org/doc/qt-4.8/tutorials.html Qt tutorials] and browse the Qt docs to get familiar with what's available with Qt. Then read the [http://techbase.kde.org/Development/Tutorials KDE tutorials] and browse architecture and documentation. You can also read the [http://flossmanuals.net/kde-guide/ KDE Book], it can not harm. But you don't have to be familiar with the whole KDE architecture to become a KDE developer. Using KDE's technologies is quite easy, so concentrate on what you really need, you can learn the other bits later on. <br />
[http://techbase.kde.org KDE TechBase] and [http://doc.qt.digia.com/ doc.qt.digia.com] (also in your {{path|$QTDIR/doc/html}}) are invaluable resources, take advantage of them.<br />
Then, browse the source, look for the examples directories, see how the other did code their applications. Reading and writing code is the best way to learn.<br />
<br />
== How do I get KDE software from the KDE git repository? == <!--T:17--><br />
<br />
<!--T:18--><br />
Each project on https://invent.kde.org has a clone button, or read [[Special:myLanguage/Get Involved/development]] to learn how to use <code>kdesrc-build</code> to download and build all of KDE.<br />
<br />
== Can I access KDE source code online? == <!--T:19--><br />
<br />
<!--T:20--><br />
Yes. There are many ways to do this:<br />
* Browse [https://invent.kde.org invent.kde.org]<br />
* Search the source code at [https://lxr.kde.org/search lxr.kde.org/search]<br />
* Browse API docs generated from the source code at [https://api.kde.org api.kde.org]<br />
<br />
== I want to put my app in KDE == <!--T:25--><br />
<br />
<!--T:26--><br />
There are three requirements: <br />
* Your app must compile with the latest version of KDE (git master or SVN trunk).<br />
* Your app must be stable.<br />
* Your app must be maintained. You will probably get a good deal of bug reports and wishes. People expect you to fix the bugs and implement the wishes that make sense.<br />
See also the next question.<br />
<br />
== Is it better to develop inside or outside KDE? == <!--T:27--><br />
<br />
<!--T:28--><br />
As core developer Waldo Bastian explains in a copyrighted mail: <br />
<blockquote><br />
Being part of KDE means that you have to work together with others. Such cooperation brings along advantages but it also brings along responsibilities.<br />
<br /><br /><br />
<br />
<!--T:29--><br />
Some of those advantages are: your code ends up on all distro's, people might fix your bugs, you get free translations and documentation, you get tons of bugreports.<br />
<br /><br /><br />
<br />
<!--T:30--><br />
On the other side there are disadvantages and responsibilities: you will have to communicate with other developers about your work, other people might make changes to your code, you will have to respect release freezes, you get tons of bugreports and people actually expect that you fix them as well (what are they smoking?), people expect you to maintain your code.<br />
<br /><br /><br />
<br />
<!--T:31--><br />
You can't chose for the advantages and ignore the responsibilities that come with it, it's a complete package, it's both or nothing.<br />
<br /><br /><br />
<br />
<!--T:32--><br />
In general it should be the author of a piece of software that chooses to put his application in KDE's repositories. We usually don't put software in KDE's repositories unless the author wishes to do so. The other way around, if the author prefers to work on his application elsewhere then that's his right as well. Unless there is a split in the actual group of people working on the application it makes no sense to fork the development of an application because of that.<br />
<br /><br /><br />
<br />
<!--T:33--><br />
'''BUT'''... by putting your code under and open source license and putting it in a KDE repository you give the world at large, as well as KDE in particular, the irrevocable right to use your code. And KDE will use that right at its discretion to protect the interests of KDE, even if that goes against the wishes of the author at that point in time.<br />
</blockquote><br />
<br />
<!--T:34--><br />
It is important to know that but don't be afraid. Usually, things work very well. In 5 years, it has only happened once that a developer had his work put kept in KDE while he wanted to remove it.<br />
<br />
== How do I get write access to KDE repositories? == <!--T:35--><br />
<br />
<!--T:36--><br />
See full article at [[Special:myLanguage/Contribute/Get_a_Contributor_Account|Get a KDE Contributor Account]].<br />
<br />
<!--T:37--><br />
Go to [http://identity.kde.org KDE Identity], fill out the form and describe why you need write access. Make sure to specify your full name and e-mail address.<br />
<br />
<!--T:38--><br />
Please also include the name of your [https://bugs.kde.org/ bugs.kde.org] account, if non-existent please create one so that it can be given usual developer rights. Closing bugs.kde.org reports with keywords in commit comments only works if the email address of your KDE Identity and bugs.kde.org accounts match. You can change your bugs.kde.org address in the Bugzilla user settings.<br />
<br />
<!--T:39--><br />
Git requires use of an ssh key, and new accounts for SVN must also choose the svn+ssh protocol. Send a public ssh key (e.g. {{path|~/.ssh/id_dsa.pub}})<br />
<br />
See also [[#How do I create a SSH key?]]<br />
<br />
<!--T:40--><br />
If you are contributing to an application that is not yours, it is a good idea to first submitting your coding as patches to the author and let him apply them. If the author is not maintaining his application, you might become the new maintainer...<br />
<br />
<!--T:41--><br />
Although there are few restrictions on repository commit rights, we expect you not to disrupt other developers' code without their consent. You must also respect the feature freezes of the release schedule (published on [[Schedules]] page)<br />
<br />
<!--T:42--><br />
A detailed list of rules you should follow when committing to KDE repositories are listed in the [[Special:myLanguage/Policies/SVN_Commit_Policy|KDE Commit Policy]].<br />
<br />
== My app is not stable but I would like to have it in KDE == <!--T:43--><br />
<br />
<!--T:44--><br />
As a first step, we can put it in playground, which is essentially "kde-alpha". Develop it there and when it is ready, request that your app to be moved to the appropriate KDE package or the extragear module.<br />
<br />
== I don't want to lose my SVN history. == <!--T:45--><br />
<br />
<!--T:46--><br />
This is no longer possible with Subversion. Maybe in the future, if the server is upgraded and allows that. Note that for git this is not an issue.<br />
<br />
== What is kdebindings? == <!--T:47--><br />
<br />
<!--T:48--><br />
It contains Qt bindings for Ruby, PHP, C# to use Qt classes with those langages, KDE bindings for Ruby, C#, python to use KDE classes with those langages, and XParts to embed non-KDE apps as a KPart. Check the [[Special:myLanguage/Development/Languages|binding page]] of TechBase. <br />
<br />
== Does the feature freeze apply to playground? == <!--T:49--><br />
<br />
<!--T:50--><br />
No, playground are not a released packages. The same is true for kdereview and extragear: they are not frozen and released. But if you want your app to move to a package, ask for it before the beta-release.<br />
<br />
==Can I have a stable and an unstable KDE on the same computer?== <!--T:51--><br />
<br />
<!--T:52--><br />
Yes, check Building KDE Software from git.kde.org video series:<br />
* [http://www.youtube.com/watch?v=cqnNVmJocR4 Building KDE Software from git.kde.org Part 1]<br />
* [http://www.youtube.com/watch?v=OBJjk5q__Cc Building KDE Software from git.kde.org Part 2]<br />
* [http://www.youtube.com/watch?v=SgwEnLeqsg8 Building KDE Software from git.kde.org Part 3]<br />
<br />
== How do I know which version of Qt/KDE I am using? == <!--T:53--><br />
<br />
<!--T:54--><br />
<tt>kde-config</tt> and all KDE programs accept <tt>--version</tt> as argument.<br />
<br />
==Qt-copy or Qt from qt.digia.com: if one were doing a clean build of trunk, which would be preferable?== <!--T:55--><br />
<br />
<!--T:56--><br />
You can use either. They are binary compatible (forward and backward). There can be, however, a few bugfixes in qt-copy over the most recent Qt release. Especially if building from qt-copy, pay attention to the apply-patches script.<br />
<br />
== How can I checkout a single directory from a SVN module? == <!--T:57--><br />
<br />
<!--T:58--><br />
Checkout the top-level dir with 'svn co -N /modulename', 'cd modulename', 'svn up admin' to get the admin/ dir and then finally checkout the dir you want with 'svn up subdir'<br />
<br />
<!--T:59--><br />
For instance, to get only reaktivate from playground/utils:<br />
<code>svn co -N /playground/utils; svn up reaktivate</code><br />
Then compile as usual.<br />
<br />
<!--T:60--><br />
The same answer applies to the question "How do I get a single language out of kde-i18n?".<br />
<br />
<!--T:61--><br />
If you don't know the name of the directory you want to check out, you can browse websvn.kde.org to find it.<br />
<br />
== How can I get one of the KDE application as a standalone tarball? == <!--T:62--><br />
<br />
<!--T:63--><br />
kdesdk/scripts/svn2dist is a script to extract an application from the KDE source tree and package it as a standalone application. <br />
<br />
== How do I close my own bug reports? == <!--T:64--><br />
<br />
<!--T:65--><br />
If you reported a bug that is fixed in a new release of KDE but is still reported as open, you can close it. It might happen because your bug is the same as another one, or simply because the developer fixed something without noticing that it would correct your bug.<br />
<br />
<!--T:66--><br />
You can do that from your Subversion commit. To do so, append to your commit message a line like this:<br />
<br />
<!--T:67--><br />
<Code>BUG: XXXXX</code> where '''''XXXXX''''' is the bug report you want to close. If the report you're closing is adding a new feature, you can use FEATURE instead of BUG. <br />
<br />
<!--T:68--><br />
Managing a bug list is a huge task for the developers and they usually have a lot of bugs listed, some being fixed already without their knowledge, some being unreproducible, some without enough information to be corrected, etc. If you can help by managing and updating the list of outstanding bugs, you will be gladly welcome. And you will receive an even happier welcome if you provide a patch.<br />
<br />
== How do I create a SSH key? == <!--T:69--><br />
<br />
<!--T:70--><br />
SSH makes use of two keys: a private key and a public key. You should keep the private key secret at all times and only place it on machines over which you have direct control. Public, shared, and community machines are not suitable environments to store SSH private keys. Take action to help prevent theft of your SSH private key data. Setting a password on your SSH private key will help reduce the risks involved with private key theft.<br />
<br />
<!--T:71--><br />
Generate a key pair for each major location you work from. This helps to reduce the impact when your key gets stolen. <br />
When someone obtains access to your private key, your key can be abused in attempts to compromise KDE servers. Well known open source projects have been compromised this way in the past, YOU must help us to make sure that this doesn't happen with KDE servers as well. For that reason it is important to notify sysadmin (at) kde (dot) org immediately when you notice that someone may have had access to your private key for example when a computer on which it was stored has been hacked or infected with a virus, worm or trojan.<br />
<br />
<!--T:72--><br />
If you choose to make a backup of your SSH private key data, please ensure that any such backup is stored in a secure manner as well.<br />
<br />
<!--T:73--><br />
For the practical part, the following command can be used to generate a SSH private/public key pair with<br />
<code>ssh-keygen -t dsa</code><br />
This will create a private key as {{path|~/.ssh/id_dsa}} and a public key as {{path|~/.ssh/id_dsa.pub}}.<br />
<br />
<!--T:74--><br />
There are times when you may want to use a key of a different name to the default, perhaps to use separate keys for different projects. To let SSH know which key you want to use for KDE.org, you can keep a list of servers and their corresponding keys in ~/.ssh/config. For example,<br />
{{Input|1= Host svn.kde.org <br />
IdentityFile ~/.ssh/id_dsa_kde }}<br />
In order to use SSH to access KDE servers you need to send your public key to sysadmin (at) kde (dot) org.<br />
<br />
== How can I monitor changes made by others? == <!--T:75--><br />
<br />
<!--T:76--><br />
The [https://mail.kde.org/mailman/listinfo/kde-commits kde-commits] mailinglist carries automatic notifications for all changes made in the KDE repositories. The KDE-Commits mailinglist is very high traffic. An alternative is [http://commitfilter.kde.org/ CommitFilter] which allows you to get notification for only those areas that interest you.<br />
<br />
<!--T:77--><br />
[[Category:FAQs]]<br />
</translate></div>Skierpagehttps://community.kde.org/index.php?title=KDE/FAQs/General_FAQ&diff=92649KDE/FAQs/General FAQ2021-08-06T02:26:12Z<p>Skierpage: replace out of date instructions</p>
<hr />
<div><languages /><br />
<translate><br />
<br />
== I want to start this new application. What do you advise? == <!--T:2--><br />
<br />
<!--T:3--><br />
We all agree that there are plenty of KDE applications that need to be written. But there are also a lot of existing kde applications that need your help.<br />
<br />
<!--T:4--><br />
To see the areas where help is needed, check [http://www.kde.org/jobs/ this page].<br />
<br />
<!--T:5--><br />
Before starting a new application, it's always a good idea to check [http://www.kde-apps.org/ KDE-Apps.org] and other open source software hosting services like [https://github.com/ GitHub], [https://code.google.com Google Code], and [http://sourceforge.net/ SourceForge] for existing applications and to ask on the [https://mail.kde.org/mailman/listinfo/kde-devel kde-devel] mailing-list whether someone is already working on a similar project.<br />
<br />
== I am a developer, how can I contribute to KDE software? == <!--T:6--><br />
<br />
<!--T:7--><br />
Calligra and KDevelop, despite being very praised, have very few developers, so you might check there. There is no need to be a developer of the KDE workspaces or KDE platform libraries to help. The whole range of KDE software is very modular so you can perfectly improve one area without knowing how others work.<br />
<br />
<!--T:8--><br />
You can also ask on [https://mail.kde.org/mailman/listinfo/kde-devel kde-devel] if someone needs help on an application.<br />
Use the latest version of your favourite KDE software and spot things that are needed. A theme generator? A konsole schema editor? Improve a game? There is always a small feature missing. Go and implement it!<br />
<br />
<!--T:9--><br />
Are you familiar or attracted with a specific field? See if there is a related application that could use your help. Or write one. KDE especially welcomes more non-geek oriented applications.<br />
<br />
== I am not a developer, how can I help? == <!--T:10--><br />
<br />
<!--T:11--><br />
There are plenty of tasks that don't require development skills. Write reviews of applications for the promoting of KDE (see the [https://mail.kde.org/mailman/listinfo/kde-promo kde-promo] mailing-list), help the documentation team (see [http://l10n.kde.org/docs/ i18n.kde.org/doc]), help the translations (see [http://l10n.kde.org/ i18n.kde.org]), help to filter the incoming bugs (see [https://bugs.kde.org/ bugs.kde.org]). <br />
<br />
== Where can I find images of Konqi the dragon? == <!--T:12--><br />
<br />
<!--T:13--><br />
The Konqi for some people SDK is at [ftp://ftp.kde.org/pub/kde/devel/konqi_sdk.tar.bz2 ftp.kde.org/pub/kde/devel/konqi_sdk.tar.bz2]<br /><br />
It was posted to artist.kde.org before that site ceased to be updated.<br />
<br />
<!--T:14--><br />
Further images are on [http://kde.org/stuff/clipart.php KDE merchandise]. Also you can find some unofficial Konqi images and models from [http://forum.kde.org/viewforum.php?f=254 Create Konqi with Krita Contest] and [http://sourceforge.net/projects/supertuxkart/ SuperTuxKart] game.<br />
<br />
== What is the level required to contribute to KDE? What should I learn? What should I read? == <!--T:15--><br />
<br />
<!--T:16--><br />
You need to know C++. Read the [http://qt-project.org/doc/qt-4.8/tutorials.html Qt tutorials] and browse the Qt docs to get familiar with what's available with Qt. Then read the [http://techbase.kde.org/Development/Tutorials KDE tutorials] and browse architecture and documentation. You can also read the [http://flossmanuals.net/kde-guide/ KDE Book], it can not harm. But you don't have to be familiar with the whole KDE architecture to become a KDE developer. Using KDE's technologies is quite easy, so concentrate on what you really need, you can learn the other bits later on. <br />
[http://techbase.kde.org KDE TechBase] and [http://doc.qt.digia.com/ doc.qt.digia.com] (also in your {{path|$QTDIR/doc/html}}) are invaluable resources, take advantage of them.<br />
Then, browse the source, look for the examples directories, see how the other did code their applications. Reading and writing code is the best way to learn.<br />
<br />
== How do I get KDE software from the KDE git repository? == <!--T:17--><br />
<br />
<!--T:18--><br />
Each project on https://invent.kde.org has a clone button, or read [[Special:myLanguage/Get Involved/development]] to learn how to use <code>kdesrc-build</code> to download and build all of KDE.<br />
<br />
== Can I access KDE source code online? == <!--T:19--><br />
<br />
<!--T:20--><br />
Yes. There are many ways to do this:<br />
* Browse [https://invent.kde.org invent.kde.org]<br />
* Search the source code at [https://lxr.kde.org/search lxr.kde.org/search]<br />
* Browse API docs generated from the source code at [https://api.kde.org api.kde.org]<br />
<br />
== What should I put in my .subversion/config? == <!--T:21--><br />
<br />
<!--T:22--><br />
You need to add the ignore list to the [miscellany] group in your ~/.subversion/config:<br />
<syntaxhighlight lang="bash"><br />
[miscellany]<br />
global-ignores = *.moc *.moc.cc *.moc.cpp config.log config.status \<br />
config.cache *.gmo .deps .libs SunWS_cache *.lo *.la *.rpo *.la.closure \<br />
*_la_closure.cpp *_la_closure.cc *_la_closure.cxx *.all_cc.cc *.all_cpp.cpp \<br />
*.all_C.C *.all_cxx.cxx *_meta_unload.cc *_meta_unload.h *_meta_unload.cpp \<br />
*_meta_unload.C *_meta_unload.cxx index.cache.bz2 .memdump Makefile.rules.in \<br />
Makefile.calls.in Makefile.rules Makefile.calls autom4te.cache *.kidl \<br />
*.o *.lo *.la #*# .*.rej *.rej *.pyc<br />
</syntaxhighlight><br />
<br />
<!--T:78--><br />
And to make svn diff ignore whitespace, and print function names:<br />
<br />
<!--T:79--><br />
<syntaxhighlight lang="bash"><br />
[helpers]<br />
diff-cmd = /usr/local/bin/_svndiff<br />
</syntaxhighlight><br />
<br />
<!--T:23--><br />
with the following in {{path|/usr/local/bin/_svndiff}}:<br />
<br />
<!--T:80--><br />
<syntaxhighlight lang="bash"><br />
#!/bin/sh<br />
exec /usr/bin/diff -b -u -p "$@"<br />
</syntaxhighlight><br />
<br />
<!--T:24--><br />
Don't forget to make {{path|/usr/local/bin/_svndiff}} executable.<br />
<br />
== I want to put my app in KDE == <!--T:25--><br />
<br />
<!--T:26--><br />
There are three requirements: <br />
* Your app must compile with the latest version of KDE (git master or SVN trunk).<br />
* Your app must be stable.<br />
* Your app must be maintained. You will probably get a good deal of bug reports and wishes. People expect you to fix the bugs and implement the wishes that make sense.<br />
See also the next question.<br />
<br />
== Is it better to develop inside or outside KDE? == <!--T:27--><br />
<br />
<!--T:28--><br />
As core developer Waldo Bastian explains in a copyrighted mail: <br />
<blockquote><br />
Being part of KDE means that you have to work together with others. Such cooperation brings along advantages but it also brings along responsibilities.<br />
<br /><br /><br />
<br />
<!--T:29--><br />
Some of those advantages are: your code ends up on all distro's, people might fix your bugs, you get free translations and documentation, you get tons of bugreports.<br />
<br /><br /><br />
<br />
<!--T:30--><br />
On the other side there are disadvantages and responsibilities: you will have to communicate with other developers about your work, other people might make changes to your code, you will have to respect release freezes, you get tons of bugreports and people actually expect that you fix them as well (what are they smoking?), people expect you to maintain your code.<br />
<br /><br /><br />
<br />
<!--T:31--><br />
You can't chose for the advantages and ignore the responsibilities that come with it, it's a complete package, it's both or nothing.<br />
<br /><br /><br />
<br />
<!--T:32--><br />
In general it should be the author of a piece of software that chooses to put his application in KDE's repositories. We usually don't put software in KDE's repositories unless the author wishes to do so. The other way around, if the author prefers to work on his application elsewhere then that's his right as well. Unless there is a split in the actual group of people working on the application it makes no sense to fork the development of an application because of that.<br />
<br /><br /><br />
<br />
<!--T:33--><br />
'''BUT'''... by putting your code under and open source license and putting it in a KDE repository you give the world at large, as well as KDE in particular, the irrevocable right to use your code. And KDE will use that right at its discretion to protect the interests of KDE, even if that goes against the wishes of the author at that point in time.<br />
</blockquote><br />
<br />
<!--T:34--><br />
It is important to know that but don't be afraid. Usually, things work very well. In 5 years, it has only happened once that a developer had his work put kept in KDE while he wanted to remove it.<br />
<br />
== How do I get write access to KDE repositories? == <!--T:35--><br />
<br />
<!--T:36--><br />
See full article at [[Special:myLanguage/Contribute/Get_a_Contributor_Account|Get a KDE Contributor Account]].<br />
<br />
<!--T:37--><br />
Go to [http://identity.kde.org KDE Identity], fill out the form and describe why you need write access. Make sure to specify your full name and e-mail address.<br />
<br />
<!--T:38--><br />
Please also include the name of your [https://bugs.kde.org/ bugs.kde.org] account, if non-existent please create one so that it can be given usual developer rights. Closing bugs.kde.org reports with keywords in commit comments only works if the email address of your KDE Identity and bugs.kde.org accounts match. You can change your bugs.kde.org address in the Bugzilla user settings.<br />
<br />
<!--T:39--><br />
Git requires use of an ssh key, and new accounts for SVN must also choose the svn+ssh protocol. Send a public ssh key (e.g. {{path|~/.ssh/id_dsa.pub}})<br />
<br />
See also [[#How do I create a SSH key?]]<br />
<br />
<!--T:40--><br />
If you are contributing to an application that is not yours, it is a good idea to first submitting your coding as patches to the author and let him apply them. If the author is not maintaining his application, you might become the new maintainer...<br />
<br />
<!--T:41--><br />
Although there are few restrictions on repository commit rights, we expect you not to disrupt other developers' code without their consent. You must also respect the feature freezes of the release schedule (published on [[Schedules]] page)<br />
<br />
<!--T:42--><br />
A detailed list of rules you should follow when committing to KDE repositories are listed in the [[Special:myLanguage/Policies/SVN_Commit_Policy|KDE Commit Policy]].<br />
<br />
== My app is not stable but I would like to have it in KDE == <!--T:43--><br />
<br />
<!--T:44--><br />
As a first step, we can put it in playground, which is essentially "kde-alpha". Develop it there and when it is ready, request that your app to be moved to the appropriate KDE package or the extragear module.<br />
<br />
== I don't want to lose my SVN history. == <!--T:45--><br />
<br />
<!--T:46--><br />
This is no longer possible with Subversion. Maybe in the future, if the server is upgraded and allows that. Note that for git this is not an issue.<br />
<br />
== What is kdebindings? == <!--T:47--><br />
<br />
<!--T:48--><br />
It contains Qt bindings for Ruby, PHP, C# to use Qt classes with those langages, KDE bindings for Ruby, C#, python to use KDE classes with those langages, and XParts to embed non-KDE apps as a KPart. Check the [[Special:myLanguage/Development/Languages|binding page]] of TechBase. <br />
<br />
== Does the feature freeze apply to playground? == <!--T:49--><br />
<br />
<!--T:50--><br />
No, playground are not a released packages. The same is true for kdereview and extragear: they are not frozen and released. But if you want your app to move to a package, ask for it before the beta-release.<br />
<br />
==Can I have a stable and an unstable KDE on the same computer?== <!--T:51--><br />
<br />
<!--T:52--><br />
Yes, check Building KDE Software from git.kde.org video series:<br />
* [http://www.youtube.com/watch?v=cqnNVmJocR4 Building KDE Software from git.kde.org Part 1]<br />
* [http://www.youtube.com/watch?v=OBJjk5q__Cc Building KDE Software from git.kde.org Part 2]<br />
* [http://www.youtube.com/watch?v=SgwEnLeqsg8 Building KDE Software from git.kde.org Part 3]<br />
<br />
== How do I know which version of Qt/KDE I am using? == <!--T:53--><br />
<br />
<!--T:54--><br />
<tt>kde-config</tt> and all KDE programs accept <tt>--version</tt> as argument.<br />
<br />
==Qt-copy or Qt from qt.digia.com: if one were doing a clean build of trunk, which would be preferable?== <!--T:55--><br />
<br />
<!--T:56--><br />
You can use either. They are binary compatible (forward and backward). There can be, however, a few bugfixes in qt-copy over the most recent Qt release. Especially if building from qt-copy, pay attention to the apply-patches script.<br />
<br />
== How can I checkout a single directory from a SVN module? == <!--T:57--><br />
<br />
<!--T:58--><br />
Checkout the top-level dir with 'svn co -N /modulename', 'cd modulename', 'svn up admin' to get the admin/ dir and then finally checkout the dir you want with 'svn up subdir'<br />
<br />
<!--T:59--><br />
For instance, to get only reaktivate from playground/utils:<br />
<code>svn co -N /playground/utils; svn up reaktivate</code><br />
Then compile as usual.<br />
<br />
<!--T:60--><br />
The same answer applies to the question "How do I get a single language out of kde-i18n?".<br />
<br />
<!--T:61--><br />
If you don't know the name of the directory you want to check out, you can browse websvn.kde.org to find it.<br />
<br />
== How can I get one of the KDE application as a standalone tarball? == <!--T:62--><br />
<br />
<!--T:63--><br />
kdesdk/scripts/svn2dist is a script to extract an application from the KDE source tree and package it as a standalone application. <br />
<br />
== How do I close my own bug reports? == <!--T:64--><br />
<br />
<!--T:65--><br />
If you reported a bug that is fixed in a new release of KDE but is still reported as open, you can close it. It might happen because your bug is the same as another one, or simply because the developer fixed something without noticing that it would correct your bug.<br />
<br />
<!--T:66--><br />
You can do that from your Subversion commit. To do so, append to your commit message a line like this:<br />
<br />
<!--T:67--><br />
<Code>BUG: XXXXX</code> where '''''XXXXX''''' is the bug report you want to close. If the report you're closing is adding a new feature, you can use FEATURE instead of BUG. <br />
<br />
<!--T:68--><br />
Managing a bug list is a huge task for the developers and they usually have a lot of bugs listed, some being fixed already without their knowledge, some being unreproducible, some without enough information to be corrected, etc. If you can help by managing and updating the list of outstanding bugs, you will be gladly welcome. And you will receive an even happier welcome if you provide a patch.<br />
<br />
== How do I create a SSH key? == <!--T:69--><br />
<br />
<!--T:70--><br />
SSH makes use of two keys: a private key and a public key. You should keep the private key secret at all times and only place it on machines over which you have direct control. Public, shared, and community machines are not suitable environments to store SSH private keys. Take action to help prevent theft of your SSH private key data. Setting a password on your SSH private key will help reduce the risks involved with private key theft.<br />
<br />
<!--T:71--><br />
Generate a key pair for each major location you work from. This helps to reduce the impact when your key gets stolen. <br />
When someone obtains access to your private key, your key can be abused in attempts to compromise KDE servers. Well known open source projects have been compromised this way in the past, YOU must help us to make sure that this doesn't happen with KDE servers as well. For that reason it is important to notify sysadmin (at) kde (dot) org immediately when you notice that someone may have had access to your private key for example when a computer on which it was stored has been hacked or infected with a virus, worm or trojan.<br />
<br />
<!--T:72--><br />
If you choose to make a backup of your SSH private key data, please ensure that any such backup is stored in a secure manner as well.<br />
<br />
<!--T:73--><br />
For the practical part, the following command can be used to generate a SSH private/public key pair with<br />
<code>ssh-keygen -t dsa</code><br />
This will create a private key as {{path|~/.ssh/id_dsa}} and a public key as {{path|~/.ssh/id_dsa.pub}}.<br />
<br />
<!--T:74--><br />
There are times when you may want to use a key of a different name to the default, perhaps to use separate keys for different projects. To let SSH know which key you want to use for KDE.org, you can keep a list of servers and their corresponding keys in ~/.ssh/config. For example,<br />
{{Input|1= Host svn.kde.org <br />
IdentityFile ~/.ssh/id_dsa_kde }}<br />
In order to use SSH to access KDE servers you need to send your public key to sysadmin (at) kde (dot) org.<br />
<br />
== How can I monitor changes made by others? == <!--T:75--><br />
<br />
<!--T:76--><br />
The [https://mail.kde.org/mailman/listinfo/kde-commits kde-commits] mailinglist carries automatic notifications for all changes made in the KDE repositories. The KDE-Commits mailinglist is very high traffic. An alternative is [http://commitfilter.kde.org/ CommitFilter] which allows you to get notification for only those areas that interest you.<br />
<br />
<!--T:77--><br />
[[Category:FAQs]]<br />
</translate></div>Skierpagehttps://community.kde.org/index.php?title=KDE/FAQs/General_FAQ&diff=92648KDE/FAQs/General FAQ2021-08-06T02:20:46Z<p>Skierpage: remove websvn.kde.org (old?), quickgit.kde.org (dead), woboq (old); change rest to https</p>
<hr />
<div><languages /><br />
<translate><br />
<br />
== I want to start this new application. What do you advise? == <!--T:2--><br />
<br />
<!--T:3--><br />
We all agree that there are plenty of KDE applications that need to be written. But there are also a lot of existing kde applications that need your help.<br />
<br />
<!--T:4--><br />
To see the areas where help is needed, check [http://www.kde.org/jobs/ this page].<br />
<br />
<!--T:5--><br />
Before starting a new application, it's always a good idea to check [http://www.kde-apps.org/ KDE-Apps.org] and other open source software hosting services like [https://github.com/ GitHub], [https://code.google.com Google Code], and [http://sourceforge.net/ SourceForge] for existing applications and to ask on the [https://mail.kde.org/mailman/listinfo/kde-devel kde-devel] mailing-list whether someone is already working on a similar project.<br />
<br />
== I am a developer, how can I contribute to KDE software? == <!--T:6--><br />
<br />
<!--T:7--><br />
Calligra and KDevelop, despite being very praised, have very few developers, so you might check there. There is no need to be a developer of the KDE workspaces or KDE platform libraries to help. The whole range of KDE software is very modular so you can perfectly improve one area without knowing how others work.<br />
<br />
<!--T:8--><br />
You can also ask on [https://mail.kde.org/mailman/listinfo/kde-devel kde-devel] if someone needs help on an application.<br />
Use the latest version of your favourite KDE software and spot things that are needed. A theme generator? A konsole schema editor? Improve a game? There is always a small feature missing. Go and implement it!<br />
<br />
<!--T:9--><br />
Are you familiar or attracted with a specific field? See if there is a related application that could use your help. Or write one. KDE especially welcomes more non-geek oriented applications.<br />
<br />
== I am not a developer, how can I help? == <!--T:10--><br />
<br />
<!--T:11--><br />
There are plenty of tasks that don't require development skills. Write reviews of applications for the promoting of KDE (see the [https://mail.kde.org/mailman/listinfo/kde-promo kde-promo] mailing-list), help the documentation team (see [http://l10n.kde.org/docs/ i18n.kde.org/doc]), help the translations (see [http://l10n.kde.org/ i18n.kde.org]), help to filter the incoming bugs (see [https://bugs.kde.org/ bugs.kde.org]). <br />
<br />
== Where can I find images of Konqi the dragon? == <!--T:12--><br />
<br />
<!--T:13--><br />
The Konqi for some people SDK is at [ftp://ftp.kde.org/pub/kde/devel/konqi_sdk.tar.bz2 ftp.kde.org/pub/kde/devel/konqi_sdk.tar.bz2]<br /><br />
It was posted to artist.kde.org before that site ceased to be updated.<br />
<br />
<!--T:14--><br />
Further images are on [http://kde.org/stuff/clipart.php KDE merchandise]. Also you can find some unofficial Konqi images and models from [http://forum.kde.org/viewforum.php?f=254 Create Konqi with Krita Contest] and [http://sourceforge.net/projects/supertuxkart/ SuperTuxKart] game.<br />
<br />
== What is the level required to contribute to KDE? What should I learn? What should I read? == <!--T:15--><br />
<br />
<!--T:16--><br />
You need to know C++. Read the [http://qt-project.org/doc/qt-4.8/tutorials.html Qt tutorials] and browse the Qt docs to get familiar with what's available with Qt. Then read the [http://techbase.kde.org/Development/Tutorials KDE tutorials] and browse architecture and documentation. You can also read the [http://flossmanuals.net/kde-guide/ KDE Book], it can not harm. But you don't have to be familiar with the whole KDE architecture to become a KDE developer. Using KDE's technologies is quite easy, so concentrate on what you really need, you can learn the other bits later on. <br />
[http://techbase.kde.org KDE TechBase] and [http://doc.qt.digia.com/ doc.qt.digia.com] (also in your {{path|$QTDIR/doc/html}}) are invaluable resources, take advantage of them.<br />
Then, browse the source, look for the examples directories, see how the other did code their applications. Reading and writing code is the best way to learn.<br />
<br />
== How do I get KDE software from the KDE git or SVN repositories? == <!--T:17--><br />
<br />
<!--T:18--><br />
See the [[Special:myLanguage/Getting_Started#Building_and_Running_KDE_Software_From_Source|Building and Running KDE Software From Source]] section on the [[Special:myLanguage/Getting_Started|Getting Started]] page.<br />
<br />
== Can I access KDE source code online? == <!--T:19--><br />
<br />
<!--T:20--><br />
Yes. There are many ways to do this:<br />
* Browse [https://invent.kde.org invent.kde.org]<br />
* Search the source code at [https://lxr.kde.org/search lxr.kde.org/search]<br />
* Browse API docs generated from the source code at [https://api.kde.org api.kde.org]<br />
<br />
== What should I put in my .subversion/config? == <!--T:21--><br />
<br />
<!--T:22--><br />
You need to add the ignore list to the [miscellany] group in your ~/.subversion/config:<br />
<syntaxhighlight lang="bash"><br />
[miscellany]<br />
global-ignores = *.moc *.moc.cc *.moc.cpp config.log config.status \<br />
config.cache *.gmo .deps .libs SunWS_cache *.lo *.la *.rpo *.la.closure \<br />
*_la_closure.cpp *_la_closure.cc *_la_closure.cxx *.all_cc.cc *.all_cpp.cpp \<br />
*.all_C.C *.all_cxx.cxx *_meta_unload.cc *_meta_unload.h *_meta_unload.cpp \<br />
*_meta_unload.C *_meta_unload.cxx index.cache.bz2 .memdump Makefile.rules.in \<br />
Makefile.calls.in Makefile.rules Makefile.calls autom4te.cache *.kidl \<br />
*.o *.lo *.la #*# .*.rej *.rej *.pyc<br />
</syntaxhighlight><br />
<br />
<!--T:78--><br />
And to make svn diff ignore whitespace, and print function names:<br />
<br />
<!--T:79--><br />
<syntaxhighlight lang="bash"><br />
[helpers]<br />
diff-cmd = /usr/local/bin/_svndiff<br />
</syntaxhighlight><br />
<br />
<!--T:23--><br />
with the following in {{path|/usr/local/bin/_svndiff}}:<br />
<br />
<!--T:80--><br />
<syntaxhighlight lang="bash"><br />
#!/bin/sh<br />
exec /usr/bin/diff -b -u -p "$@"<br />
</syntaxhighlight><br />
<br />
<!--T:24--><br />
Don't forget to make {{path|/usr/local/bin/_svndiff}} executable.<br />
<br />
== I want to put my app in KDE == <!--T:25--><br />
<br />
<!--T:26--><br />
There are three requirements: <br />
* Your app must compile with the latest version of KDE (git master or SVN trunk).<br />
* Your app must be stable.<br />
* Your app must be maintained. You will probably get a good deal of bug reports and wishes. People expect you to fix the bugs and implement the wishes that make sense.<br />
See also the next question.<br />
<br />
== Is it better to develop inside or outside KDE? == <!--T:27--><br />
<br />
<!--T:28--><br />
As core developer Waldo Bastian explains in a copyrighted mail: <br />
<blockquote><br />
Being part of KDE means that you have to work together with others. Such cooperation brings along advantages but it also brings along responsibilities.<br />
<br /><br /><br />
<br />
<!--T:29--><br />
Some of those advantages are: your code ends up on all distro's, people might fix your bugs, you get free translations and documentation, you get tons of bugreports.<br />
<br /><br /><br />
<br />
<!--T:30--><br />
On the other side there are disadvantages and responsibilities: you will have to communicate with other developers about your work, other people might make changes to your code, you will have to respect release freezes, you get tons of bugreports and people actually expect that you fix them as well (what are they smoking?), people expect you to maintain your code.<br />
<br /><br /><br />
<br />
<!--T:31--><br />
You can't chose for the advantages and ignore the responsibilities that come with it, it's a complete package, it's both or nothing.<br />
<br /><br /><br />
<br />
<!--T:32--><br />
In general it should be the author of a piece of software that chooses to put his application in KDE's repositories. We usually don't put software in KDE's repositories unless the author wishes to do so. The other way around, if the author prefers to work on his application elsewhere then that's his right as well. Unless there is a split in the actual group of people working on the application it makes no sense to fork the development of an application because of that.<br />
<br /><br /><br />
<br />
<!--T:33--><br />
'''BUT'''... by putting your code under and open source license and putting it in a KDE repository you give the world at large, as well as KDE in particular, the irrevocable right to use your code. And KDE will use that right at its discretion to protect the interests of KDE, even if that goes against the wishes of the author at that point in time.<br />
</blockquote><br />
<br />
<!--T:34--><br />
It is important to know that but don't be afraid. Usually, things work very well. In 5 years, it has only happened once that a developer had his work put kept in KDE while he wanted to remove it.<br />
<br />
== How do I get write access to KDE repositories? == <!--T:35--><br />
<br />
<!--T:36--><br />
See full article at [[Special:myLanguage/Contribute/Get_a_Contributor_Account|Get a KDE Contributor Account]].<br />
<br />
<!--T:37--><br />
Go to [http://identity.kde.org KDE Identity], fill out the form and describe why you need write access. Make sure to specify your full name and e-mail address.<br />
<br />
<!--T:38--><br />
Please also include the name of your [https://bugs.kde.org/ bugs.kde.org] account, if non-existent please create one so that it can be given usual developer rights. Closing bugs.kde.org reports with keywords in commit comments only works if the email address of your KDE Identity and bugs.kde.org accounts match. You can change your bugs.kde.org address in the Bugzilla user settings.<br />
<br />
<!--T:39--><br />
Git requires use of an ssh key, and new accounts for SVN must also choose the svn+ssh protocol. Send a public ssh key (e.g. {{path|~/.ssh/id_dsa.pub}})<br />
<br />
See also [[#How do I create a SSH key?]]<br />
<br />
<!--T:40--><br />
If you are contributing to an application that is not yours, it is a good idea to first submitting your coding as patches to the author and let him apply them. If the author is not maintaining his application, you might become the new maintainer...<br />
<br />
<!--T:41--><br />
Although there are few restrictions on repository commit rights, we expect you not to disrupt other developers' code without their consent. You must also respect the feature freezes of the release schedule (published on [[Schedules]] page)<br />
<br />
<!--T:42--><br />
A detailed list of rules you should follow when committing to KDE repositories are listed in the [[Special:myLanguage/Policies/SVN_Commit_Policy|KDE Commit Policy]].<br />
<br />
== My app is not stable but I would like to have it in KDE == <!--T:43--><br />
<br />
<!--T:44--><br />
As a first step, we can put it in playground, which is essentially "kde-alpha". Develop it there and when it is ready, request that your app to be moved to the appropriate KDE package or the extragear module.<br />
<br />
== I don't want to lose my SVN history. == <!--T:45--><br />
<br />
<!--T:46--><br />
This is no longer possible with Subversion. Maybe in the future, if the server is upgraded and allows that. Note that for git this is not an issue.<br />
<br />
== What is kdebindings? == <!--T:47--><br />
<br />
<!--T:48--><br />
It contains Qt bindings for Ruby, PHP, C# to use Qt classes with those langages, KDE bindings for Ruby, C#, python to use KDE classes with those langages, and XParts to embed non-KDE apps as a KPart. Check the [[Special:myLanguage/Development/Languages|binding page]] of TechBase. <br />
<br />
== Does the feature freeze apply to playground? == <!--T:49--><br />
<br />
<!--T:50--><br />
No, playground are not a released packages. The same is true for kdereview and extragear: they are not frozen and released. But if you want your app to move to a package, ask for it before the beta-release.<br />
<br />
==Can I have a stable and an unstable KDE on the same computer?== <!--T:51--><br />
<br />
<!--T:52--><br />
Yes, check Building KDE Software from git.kde.org video series:<br />
* [http://www.youtube.com/watch?v=cqnNVmJocR4 Building KDE Software from git.kde.org Part 1]<br />
* [http://www.youtube.com/watch?v=OBJjk5q__Cc Building KDE Software from git.kde.org Part 2]<br />
* [http://www.youtube.com/watch?v=SgwEnLeqsg8 Building KDE Software from git.kde.org Part 3]<br />
<br />
== How do I know which version of Qt/KDE I am using? == <!--T:53--><br />
<br />
<!--T:54--><br />
<tt>kde-config</tt> and all KDE programs accept <tt>--version</tt> as argument.<br />
<br />
==Qt-copy or Qt from qt.digia.com: if one were doing a clean build of trunk, which would be preferable?== <!--T:55--><br />
<br />
<!--T:56--><br />
You can use either. They are binary compatible (forward and backward). There can be, however, a few bugfixes in qt-copy over the most recent Qt release. Especially if building from qt-copy, pay attention to the apply-patches script.<br />
<br />
== How can I checkout a single directory from a SVN module? == <!--T:57--><br />
<br />
<!--T:58--><br />
Checkout the top-level dir with 'svn co -N /modulename', 'cd modulename', 'svn up admin' to get the admin/ dir and then finally checkout the dir you want with 'svn up subdir'<br />
<br />
<!--T:59--><br />
For instance, to get only reaktivate from playground/utils:<br />
<code>svn co -N /playground/utils; svn up reaktivate</code><br />
Then compile as usual.<br />
<br />
<!--T:60--><br />
The same answer applies to the question "How do I get a single language out of kde-i18n?".<br />
<br />
<!--T:61--><br />
If you don't know the name of the directory you want to check out, you can browse websvn.kde.org to find it.<br />
<br />
== How can I get one of the KDE application as a standalone tarball? == <!--T:62--><br />
<br />
<!--T:63--><br />
kdesdk/scripts/svn2dist is a script to extract an application from the KDE source tree and package it as a standalone application. <br />
<br />
== How do I close my own bug reports? == <!--T:64--><br />
<br />
<!--T:65--><br />
If you reported a bug that is fixed in a new release of KDE but is still reported as open, you can close it. It might happen because your bug is the same as another one, or simply because the developer fixed something without noticing that it would correct your bug.<br />
<br />
<!--T:66--><br />
You can do that from your Subversion commit. To do so, append to your commit message a line like this:<br />
<br />
<!--T:67--><br />
<Code>BUG: XXXXX</code> where '''''XXXXX''''' is the bug report you want to close. If the report you're closing is adding a new feature, you can use FEATURE instead of BUG. <br />
<br />
<!--T:68--><br />
Managing a bug list is a huge task for the developers and they usually have a lot of bugs listed, some being fixed already without their knowledge, some being unreproducible, some without enough information to be corrected, etc. If you can help by managing and updating the list of outstanding bugs, you will be gladly welcome. And you will receive an even happier welcome if you provide a patch.<br />
<br />
== How do I create a SSH key? == <!--T:69--><br />
<br />
<!--T:70--><br />
SSH makes use of two keys: a private key and a public key. You should keep the private key secret at all times and only place it on machines over which you have direct control. Public, shared, and community machines are not suitable environments to store SSH private keys. Take action to help prevent theft of your SSH private key data. Setting a password on your SSH private key will help reduce the risks involved with private key theft.<br />
<br />
<!--T:71--><br />
Generate a key pair for each major location you work from. This helps to reduce the impact when your key gets stolen. <br />
When someone obtains access to your private key, your key can be abused in attempts to compromise KDE servers. Well known open source projects have been compromised this way in the past, YOU must help us to make sure that this doesn't happen with KDE servers as well. For that reason it is important to notify sysadmin (at) kde (dot) org immediately when you notice that someone may have had access to your private key for example when a computer on which it was stored has been hacked or infected with a virus, worm or trojan.<br />
<br />
<!--T:72--><br />
If you choose to make a backup of your SSH private key data, please ensure that any such backup is stored in a secure manner as well.<br />
<br />
<!--T:73--><br />
For the practical part, the following command can be used to generate a SSH private/public key pair with<br />
<code>ssh-keygen -t dsa</code><br />
This will create a private key as {{path|~/.ssh/id_dsa}} and a public key as {{path|~/.ssh/id_dsa.pub}}.<br />
<br />
<!--T:74--><br />
There are times when you may want to use a key of a different name to the default, perhaps to use separate keys for different projects. To let SSH know which key you want to use for KDE.org, you can keep a list of servers and their corresponding keys in ~/.ssh/config. For example,<br />
{{Input|1= Host svn.kde.org <br />
IdentityFile ~/.ssh/id_dsa_kde }}<br />
In order to use SSH to access KDE servers you need to send your public key to sysadmin (at) kde (dot) org.<br />
<br />
== How can I monitor changes made by others? == <!--T:75--><br />
<br />
<!--T:76--><br />
The [https://mail.kde.org/mailman/listinfo/kde-commits kde-commits] mailinglist carries automatic notifications for all changes made in the KDE repositories. The KDE-Commits mailinglist is very high traffic. An alternative is [http://commitfilter.kde.org/ CommitFilter] which allows you to get notification for only those areas that interest you.<br />
<br />
<!--T:77--><br />
[[Category:FAQs]]<br />
</translate></div>Skierpagehttps://community.kde.org/index.php?title=Baloo&diff=92633Baloo2021-08-03T09:12:09Z<p>Skierpage: /* Indexing limitations */ fix link</p>
<hr />
<div>[[File:Mascot konqi-support-search.png|thumbnail|right|Help [[Konqi]] find what he wants!]]<br />
Baloo is the file indexing and file search framework for KDE Plasma, with a focus on providing a very small memory footprint along with with extremely fast searching.<br />
<br />
== Ways to communicate ==<br />
:Mailing List: kde-devel@kde.org ([https://mail.kde.org/mailman/listinfo/kde-devel info page])<br />
:IRC Channel: #kde-devel on freenode<br />
:Phabricator project: https://phabricator.kde.org/project/view/261<br />
<br />
== Top bugs and feature requests ==<br />
'''Bugs:''' https://bugs.kde.org/buglist.cgi?bug_severity=critical&bug_severity=grave&bug_severity=major&bug_severity=crash&bug_severity=normal&bug_severity=minor&bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=ASSIGNED&bug_status=REOPENED&list_id=1629910&priority=VHI&priority=HI&product=frameworks-baloo&query_format=advanced<br />
<br/><br/><br />
'''Feature requests:''' https://bugs.kde.org/buglist.cgi?bug_severity=wishlist&bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=ASSIGNED&bug_status=REOPENED&list_id=1629911&priority=VHI&priority=HI&product=frameworks-baloo&query_format=advanced<br />
<br />
== Indexing limitations ==<br />
Baloo uses the file metadata extractors in [https://invent.kde.org/frameworks/kfilemetadata KFileMetadata] to get information about each file it indexes.<br />
This means for a file's content to be indexed<br />
* the file must have a recognizable MIME type<br />
* KDE must have an extractor for that MIME type<br />
<br />
Other limitations:<br />
* Baloo doesn't index text files (those whose MIME type is detected as "text/''something''") over 10 MB ([https://invent.kde.org/frameworks/baloo/-/blob/master/src/file/extractor/app.cpp#L143 source]).<br />
* The KFileMetadata extractor for text attempts to convert text to Unicode. If the file uses another encoding, such as iso-8859-1, any file contents after the first character that is invalid in Unicode will not be indexed. You may find the <code>-i</code> option to the <code>file</code> command-line utility useful; it tries to infer the character set of a file, e.g. <kbd>file -i ''path/to/myfile.txt''</kbd>.<br />
<br />
== Other Baloo pages here ==<br />
Information may be obsolete.<br />
{{Special:PrefixIndex/{{FULLPAGENAME}}/}}<br />
<br />
== Using Baloo ==<br />
<br />
Baloo is not an application, but a daemon to index files. Applications can use the Baloo framework to provide file search results. For example, [[Dolphin]]'s Content search can use Baloo.<br />
<br />
KDE System Settings > File Search provides an [http://vhanda.in/blog/2014/04/desktop-search-configuration/ intentionally limited number of settings]. You can make additional adjustments in [[Baloo/Configuration | Baloo's configuration file]].<br />
<br />
== balooctl ==<br />
<br />
<code>balooctl</code> is a CLI command to perform certain operations on Baloo. Enter <code>balooctl --help</code> in a terminal app such as [[userbase:Konsole]] to list its available subcommands.</div>Skierpagehttps://community.kde.org/index.php?title=Baloo&diff=92630Baloo2021-08-03T03:38:26Z<p>Skierpage: add new section about Indexing limitations</p>
<hr />
<div>[[File:Mascot konqi-support-search.png|thumbnail|right|Help [[Konqi]] find what he wants!]]<br />
Baloo is the file indexing and file search framework for KDE Plasma, with a focus on providing a very small memory footprint along with with extremely fast searching.<br />
<br />
== Ways to communicate ==<br />
:Mailing List: kde-devel@kde.org ([https://mail.kde.org/mailman/listinfo/kde-devel info page])<br />
:IRC Channel: #kde-devel on freenode<br />
:Phabricator project: https://phabricator.kde.org/project/view/261<br />
<br />
== Top bugs and feature requests ==<br />
'''Bugs:''' https://bugs.kde.org/buglist.cgi?bug_severity=critical&bug_severity=grave&bug_severity=major&bug_severity=crash&bug_severity=normal&bug_severity=minor&bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=ASSIGNED&bug_status=REOPENED&list_id=1629910&priority=VHI&priority=HI&product=frameworks-baloo&query_format=advanced<br />
<br/><br/><br />
'''Feature requests:''' https://bugs.kde.org/buglist.cgi?bug_severity=wishlist&bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=ASSIGNED&bug_status=REOPENED&list_id=1629911&priority=VHI&priority=HI&product=frameworks-baloo&query_format=advanced<br />
<br />
== Indexing limitations ==<br />
Baloo uses the file metadata extractors in [KFileMetadata https://invent.kde.org/frameworks/kfilemetadata] to get information about each file it indexes.<br />
This means for a file's content to be indexed<br />
* the file must have a recognizable MIME type<br />
* KDE must have an extractor for that MIME type<br />
<br />
Other limitations:<br />
* Baloo doesn't index text files (those whose MIME type is detected as "text/''something''" over 10 MB ([https://invent.kde.org/frameworks/baloo/-/blob/master/src/file/extractor/app.cpp#L143 source]).<br />
* The KFileMetadata extractor for text attempts to convert text to Unicode. If the file uses other encoding, such as iso-8859-1, any file contents after the first character that is invalid in Unicode will not be indexed. You may find the <code>-i</code> option to the <code>file</code> command-line utility useful; it tries to infer the character set of a file, e.g. <kbd>file -i ''path/to/myfile.txt''</kbd>.<br />
<br />
== Other Baloo pages here ==<br />
Information may be obsolete.<br />
{{Special:PrefixIndex/{{FULLPAGENAME}}/}}<br />
<br />
== Using Baloo ==<br />
<br />
Baloo is not an application, but a daemon to index files. Applications can use the Baloo framework to provide file search results. For example, [[Dolphin]]'s Content search can use Baloo.<br />
<br />
KDE System Settings > File Search provides an [http://vhanda.in/blog/2014/04/desktop-search-configuration/ intentionally limited number of settings]. You can make additional adjustments in [[Baloo/Configuration | Baloo's configuration file]].<br />
<br />
== balooctl ==<br />
<br />
<code>balooctl</code> is a CLI command to perform certain operations on Baloo. Enter <code>balooctl --help</code> in a terminal app such as [[userbase:Konsole]] to list its available subcommands.</div>Skierpagehttps://community.kde.org/index.php?title=KDE/FAQs/Debugging_FAQ&diff=92629KDE/FAQs/Debugging FAQ2021-08-03T02:52:30Z<p>Skierpage: format qDebug(), it's not obsolete</p>
<hr />
<div><languages /><br />
<translate><br />
==General== <!--T:1--><br />
<br />
===How do I avoid Dr Konqi?=== <!--T:2--><br />
<br />
<!--T:3--><br />
You must set the environment variable KDE_DEBUG (to 1 or whatever you want in fact).<br />
<br />
<!--T:4--><br />
To get Dr Konqi back, unset the KDE_DEBUG environment variable.<br />
<br />
<!--T:5--><br />
Example:<br /><br />
*To avoid Dr Konqi:<br />
::<syntaxhighlight lang="bash">export KDE_DEBUG=1</syntaxhighlight><br />
*To see Dr Konqi:<br />
::<syntaxhighlight lang="bash">unset KDE_DEBUG</syntaxhighlight><br />
<br />
===How do I switch Dr Konqi to developer mode?=== <!--T:6--><br />
<br />
<!--T:7--><br />
Edit file $KDEHOME/share/config/drkonqirc and add the following:<br />
<syntaxhighlight lang="ini"><br />
[drkonqi]<br />
ConfigName=developer<br />
</syntaxhighlight><br />
<br />
===What is a core file? How do I get a core file?=== <!--T:8--><br />
<br />
<!--T:9--><br />
A core file is an image of the memory when your application crashed. Using the core file, you can know which variables were set and where your application crashed. <br />
<br />
<!--T:10--><br />
Some distributions disable the generation of core files. To re-enable them, use <code>ulimit -c unlimited</code>.<br />
<br />
<!--T:11--><br />
Once you have a core file for a crash, you can examine it with gdb appname core . This will open gdb on the core file for the given application. Once at the gdb prompt, the most useful command is <code>bt</code> which generates a backtrace of the crash.<br />
For more information about how to use gdb, see [[Special:myLanguage/Development/Tutorials/Debugging/Debugging_with_GDB|this page]]<br />
<br />
===What tools are available to debug my application?=== <!--T:12--><br />
<br />
<!--T:13--><br />
* KDE5 uses <code>qCDebug()</code> calls to control debugging output. See [[Guidelines and HOWTOs/Debugging/Using Error Messages#Controlling Messages]] to learn how to enable output from these calls.<br />
*<code>qDebug()</code> calls are a simple yet efficient way to debug an application; simply add a <code>qDebug()</code> call in the code to print e.g. the value of some variable, compile the application, then run it from a terminal emulator. The application needs to be built with debugging symbols (CMAKE_BUILD_TYPE=debug or CMAKE_BUILD_TYPE=RelWithDebInfo); if the build type is "release", <code>qDebug()</code> calls won't output anything<br />
*gdb, the GNU debugger, is the quickest way to execute step-by-step and investigate variables (recommended versions are gdb >= 6.x)<br />
*Valgrind<br />
*kdbg is a nice graphical frontend to gdb with a KDE GUI. It has support for many Qt types (including QString).<br />
*Memory leak tracer : See kdesdk/kmtrace. The README explains it all.<br />
*qdbus and dbusviewer from Qt allow to browse DBus interfaces and to easily make DBus calls.<br />
<br />
<!--T:14--><br />
Check [[Special:myLanguage/Development/Tools|this page]] and kdesdk, there are a bunch of useful scripts there.<br />
<br />
===How do I print a QString in gdb?=== <!--T:15--><br />
<br />
<!--T:16--><br />
Check out <tt>sdk/kde-dev-scripts</tt>, and add this line to your ~/.gdbinit :<br />
{{Input|1=source /path/to/kde/sources/kdesdk/scripts/kde-devel-gdb}}<br />
Then in gdb you can enter <code>qs myqstring</code> to see its contents.<br />
For instance, <code>QString myqstring = QString::fromLatin1("contents");</code> can be examined using<br />
<br />
<!--T:17--><br />
{{Input|1=<br />
(gdb) qs myqstring<br />
$1 = "contents"}}<br />
<br />
<!--T:18--><br />
Look in the <tt>[https://invent.kde.org/sdk/kde-dev-scripts/-/blob/master/kde-devel-gdb kde-devel-gdb]</tt> file for other useful macros it defines.<br />
<br />
===I have no symbol when I debug an app that uses kpart, what should I do?=== <!--T:19--><br />
<br />
<!--T:20--><br />
You must stop just after the main to load the debugging symbols of the shared library. After that, you can debug normally. <br />
One can go as far as creating a gdb macro, to stop right after the part was loaded. For kword, by example, I use:<br />
{{Input|1=<br />
define startkword<br />
break main<br />
run<br />
break 'KoDocument::KoDocument(int, QWidget *, char const *, <br />
QObject *, char const *, bool)' cont}}<br />
<br />
===How do I debug an ioslave?=== <!--T:21--><br />
<br />
<!--T:22--><br />
See [[Guidelines and HOWTOs/Debugging/Debugging IOSlaves|debugging ioslaves]]<br />
<br />
=== Why isn't my signal and slot connection working? === <!--T:23--><br />
<br />
<!--T:24--><br />
Here are some steps that you can use to troubleshoot why your signal/slot connection is not working (your slot does not get called for some reason).<br />
<br />
<!--T:25--><br />
1) Verify that the connect() doesn't print a warning to the console at runtime.<br />
<br />
<!--T:26--><br />
If it does, check that you wrote Q_OBJECT, that the parameter names are not in the connect, that the parameter types are compatible, and that the slot is defined, and that the moc was compiled.<br />
<br />
<!--T:27--><br />
1b) Or you can just check to see what connect() returns as a bool. Although this won't give you the error message.<br />
2) Verify that the signal is indeed emitted<br />
3) Verify that the receiver isn't already deleted at that time<br />
4) Verify that emitter->signalsBlocked() returns false<br />
<br />
===Is there a preferred way to print debug output on stderr?=== <!--T:29--><br />
<br />
<!--T:40--><br />
Yes; see [[Special:myLanguage/Guidelines_and_HOWTOs/Debugging/Using_Error_Messages|this tutorial]].<br />
<br />
<!--T:39--><br />
[[Category:FAQs]]<br />
[[Category:Programming]]<br />
</translate></div>Skierpagehttps://community.kde.org/index.php?title=KDE/FAQs/Debugging_FAQ&diff=92628KDE/FAQs/Debugging FAQ2021-08-03T02:32:38Z<p>Skierpage: mention qCDebug(), flag qDebug() as obsolete</p>
<hr />
<div><languages /><br />
<translate><br />
==General== <!--T:1--><br />
<br />
===How do I avoid Dr Konqi?=== <!--T:2--><br />
<br />
<!--T:3--><br />
You must set the environment variable KDE_DEBUG (to 1 or whatever you want in fact).<br />
<br />
<!--T:4--><br />
To get Dr Konqi back, unset the KDE_DEBUG environment variable.<br />
<br />
<!--T:5--><br />
Example:<br /><br />
*To avoid Dr Konqi:<br />
::<syntaxhighlight lang="bash">export KDE_DEBUG=1</syntaxhighlight><br />
*To see Dr Konqi:<br />
::<syntaxhighlight lang="bash">unset KDE_DEBUG</syntaxhighlight><br />
<br />
===How do I switch Dr Konqi to developer mode?=== <!--T:6--><br />
<br />
<!--T:7--><br />
Edit file $KDEHOME/share/config/drkonqirc and add the following:<br />
<syntaxhighlight lang="ini"><br />
[drkonqi]<br />
ConfigName=developer<br />
</syntaxhighlight><br />
<br />
===What is a core file? How do I get a core file?=== <!--T:8--><br />
<br />
<!--T:9--><br />
A core file is an image of the memory when your application crashed. Using the core file, you can know which variables were set and where your application crashed. <br />
<br />
<!--T:10--><br />
Some distributions disable the generation of core files. To re-enable them, use <code>ulimit -c unlimited</code>.<br />
<br />
<!--T:11--><br />
Once you have a core file for a crash, you can examine it with gdb appname core . This will open gdb on the core file for the given application. Once at the gdb prompt, the most useful command is <code>bt</code> which generates a backtrace of the crash.<br />
For more information about how to use gdb, see [[Special:myLanguage/Development/Tutorials/Debugging/Debugging_with_GDB|this page]]<br />
<br />
===What tools are available to debug my application?=== <!--T:12--><br />
<br />
<!--T:13--><br />
* KDE5 uses <code>qCDebug()</code> calls to control debugging output. See [[Guidelines and HOWTOs/Debugging/Using Error Messages#Controlling Messages]] to learn how to enable output from these calls.<br />
*qDebug() calls are an ''obsolete'' simple yet efficient way to debug an application; simply add a qDebug() call in the code to print e.g. the value of some variable, compile the application, then run it from a terminal emulator; note that the application needs to be built with debugging symbols (CMAKE_BUILD_TYPE=debug or CMAKE_BUILD_TYPE=RelWithDebInfo, if the build type is "release", qDebug() calls won't output anything)<br />
*gdb, the GNU debugger, is the quickest way to execute step-by-step and investigate variables (recommended versions are gdb >= 6.x)<br />
*Valgrind<br />
*kdbg is a nice graphical frontend to gdb with a KDE GUI. It has support for many Qt types (including QString).<br />
*Memory leak tracer : See kdesdk/kmtrace. The README explains it all.<br />
*qdbus and dbusviewer from Qt allow to browse DBus interfaces and to easily make DBus calls.<br />
<br />
<!--T:14--><br />
Check [[Special:myLanguage/Development/Tools|this page]] and kdesdk, there are a bunch of useful scripts there.<br />
<br />
===How do I print a QString in gdb?=== <!--T:15--><br />
<br />
<!--T:16--><br />
Check out <tt>sdk/kde-dev-scripts</tt>, and add this line to your ~/.gdbinit :<br />
{{Input|1=source /path/to/kde/sources/kdesdk/scripts/kde-devel-gdb}}<br />
Then in gdb you can enter <code>qs myqstring</code> to see its contents.<br />
For instance, <code>QString myqstring = QString::fromLatin1("contents");</code> can be examined using<br />
<br />
<!--T:17--><br />
{{Input|1=<br />
(gdb) qs myqstring<br />
$1 = "contents"}}<br />
<br />
<!--T:18--><br />
Look in the <tt>[https://invent.kde.org/sdk/kde-dev-scripts/-/blob/master/kde-devel-gdb kde-devel-gdb]</tt> file for other useful macros it defines.<br />
<br />
===I have no symbol when I debug an app that uses kpart, what should I do?=== <!--T:19--><br />
<br />
<!--T:20--><br />
You must stop just after the main to load the debugging symbols of the shared library. After that, you can debug normally. <br />
One can go as far as creating a gdb macro, to stop right after the part was loaded. For kword, by example, I use:<br />
{{Input|1=<br />
define startkword<br />
break main<br />
run<br />
break 'KoDocument::KoDocument(int, QWidget *, char const *, <br />
QObject *, char const *, bool)' cont}}<br />
<br />
===How do I debug an ioslave?=== <!--T:21--><br />
<br />
<!--T:22--><br />
See [[Guidelines and HOWTOs/Debugging/Debugging IOSlaves|debugging ioslaves]]<br />
<br />
=== Why isn't my signal and slot connection working? === <!--T:23--><br />
<br />
<!--T:24--><br />
Here are some steps that you can use to troubleshoot why your signal/slot connection is not working (your slot does not get called for some reason).<br />
<br />
<!--T:25--><br />
1) Verify that the connect() doesn't print a warning to the console at runtime.<br />
<br />
<!--T:26--><br />
If it does, check that you wrote Q_OBJECT, that the parameter names are not in the connect, that the parameter types are compatible, and that the slot is defined, and that the moc was compiled.<br />
<br />
<!--T:27--><br />
1b) Or you can just check to see what connect() returns as a bool. Although this won't give you the error message.<br />
2) Verify that the signal is indeed emitted<br />
3) Verify that the receiver isn't already deleted at that time<br />
4) Verify that emitter->signalsBlocked() returns false<br />
<br />
===Is there a preferred way to print debug output on stderr?=== <!--T:29--><br />
<br />
<!--T:40--><br />
Yes; see [[Special:myLanguage/Guidelines_and_HOWTOs/Debugging/Using_Error_Messages|this tutorial]].<br />
<br />
<!--T:39--><br />
[[Category:FAQs]]<br />
[[Category:Programming]]<br />
</translate></div>Skierpage