[frameworks-kded] [Bug 442740] Automatically detect app type and run in console window, if needed and user agree.

2021-09-22 Thread Lach Sławomir
https://bugs.kde.org/show_bug.cgi?id=442740

--- Comment #7 from Lach Sławomir  ---
Right. System should detect it is a console program/script and spawn terminal.
Many programs for Linux are written in assumption user ran it in terminal, but
why user should worry about that?

Many years ago, I created similar tool, but it needs to recompile program to
link it against special library, which check program is running in terminal and
(if not), spawn terminal window.

But I thought: What about old applications? And this makes me thinking about
current solution.

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-kded] [Bug 442740] Automatically detect app type and run in console window, if needed and user agree.

2021-09-22 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=442740

--- Comment #6 from Nate Graham  ---
Am I understanding that you would like for the system to open the script in a
terminal window, rather than just silently executing the contents?

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-kded] [Bug 442740] Automatically detect app type and run in console window, if needed and user agree.

2021-09-22 Thread Lach Sławomir
https://bugs.kde.org/show_bug.cgi?id=442740

--- Comment #5 from Lach Sławomir  ---
checks program is not GUI
Should be:
checks program is GUI, because we read list of opened unix sockets (it open
Wayland socket) and checks loaded libraries by program (Xlib/Xcb). In case,
program looks like an console, but any of above are pass, we treats is as GUI
program.

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-kded] [Bug 442740] Automatically detect app type and run in console window, if needed and user agree.

2021-09-22 Thread Lach Sławomir
https://bugs.kde.org/show_bug.cgi?id=442740

--- Comment #4 from Lach Sławomir  ---
Yes. It is marked as executable. But, what means it gets launched as excepted?
Many years ago, Novell support similar solution on SUSE, but remove it. My
solution is in some way better, because it additionally checks program is not
GUI. Do you compile my solution, run my script in terminal or use other way to
launch the script.

My solution detect if app is console or GUI program.

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-kded] [Bug 442740] Automatically detect app type and run in console window, if needed and user agree.

2021-09-22 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=442740

--- Comment #3 from Nate Graham  ---
Is the script marked as executable? It gets launched as expected when I mark it
as executable.

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-kded] [Bug 442740] Automatically detect app type and run in console window, if needed and user agree.

2021-09-22 Thread Lach Sławomir
https://bugs.kde.org/show_bug.cgi?id=442740

--- Comment #2 from Lach Sławomir  ---
Created attachment 141791
  --> https://bugs.kde.org/attachment.cgi?id=141791=edit
Simple Hello World script

One think my tool do for checking if program is console was waiting for it
tries to read data from stdin. It maybe not always worked, but as I said, my
tool is not completed yet.

I must decided, what to do in other cases. I can assume if we do not detect
program opens window and exit that it is console program. I do not do this,
because program could open window and exit very quickly after opening an
window. But maybe this assumption is bad. If program exits fast (too fast, so
user even cannot read message from window), should we show user console with
the debug messages? I must think.

-- 
You are receiving this mail because:
You are watching all bug changes.

[frameworks-kded] [Bug 442740] Automatically detect app type and run in console window, if needed and user agree.

2021-09-21 Thread Nate Graham
https://bugs.kde.org/show_bug.cgi?id=442740

Nate Graham  changed:

   What|Removed |Added

 CC||n...@kde.org
 Status|REPORTED|NEEDSINFO
 Resolution|--- |WAITINGFORINFO

--- Comment #1 from Nate Graham  ---
Can you attach a sample script that you think should be run in terminal when
launched from Dolphin or KRunner? Note that it needs to begin with a shebang,
e.g. `#!/bin/bash`

-- 
You are receiving this mail because:
You are watching all bug changes.