Bug 29431 - KDE should show command line output if no windows are created on screen
Summary: KDE should show command line output if no windows are created on screen
Status: RESOLVED INTENTIONAL
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: RedHat Enterprise Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
: 17903 253653 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-07-21 03:18 UTC by mikem
Modified: 2023-11-11 22:18 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mikem 2001-07-21 03:03:12 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           general
Version:           KDE 2.1.2 
Severity:          normal
Installed from:    Red Hat Linux 7.1
Compiler:          gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-81)
OS:                Linux 2.2.17-8smp i686
OS/Compiler notes: 

If an application launched finishes without opening any windows on screen the console output should be displayed.

This allows:

1. Better troubleshooting for GUI applications that fail and log bugs to the command line

2. The use of command line utilities from the run menu application links etc.

(Submitted via bugs.kde.org)
(Called from KBugReport dialog. Fields Application manually changed)
Comment 1 Waldo Bastian 2003-06-23 21:38:00 UTC
You can use the "Run in terminal" checkbox to achieve this. 
Comment 2 mikem 2003-06-24 02:57:52 UTC
You can, but users need to know that running in the terminal will show command line output  
which will be useful for them to diagnose the problem. Hence `run in terminal', while showing  
console output, isn't really the best solution for end users.   
   
That said, I entered this `bug' report a while ago, but I think its more of a feature request.    
   
Could this be reopened and marked as a feature request?   
Comment 3 mikem 2003-06-24 03:01:04 UTC
Er, new users. Not end users. 
 
Cheers Waldo :^) 
Comment 4 Thiago Macieira 2003-06-24 03:13:52 UTC
Yes, but how do you know that an application will not create a window? The only 
way of doing that would be to cache the application's output regardless and if the 
window is not shown (until when?), then show the output. That requires a bit more 
of processing than normally. 
 
Besides, there's also the case you don't want to see any output. 
 
How about a compromise: show a hint if no window was created after a certain 
time, telling that the application might have crashed or options may have been 
missing, and explaining how to obtain a terminal. Of course, with a "Don't ask me 
again" option. 
Comment 5 mikem 2003-06-24 03:21:47 UTC
Indeed, you'd cache the output of launched apps - and as you've pointed out, there would be a 
small load associated with this, hence this behaviour should be user configurable. 
 
Your idea of showing a hint after a reasonable timeout sounds good. 
 
 
Comment 6 Thiago Macieira 2003-12-01 05:05:26 UTC
Probably kwin or kicker should do that. We already have the launch feedback in kicker.
Comment 7 Lubos Lunak 2003-12-01 13:12:44 UTC
This is nonsense, way too difficult to implement, and not really needed, if you ask me. There's a checkbox or .desktop file entry for CLI apps, and the output is logged in ~/.xsession-errors. Code for detecting when to show it would probably need crystal ball.


Comment 8 Casey Allen Shobe 2003-12-04 10:03:27 UTC
Not nonsense.  Difficult or impossible to implement, maybe.  But when I press alt-f2, type kmail, and nothing happens, repeatedly, I don't know what to do.  This is how many users (especially newbies) must feel.

So I fallback on opening up a konsole, and typing kmail.  Then it works fine.  I close it and try again from alt-f2 and this time it works.  How will I ever realize that applications are randomly crashing because I'm out of system memory?  (And opening konsole is really not a solution at all).

It's very aggravating when something doesn't start and I have to open konsole to find out why.  Am I out of memory?  Is my configuration file corrupt?  Did my memory develop bad sectors and cause a signal 11?  Did the files get mismatched when I updated my CVS last?

On a side note, it's also very aggravating when something eats up all my memory and applications start randomly disappearing off of my desktop with no notification whatsoever (thankfully I finally realized the cause of this being out of memory).
Comment 9 Thiago Macieira 2003-12-04 16:57:56 UTC
> On a side note, it's also very aggravating when something eats up all my
> memory and applications start randomly disappearing off of my desktop with
> no notification whatsoever (thankfully I finally realized the cause of this
> being out of memory). 

On that, there are many causes. One could simply be that your kernel's OOM killer has started killing processes. Therefore, the processes receive SIGKILL and there's nothing that can be done.

Another reason is that memory allocation failed for whatever reason. Memory allocation for small chunks is not checked in KDE code (new throws an except which is not caught anywhere). If you really are out of memory, your swap must be in high activity. Even if we can catch those problems, there's no way of knowing if we can map a window and show "out of memory" or run drkonqi.
Comment 10 Vedran Ljubovic 2004-09-21 21:23:43 UTC
> Code for detecting when to show it would probably need crystal ball. 

Not really. You have the Launch Feedback which knows when the window has opened, right? And if nothing happens within a certain timeout period, the feedback stops. This same code can be reused: when the window opens, the cache is discarded; if nothing happens within timeout (it can be the very same timeout) show window with output on stdout+stderr. Would it be really that hard to pipe stdout and stderr for all apps started from menus and Alt+F2 to /tmp/appname.something ???
Comment 11 rgpublic 2004-11-13 11:50:49 UTC
*** This bug has been confirmed by popular vote. ***
Comment 12 Vedran Ljubovic 2004-11-13 12:43:20 UTC
*** Bug 17903 has been marked as a duplicate of this bug. ***
Comment 13 anlar 2005-04-19 17:02:49 UTC
Rather
- Attempt to make the programs work better without failing
- Learn to type the proper commands or use the shiny *click* *click* interfaces

The feature could popup windows also when they are not needed meaning useless spam. Distinguishing important from unimportant would be hard. If you got something that might fail, run it from console... 

Just my .02$
Comment 14 mikem 2005-04-20 06:02:13 UTC
Responding to Anlar:
- Programs won't always work perfectly all the time.
- Learning to type 'firefox' versus click on 'firefox' doesn't constitute learning. Nor is typing more 'proper' than clicking. 
Anlar, you seem to be suggesting the user should know in advance if his program is going to fail. How will the user know that?
- There is no spam issue, because the console output would be shown only if the program generates no windows.
Comment 15 Alexander Mentyu 2018-03-29 14:58:35 UTC
*** Bug 253653 has been marked as a duplicate of this bug. ***
Comment 16 Alexander Mentyu 2018-03-29 15:00:31 UTC
Duplicated wish #253653 has also input and error functionality requested
Comment 17 David Edmundson 2023-11-11 22:18:57 UTC
>If an application launched finishes without opening any windows on screen the console output should be displayed.

This is not the job of kwin. We're not doing this.