Commit graph

181 commits

Author SHA1 Message Date
Ivailo Monev
1d4185a176 kinit: show the KIO::NetAccess errors as detail
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-06-01 15:04:15 +03:00
Ivailo Monev
192a7ee9bc kinit: mimic KFileItem::run() when starting a service for remote URL
KRun did not do that, it is done now tho and (essentially) instead of
starting the service for inode/vnd.kde.service.http (which there is no
registered service for, that MIME type is made up for the sake of KIO)
the service for the target URL (e.g. http://192.168.1.100:12216) will be
started (which since that is http service would be most likely web browser)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-29 04:00:02 +03:00
Ivailo Monev
cea5737e95 kinit: different take on duplicate URLs
to not pass temporary files more than once to programs

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-25 11:37:21 +03:00
Ivailo Monev
aa66a2e00b kinit: make exception for authorized executable desktop files
will be required for a follow-up commit

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-24 20:40:10 +03:00
Ivailo Monev
1cb8619539 kinit: upload modified temporary files
NOTE: this is potentionally dangerous thing to do because KLauncher reaps
processes and there is no interruption point for it right now which is one
of the reasons upload confirmation is not in place (user interaction will
have to be potentionally canceled too)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-24 14:08:42 +03:00
Ivailo Monev
386f894043 kinit: delay deletion of processes by 3 seconds
because the process is connected to shortly after started but it may finish
before the connection is made and attempting to connect to it will result
in a crash

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-20 02:25:05 +03:00
Ivailo Monev
06654a1bbd kinit: ensure the startup timeout is atleast 1 second
has to be done in the KCM too

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-17 07:32:55 +03:00
Ivailo Monev
c72478ab01 kinit: check the process exit code on state change
for flexibility

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-16 06:33:13 +03:00
Ivailo Monev
c8304a4da7 kinit: do not use the program arguments to check for remote URLs
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-13 08:04:39 +03:00
Ivailo Monev
3523b1baa9 kinit: de-duplicate code
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-13 07:44:30 +03:00
Ivailo Monev
bc9f3cf339 kinit: download remote URLs for services lacking support for such
now klauncher has all required features (by the spec) and then some

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-13 07:32:39 +03:00
Ivailo Monev
9874c20d80 kinit: report failure to start program based on its exit code
assuming 0 means success and anything else failure, unifdef for example
exits with exit code 1 if the output is different tho so there are
exceptions to it

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-13 05:14:10 +03:00
Ivailo Monev
39320266cc kinit: error out when services do not support remote URLs and one is detected
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-13 04:47:21 +03:00
Ivailo Monev
e19f1d01f5 kinit: check only if the MIME type is executable
to be able to run services for files that have the executable bit set but
are not actually programs

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 16:30:19 +03:00
Ivailo Monev
ecef0ed675 kinit: remove exec_blind method from the D-Bus interface
no longer used by any other program

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 14:08:08 +03:00
Ivailo Monev
603c4ba5cf kinit: use scheme handlers as fallback for remote URLs
the MIME type (if it can be obtained) is more accurate anyway

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 13:11:46 +03:00
Ivailo Monev
8da3ce890f kinit: use the home path as default working directory
because klauncher is D-Bus service

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 09:30:09 +03:00
Ivailo Monev
18e3a27275 kinit: warn on invalid startup phase
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 08:58:39 +03:00
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
5f43d4a86c kio: KRun documentation update
other misc changes were made while at it, .gitexcludes had executable
bit set..

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 05:50:57 +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
f278eea50f kinit: set the program icon of klauncher
for message boxes

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-12 04:42:35 +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
0e0db0b815 kdeui: move session management to KApplicaiton
every comment about X11 and session management in general claims it was
broken, not going to claim otherwise. everything that does not use
KApplication shall not be involved into session management now and gets
the middle finger (SIGTERM or SIGKILL) after 5 sec by klauncher when the
session is done

also session management has to be explicitly enabled by applications
now, disabled by default

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2024-05-09 08:29:51 +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
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