Commit graph

153 commits

Author SHA1 Message Date
Ivailo Monev
ae4c786744 kinit: start services in the service path if not empty
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-04-28 22:01:11 +03:00
Ivailo Monev
45b0ff8106 kinit: remove check for now gone config option
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-29 15:27:17 +03:00
Ivailo Monev
2d1d7daf82 kio: drop fake startup notification support
silent_arg was used to fake startup notification for non-compliant
applications, that shall not be the case anymore - when applications do not
claim startup notification support or it is simply disabled for specific
use case (as is done by ark for its service actions) then there shall be no
startup notification, silent or otherwise

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-03 00:46:58 +03:00
Ivailo Monev
a50c72de91 generic: drop support for startup notification via D-Bus service
just another way to do what ASN does, the KService::DBusWait mode was
not used too. with this change however all of the process setup code is
moved to a seperate class and the responsibility of KLauncher about ASN
is reduced (ASN now works better for process that fork but if application
claims ASN support and does not send ASN finish then the timeout will be
reached)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-19 19:53:14 +03:00
Ivailo Monev
64e890cc1a kinit: read the launch timeout from klaunchrc
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-19 01:16:26 +03:00
Ivailo Monev
ee0d50c901 generic: purge most manual tests
long overdue, have no use for them

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-03 07:03:28 +03:00
Ivailo Monev
4c5361d34d kinit: implement public cleanup method for klauncher
to be used by ksmserver

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-29 00:16:32 +03:00
Ivailo Monev
5613e5483c generic: remove redundant build varibles
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-17 20:25:52 +03:00
Ivailo Monev
36c910c653 generic: move stuff from KDE4Internal module to KDELibs4Config
large-scale changes to the build system, nothing a user sees tho - it is
all under the hood

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-17 19:01:40 +03:00
Ivailo Monev
38e370d475 kdeui: new KApplication::quitOnDisconnected() method, also setup quit signal handler by default
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-23 15:09:48 +02:00
Ivailo Monev
61709722d0 kdecore: remove now unused no-wait/blind option of KToolInvocation
KToolInvocation processes application events now (see
4fb8a1d674)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-20 15:40:32 +02:00
Ivailo Monev
edc24a7f6e kinit: disable session manager for KIO slaves
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-19 19:09:49 +02:00
Ivailo Monev
74ba680406 kinit: autostart optimizations
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-19 14:22:13 +02:00
Ivailo Monev
4fb8a1d674 generic: call klauncher methods asynchronously from KToolInvocation
so that application event processing is not blocked by any
KToolInvocation method, the D-Bus service name and PID return arguments
are not used anyway so removing them

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-19 12:44:44 +02:00
Ivailo Monev
34d87abfd8 kinit: new method for dumping the system environment
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-10 09:01:48 +02:00
Ivailo Monev
f82af797c3 kinit: require phase argument to be passed to autoStart method
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-10 08:53:45 +02:00
Ivailo Monev
c8223bd24b kinit: store and reuse the converted environment in KLauncherAdaptor::exec_blind()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-10 01:47:45 +02:00
Ivailo Monev
922b4b44d1 kinit: do not insert empty environment variables into the klauncher environment
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-10 01:41:19 +02:00
Ivailo Monev
2de2388352 kinit: remove the "README" in the README file
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-09 01:51:53 +02:00
Ivailo Monev
89e0305c24 kinit: remove redundant reparseConfiguration() method of org.kde.KLauncher interface
klauncher is no longer responsible for KIO slaves

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-08 03:59:18 +02:00
Ivailo Monev
936cc87544 kinit: log messages when service status changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-07 23:45:49 +02:00
Ivailo Monev
e7375fce97 kinit: set the application ID of the ASN
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-07 22:41:52 +02:00
Ivailo Monev
bc067dbdfa kio: drop support for putting slaves on hold
with klauncher no longer responsible for KIO slave the next step is to
make them plugins and the feature to put them on hold will be of no value
because QLibrary reuses library/plugin instances and creating a new
slave object will be cheap

