Commit graph

48 commits

Author SHA1 Message Date
Ivailo Monev
480e652825 kinit: handle the special case of scheme handlers
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 07:01:41 +03:00
Ivailo Monev
33a2b8b80a kinit: show a dialog to choose service when none can handle the URL
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 05:18:00 +03:00
Ivailo Monev
1ac69ccc74 kdecore: drop unused startup condition feature
there are other conditions that are checked tho like the allowed
environment but this one is Katana specific and unused so

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 05:02:58 +03:00
Ivailo Monev
ccb945dbce kinit: deal with TODO related to multiple files
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 04:50:20 +03:00
Ivailo Monev
a2c8e312d8 kinit: remove temporary files when executable too
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 03:33:14 +03:00
Ivailo Monev
b90f90905b kio: move most of the KRun bits to KLauncher
two things doing the same thing - one has to go away. also KRun does not
fork and the launched service/application lifetime was bound to the
process launching it, that is not the case with klauncher - it is bound
to the session (in the usual case)

a few things on the TODO list but mostly for services/applications
lacking features

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 03:21:17 +03:00
Ivailo Monev
8ce0f2ec3f kinit: delete finished processes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-07 23:32:03 +03:00
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
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
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
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
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
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
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
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
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
efbc9556a6 generic: remove unused org.kde.KLauncher.exec_blind() overload
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-05-25 07:06:15 +03:00
Ivailo Monev
b690586b3d generic: remove deprecated org.kde.KLauncher.start_service_by_name() method
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-05-25 06:31:55 +03:00
Ivailo Monev
a0547d6810 generic: fix possible PID clamping
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2021-01-04 01:48:39 +02:00
Ivailo Monev
190fbddbbe generic: misc cleanups 2015-10-17 10:38:24 +03:00
Ivailo Monev
21ad0df488 generic: make changes required for building against katie 2015-08-11 05:56:07 +03:00
Ivailo Monev
82fc15f54b generic: use CMake moc instead of automoc4 by default
for compatibilty reasons automoc4 support is not removed but it
shall be in the future. automoc4 has not been maintained for a
while (last commit is from 2011) and the stable release is from
2009.

CMake version >= 2.8.6 provides the functionality for mocking so
I see no reason to not make use of it.
2015-02-27 07:40:26 +00:00
Ivailo Monev
814163a8dc initial import 2014-11-13 01:04:59 +02:00