I nearly ended first beta of WXConsoleSpawner, utility detecting if app is console or gui and open terminal window for console apps.
Long time ago, I started cli2gui as library. When linked with executable, it detects if program is running inside console/terminal emulator and spawns console window in this case. Nobody uses it and it has some problem, like if other library was linked first, we can miss messages or read/poll operation.
I started WXConsoleSpawner then. From simple program, which monitors stdin of program, which it ran to solution integrates which konsole. Meanwhile I try to use CUSE (character device in userspace) with FUSE (filesystem in userspace) to create terminal wrapper and tell app it is running inside terminal emulator, even it is not.
Meanwhile, I try to integrate my solution with KIO and try to wrote eBPF assmebly with eBPF assembly macrodefinition for C. It is too hard and I give up. Everything, because I decided I do not request KIO maintainers to add llvm as requirement.
But I decided to integrate my solution with Konsole and (again) write eBPF program - this time with LLM help. I decided to use LLVM at all. I think my solution could be out-of-tree of KDE and KIO could detect if it is installed, so I can use compiler I want.
It works for each test I decided to use, but I must known how to push my changes. Gemini told I should remove .git directory, use git init, commit each file and push to new repository. In this case, there could be little chance to integrate my solution with konsole sources. I also need to integrate it with KIO.
So. I cannot wrote to KDE Invent and KDE Bugs, so I wrote here, as suggested on bugs kde org.
Is there and Konsole or KIO devs, who can advise me?
Why this project? I know in Linux people are not downloading random stuff and ran it, but sometimes people are downloading driver installers, such like printer or nvidia. They click on icon and nothing. Also, they can download scripts integrated with dialog or something like that. This script maybe need to ask some question? Again - click and nothing.
Additionally, why should you remember, to type konsole -e command instead of paste command to krunner? I think, if I integrate this with KIO, there no reason for that. I will wrote krunner integration, if adding KIO integration would not be sufficient.
Current implementation is not so good I imagined. I simply ran modified konsole and give command as parameter. This modified konsole program send tty path and cgroup path to my program. It also monitor for main program exit.
BPF filters will detect console and GUI app. Console app is detecting based if program do read, poll, sendfile, copyrange, etc. operations on terminal device. GUI is detected based if we connect to wayland socket.
If program exits and it was not been detected as gui, we shown terminal. If program do thinks normal for console apps, we shown terminal window. That’s rather all.