Ticket #2268 (assigned enhancement)
Output to stderr should be captured on run and displayed as pop-up (configurable)
Reported by: | zaytsev | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | Future Releases |
Component: | mc-core | Version: | master |
Keywords: | Cc: | dkorzhevin, Dogen, zaytsev, gotar@… | |
Blocked By: | Blocking: | ||
Branch state: | no branch | Votes for changeset: | committed-master committed-stable |
Description
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.
Change History
comment:6 Changed 14 years ago by angel_il
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)
comment:7 Changed 14 years ago by angel_il
- Status changed from new to accepted
- Keywords stable candidate added
- severity changed from no branch to on review
- Owner set to angel_il
- Milestone changed from 4.7 to 4.7.5
Branch: 2268_FISH_hide_panels_before_connect
changeset: https://www.midnight-commander.org/changeset/2268_FISH_hide_panels_before_connect
comment:8 Changed 14 years ago by andrew_b
- Keywords stable-candidate added; stable candidate removed
- severity changed from on review to on rework
It is not FISH-specific problem. The general solution must be found.
comment:9 Changed 14 years ago by andrew_b
- Votes for changeset set to andrew_b
- severity changed from on rework to on review
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.
comment:10 Changed 14 years ago by slavazanko
- Votes for changeset changed from andrew_b to andrew_b slavazanko
- severity changed from on review to approved
comment:11 Changed 14 years ago by angel_il
- Status changed from accepted to testing
- Votes for changeset changed from andrew_b slavazanko to committed-master
- Resolution set to fixed
- severity changed from approved to merged
comment:13 Changed 14 years ago by zaytsev
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.
comment:14 Changed 14 years ago by andrew_b
- Status changed from closed to reopened
- Resolution fixed deleted
comment:15 Changed 14 years ago by andrew_b
- Keywords stable-candidate removed
- Votes for changeset changed from committed-master to committed-master committed-stable
FISH fixups are cherry-picked to 4.7.0-stable branch.
Initial changeset:15f6abf0fc6586afacfd73a1f3e6262faa6664d4
comment:16 Changed 13 years ago by andrew_b
- Branch state set to no branch
- Milestone changed from 4.7.5 to Future Releases
comment:17 Changed 8 years ago by andrew_b
- Status changed from reopened to assigned
- Owner angel_il deleted
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.