nnn icon indicating copy to clipboard operation
nnn copied to clipboard

Broken pipe error

Open sud0xenn opened this issue 2 months ago • 8 comments

Environment details

  • [x] Operating System: Linux Mint 22.2 x86_64
  • [x] Desktop Environment: Cinnamon 6.4.8
  • [x] Terminal Emulator: Terminator 2.1.3
  • [x] Shell: fish 3.7.0
  • [ ] Custom desktop opener (if applicable):
  • [x] Program options used: tmux new-session nnn -deH -P p (via ls alias)
  • [x] Configuration options set:
alias cat "bat -pP"
alias ls "tmux new-session nnn -deH -P p"
set -x VISUAL vi                                                                                                                                  
set -x EDITOR nano                                                                                                                                
set -x NNN_ICONLOOKUP 1                                                                                                                           
set -x BLK "03"; set -x CHR "03"; set -x DIR "04"; set -x EXE "02"; set -x REG "07"; set -x HARDLINK "05"; set -x SYMLINK "05"; set -x MISSING "08"; set -x ORPHAN "01"; set -x FIFO "06"; set -x SOCK "03"; set -x UNKNOWN "01"                                                                    
set -x NNN_COLORS "#04020301;4231"                                                                                                                
set -x NNN_FCOLORS "$BLK$CHR$DIR$EXE$REG$HARDLINK$SYMLINK$MISSING$ORPHAN$FIFO$SOCK$UNKNOWN"                                                       
set -x NNN_FIFO '/tmp/nnn.fifo'                                                                                                                   
set -x NNN_PLUG 'p:preview-tui;h:fzhist;x:togglex;c:fzcd;'                                                                                        
set -x NNN_PREVIEWIMGPROG viu                                                                                                                     
set -x NNN_PREVIEWVIDEO mpv
  • [x] Plugins are installed
  • [x] Issue exists on nnn master

Navigate to the bin directory and the preview pane shows ls: write error: Broken pipe.

Image

sud0xenn avatar Oct 16 '25 03:10 sud0xenn

@N-R-K or @luukvbaal can you please have a look?

@sud0xenn does it work with option -a?

jarun avatar Nov 08 '25 03:11 jarun

@sud0xenn does it work with option -a?

Not sure what changed since, but the issue isn't reproducible anymore. Allow me to revert back all my configs and report back to see if I an reproduce it consistently.

EDIT: It seems like I can reproduce it for fraction of seconds when I keep holding the down navigation and the previews are generated rapidly. Probably the instantaneous processing time of the preview-tui plugin. There should be some milliseconds of threshold delay before processing the preview.

But the thing is back when I opened the issue, for the bin folder, that error was printed in the preview pane indefinitely.

sud0xenn avatar Nov 08 '25 04:11 sud0xenn

Maybe because you don't have permission for /bin and some error was thrown. You can check if the issue persists if you start nnn as root.

jarun avatar Nov 09 '25 16:11 jarun

Maybe because you don't have permission for /bin and some error was thrown. You can check if the issue persists if you start nnn as root.

You're correct, it doesn't happen as root. So then there's no way to fix it without editing the perms which I'd rather not mess with.

sud0xenn avatar Nov 10 '25 00:11 sud0xenn

It shouldn't be trying to write anything to /bin though.

set -x NNN_FIFO '/tmp/nnn.fifo'

What are the perms of /tmp/nnn.fifo?

N-R-K avatar Nov 10 '25 11:11 N-R-K

alias ls "tmux new-session nnn -deH -P p"

Also avoid aliasing system commands to something else. Can you try without the ls alias?

N-R-K avatar Nov 10 '25 11:11 N-R-K

What are the perms of /tmp/nnn.fifo?

The perms are: prw------- 1 myuser myuser 0 Nov 10 15:46 /tmp/nnn.fifo

sud0xenn avatar Nov 10 '25 20:11 sud0xenn

Also avoid aliasing system commands to something else. Can you try without the ls alias?

Same issue.

sud0xenn avatar Nov 10 '25 20:11 sud0xenn