in other words the performance will be similar to that of KFileMetaInfo
for which I also wrote the plugins myself - they are pretty quick
compared to what strigi was doing and with more flexible configuration
interface but it took some effort to get there

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-06 04:22:23 +02:00
Ivailo Monev
d7d7888d28 kinit: warning message correction
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-06 00:31:18 +02:00
Ivailo Monev
d5027edeb5 kinit: comment clarification
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 23:21:46 +02:00
Ivailo Monev
6d0209a2e0 kinit: log message when ASN is disabled for service
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 23:07:33 +02:00
Ivailo Monev
8e0c48a7f7 kinit: log the ASN binary
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-06 00:47:51 +02:00
Ivailo Monev
e4458950a5 kinit: include required directories
fixes bootstrap build, I have to setup buildbot for this..

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-06 00:19:36 +02:00
Ivailo Monev
54690e0d55 kinit: tweak the processes termination
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 19:54:32 +02:00
Ivailo Monev
a320630b94 kinit: check if ASN is disabled for service via KRun::checkStartupNotify()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 08:50:21 +02:00
Ivailo Monev
e1db604f6b kinit: inline static functions
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 08:49:23 +02:00
Ivailo Monev
e0b6830e53 kinit: fill more ASN info for services
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 08:33:24 +02:00
Ivailo Monev
5bc229297b kinit: do not call KStartupInfo::sendStartup() with invalid ASN info
KStartupInfo::sendStartup() does this anyway but the debug message will not
be logged

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 08:08:26 +02:00
Ivailo Monev
eeb31af052 kinit: remove redundant sendSIFinish() call
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 06:31:14 +02:00
Ivailo Monev
dbb3316ce1 kinit: add exception to unique application/service starting logic
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 06:29:40 +02:00
Ivailo Monev
ce33f0e615 kinit: do not attempt to start service if it is started and its X-DBUS-StartupType is set to unique
for Katana that does not do much tho, applications that have
X-DBUS-StartupType set to Unique use KUniqueApplication which does the
neccessary checks to make sure another instance is not started

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 06:12:51 +02:00
Ivailo Monev
705386b4e9 kinit: check if the process is running while waiting for its service
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 05:32:37 +02:00
Ivailo Monev
96de7d5684 kinit: send ASN start before starting the program
now that ASN update is send from signal it was possible update to be send
before start

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 04:07:43 +02:00
Ivailo Monev
7b2a33efec kinit: include system signal header for kill()
fixes build on FreeBSD

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 02:50:12 +02:00
Ivailo Monev
0e16676993 kinit: set the ASN binary to the program filename
altough the complete program path is more informative, setting it to the
filename only matches the old behaviour

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 01:19:28 +02:00
Ivailo Monev
ca2af71922 kinit: check if absolute paths exists from KLauncherAdaptor::findExe()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 01:01:08 +02:00
Ivailo Monev
ac048407c3 kinit: cache the QDBusConnectionInterface
it will not change because the connection is persistent

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 00:39:08 +02:00
Ivailo Monev
5177126cc6 generic: documentation update
note that the kdeinit README used to reference Pentium 3 CPU

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-05 02:08:10 +02:00
Ivailo Monev
aa6b5ea4f0 kinit: klauncher and KCrash rewrite
much simpler and easier to maintain, also it will be proper D-Bus
service now with no sockets, process title hack and whatnot. KCrash
and startkde script (in kde-workspace repo) have to be adjusted for
it tho

note that the internal KIO scheduler already has the functionality to
put slaves on hold but now they will be started as detached process.
eventually they may become plugins (they are loaded as such by kioslave
program) without event loop dispatcher

fixes application startup notification (ASN) and cleanup issues

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-04 23:20:15 +02:00
Ivailo Monev
e851a35ee5 generic: remove unused X-KDE-autostart-after feature
klipper and kmix set it to "panel" in their .desktop files but that's not
valid application/service

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-03 04:06:04 +02:00
Ivailo Monev
eebd8d9475 kinit: remove XAUTHORITY hack
it is breaking kdontchangethehostname. also kded4, kglobalaccel, knotify,
and kuiserver were redone to be proper D-Bus service with signal handlers
(see KApplication::quitOnSignal()) so if the dbus-daemon sends signal to
the processes they will clean up properly

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-02 21:17:20 +02:00
Ivailo Monev
9b41127ecb generic: prepare for Katie changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-13 00:40:18 +02:00
Ivailo Monev
9937b5e854 kinit: remove the feature to start programs specified in kdeinit4 argument
the goal is to make kdeinit4 do only startup, i.e. XDG-like startup and
KCM modules initialization (which currently kcminit does). klauncher
(which is part of kdeinit4 still) shall be responsible for programs and
KIO slaves only

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-03 10:18:15 +02:00
Ivailo Monev
4a371cc21e Revert "kdeui: remove bogus --kdeinit argument passing from KCrash::defaultCrashHandler()"
This reverts commit a375907865.
2022-11-03 09:54:41 +02:00
Ivailo Monev
a7fc6cd735 kinit: rename exec command definitions
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-01 08:55:13 +02:00