Warning, /plasma/drkonqi/README.md is written in an unsupported language. File is not indexed.

0001 <!--
0002     SPDX-License-Identifier: CC0-1.0
0003     SPDX-FileCopyrightText: 2021-2022 Harald Sitter <sitter@kde.org>
0004     SPDX-FileCopyrightText: 2021 Aleix Pol i Gonzalez <aleixpol@kde.org>
0005 -->
0006 
0007 # DrKonqi
0008 ## Activating the debug button for DrKonqi
0009 Add into `~/.config/drkonqirc`:
0010 ```
0011 [DrKonqi]
0012 ShowDebugButton=true
0013 ```
0014 
0015 ## Integrating with coredumpd
0016 We need to make sure that the `drkonqi-coredump-processor@.service` is enabled so that coredumpd knows to tell us when a crash happens. You can inspect it with:
0017 
0018 * Check it's enabled: `systemctl is-enabled drkonqi-coredump-processor@.service`
0019 * You can enable it with `systemctl enable drkonqi-coredump-processor@.service`
0020 * The user socket also needs to be present `systemctl --user is-enabled drkonqi-coredump-launcher.socket`
0021 * And can be enabled with `systemctl --user enable --now drkonqi-coredump-launcher.socket `
0022 
0023 To make sure the coredumpd setup is working correctly:
0024 
0025 * `cat /proc/sys/kernel/core_pattern` should show systemd-coredump as handler
0026 * `KCRASH_DUMP_ONLY=1 kwrite`
0027 * `killall -SEGV kwrite`
0028 * journalctl should show the following:
0029   * systemd-coredump@.service run an instance (e.g. systemd-coredump@12-66048-0.service)
0030   * drkonqi-coredump-processor@.service should run an instance with same suffix as systemd-coredump@
0031   * drkonqi-coredump-launcher@.service should run an instance with yet the same suffix
0032 * A notification to start drkonqi should appear
0033 
0034 To use the notifytruck (catch crashes in all software) add `KDE_COREDUMP_NOTIFY=1` to your /etc/environment. This
0035 enables the NotifyTruck for drkonqi-coredump-launcher@.service and offers access to gdb for all crashes. This is a
0036 feature targeted at developers:
0037 
0038 * `gedit`
0039 * `killall -SEGV gedit`
0040 * journalctl should look like above
0041 * A notification to start konsole+gdb should appear (if no notification appears something has gone horribly wrong)
0042 
0043 ### Workflow, Service, and Enablement overview
0044 
0045 * KCrash writes metadata files with context information when an application crashes
0046 * systemd-coredump@.service; from upstream; must be enabled; catches the actual core
0047 * drkonqi-coredump-processor@.service; WantedBy systemd-coredump@.service;
0048   must be enabled (`systemd-coredump@.service.wants/drkonqi-coredump-processor@.service` symlink must exist in one of
0049   the `systemd-analyze unit-paths`!); passes along the crash into the relevant user session
0050 * drkonqi-coredump-launcher.socket; user socket; must be enabled per user or in one of the global
0051   `systemd-analyze unit-paths`; the processor talks to this socket
0052 * drkonqi-coredump-launcher@.service; user service; doesn't need to be enabled; invoked by the socket as needed and
0053   processes the metadata, created by KCrash in the very beginning, to figure out if and how to invoke drkonqi
0054 * drkonqi-coredump-cleanup.{service,timer}; cleanup tech for long running sessions to avoid cluttering $HOME with
0055   dangling metadata files
0056 * launcher's main.cpp runs through a set of DumpTruck instances, the first that wants to handle the crash may. By default
0057   that would be the DrkonqiTruck for crashes in KDE software
0058 
0059 ### IncludeAll Mode
0060 
0061 Add into `~/.config/drkonqirc`:
0062 ```
0063 [General]
0064 IncludeAll=true
0065 ```
0066 
0067 This operation mode primarily targets Plasma Mobile. It effectively catches and reports **all** coredumpd tracked
0068 crashes. This is notably including non-KDE software for which drkonqi will only offer tracing facilities but no active
0069 bug reporting. The use is that for systems where we are completely in control we'll want to give our users the ability
0070 to differentiate a crash in middleware from one in the application space (or defects caused by the former in the latter).
0071 
0072 Please note that this mode requires correctly set up coredumpd support as outlined above.