Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output to stderr should be captured on run and displayed as pop-up (configurable) #2268

Open
mc-butler opened this issue Jul 10, 2010 · 18 comments
Labels
area: core Issues not related to a specific subsystem prio: low Minor problem or easily worked around

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/2268
Reporter zaytsev (@zyv)
Mentions dkorzhevin (dkorzhevin@….net), Dogen (samuel.sh79@….com), zaytsev (@zyv), gotar@….pl

Hi!

Forwarded from Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=581175

From: martin f krafft <madduck@debian.org>
Subject: redirect stderr of helpers
Date: Tue, 11 May 2010 13:17:39 +0200

Many GUI programmes, such as G* and K* tools, spam stderr with crap
that noone cares about. If mc spawns these helpers, the output
messes up the ncurses UI and requires me to punch ctrl-l to
restore.

I think it would make sense if mc categorically intercepted stderr
of processes it spawns. One could consider accumulating such output
in a buffer that can be viewed separately, or to display the output
with e.g. less, and restore the UI on exit. Ideally it would be
configurable, of course. I don't really want to have to hit any keys
to return to the mc UI.

I think there is a room for discussion, whether this has to be implemented or not and if yes, how. If the consensus is that this will never be implemented I will close the downstream bug.

Z.

@mc-butler
Copy link
Author

Changed by gotar (gotar@….pl) on Aug 1, 2010 at 19:31 UTC (comment 1)

  • Cc changed from zaytsev to zaytsev, gotar@….pl

Something could be done, especially with long-running and 'chatty' programs that keep polluting terminal. However I wonder if it's not easier just to add 2>/dev/null in place where one defines such helpers, thus having the ability to supress some of them while saving others.

And for the ones that are kept I'd like them to clutter only a part of the screen (let's say from the half to mini status) without shifting vertically panels, so I won't have to press ctrl-l to get reliable navigation back.

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Sep 29, 2010 at 15:07 UTC (comment 2)

Related to #2354.

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Sep 29, 2010 at 15:07 UTC (comment 3)

Related to #2331.

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Sep 29, 2010 at 15:08 UTC (comment 4)

  • Cc changed from zaytsev, gotar@….pl to Dogen, zaytsev, gotar@….pl

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Sep 29, 2010 at 15:08 UTC (comment 5)

  • Cc changed from Dogen, zaytsev, gotar@….pl to dkorzhevin, Dogen, zaytsev, gotar@….pl

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Oct 13, 2010 at 5:06 UTC (comment 6)

maybe try this?

diff --git a/lib/vfs/mc-vfs/fish.c b/lib/vfs/mc-vfs/fish.c
index 14b3cf4..ba8a4c0 100644
--- a/lib/vfs/mc-vfs/fish.c
+++ b/lib/vfs/mc-vfs/fish.c
@@ -552,6 +552,7 @@ fish_dir_load (struct vfs_class *me, struct vfs_s_inode *dir, char *remote_path)
     int reply_code;
     gchar *shell_commands;

+    refresh_cmd ();
     /*
      * Simple FISH debug interface :]
      */
diff --git a/src/dialog.c b/src/dialog.c
index a19d39a..ab19cc7 100644
--- a/src/dialog.c
+++ b/src/dialog.c
@@ -706,7 +706,7 @@ dlg_stop (Dlg_head * h)
     h->state = DLG_CLOSED;
 }

-static void
+void
 refresh_cmd (void)
 {
 #ifdef HAVE_SLANG
diff --git a/src/dialog.h b/src/dialog.h
index 84b51cb..363ce01 100644
--- a/src/dialog.h
+++ b/src/dialog.h
@@ -254,6 +254,7 @@ cb_ret_t default_dlg_callback (Dlg_head * h, Widget * sender, dlg_msg_t msg, int

 /* Default paint routine for dialogs */
 void common_dialog_repaint (Dlg_head *h);
+void refresh_cmd (void);

 #define widget_move(w, _y, _x) tty_gotoyx (((Widget *)(w))->y + _y, ((Widget *)(w))->x + _x)
 #define dlg_move(h, _y, _x) tty_gotoyx (((Dlg_head *)(h))->y + _y, ((Dlg_head *)(h))->x + _x)

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Oct 13, 2010 at 9:06 UTC (comment 7)

  • Milestone changed from 4.7 to 4.7.5
  • Severity changed from no branch to on review
  • Status changed from new to accepted
  • Keywords set to stable, candidate
  • Owner set to angel_il

Branch: 2268_FISH_hide_panels_before_connect
changeset: https://www.midnight-commander.org/changeset/2268_FISH_hide_panels_before_connect

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Oct 13, 2010 at 16:35 UTC (comment 8)

  • Severity changed from on review to on rework
  • Keywords changed from stable, candidate to stable-candidate

It is not FISH-specific problem. The general solution must be found.

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Oct 14, 2010 at 16:17 UTC (comment 9)

  • Severity changed from on rework to on review
  • Votes set to andrew_b

Ok, I believe we found a nice solution for FISH. My vote for that.

For other cases (run programs associated with various file types), mc.ext shoult be fixed using 2>/dev/null as Gotar proposed.

@mc-butler
Copy link
Author

Changed by slavazanko (@slavaz) on Oct 27, 2010 at 8:50 UTC (comment 10)

  • Severity changed from on review to approved
  • Votes changed from andrew_b to andrew_b slavazanko

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Oct 28, 2010 at 9:37 UTC (comment 11)

  • Severity changed from approved to merged
  • Votes changed from andrew_b slavazanko to committed-master
  • Resolution set to fixed
  • Status changed from accepted to testing

Merged: [fa5eaac]

@mc-butler
Copy link
Author

Changed by slavazanko (@slavaz) on Oct 28, 2010 at 11:18 UTC (comment 12)

  • Status changed from testing to closed

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Oct 28, 2010 at 16:41 UTC (comment 13)

I don't understand why this ticket is closed. The FISH issue is fixed, but there's still a generic issue with the representation of stderr output. mc.ext is not fixed and a solution for stderr corrupting the screen is not implemented.

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Oct 29, 2010 at 7:35 UTC (comment 14)

  • Resolution fixed deleted
  • Status changed from closed to reopened

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Nov 2, 2010 at 18:35 UTC (comment 15)

  • Votes changed from committed-master to committed-master committed-stable
  • Keywords stable-candidate deleted

FISH fixups are cherry-picked to 4.7.0-stable branch.
Initial [15f6abf]

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Nov 6, 2011 at 7:32 UTC (comment 16)

  • Branch state set to no branch
  • Milestone changed from 4.7.5 to Future Releases

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Nov 29, 2016 at 7:17 UTC (comment 17)

  • Status changed from reopened to assigned
  • Owner angel_il deleted

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Feb 21, 2025 at 7:38 UTC (comment 18)

Ticket #2331 has been marked as a duplicate of this ticket.

@mc-butler mc-butler marked this as a duplicate of #2331 Feb 28, 2025
@mc-butler mc-butler marked this as a duplicate of #2354 Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core Issues not related to a specific subsystem prio: low Minor problem or easily worked around
Development

No branches or pull requests

1 participant