- [boost chdir prompt](#boost-chdir-prompt)
- [set idle timeout](#set-idle-timeout)
- [show hot plugged drives](#show-hot-plugged-drives)
-- [Troubleshooting](#troubleshooting)
- - [nnn blocks on opening files](#nnn-blocks-on-opening-files)
- [Why fork?](#why-fork)
- [Mentions](#mentions)
- [Developers](#developers)
Enable volume management in your DE file manager and set removable drives or media to be auto-mounted when inserted. Then visit the usual mount point location (`/mnt` or `/media/user`) in `nnn`.
-### Troubleshooting
-
-#### nnn blocks on opening files
-
-Ideally nnn should not block. Unfortunately, sometimes even the same desktop opener behaves differently on different Linux desktop environments. If `nnn` does block when a file is open, set the environment variable `NNN_NOWAIT` to any non-zero value. For example,
-
- export NNN_NOWAIT=1
-
### Why fork?
I chose to fork because:
static char *copier;
static char *editor;
static char *desktop_manager;
-static char nowait = F_NOTRACE;
static blkcnt_t ent_blocks;
static blkcnt_t dir_blocks;
static ulong num_files;
close(fd);
}
+ if (flag & F_NOWAIT) {
+ signal(SIGHUP, SIG_IGN);
+ signal(SIGPIPE, SIG_IGN);
+ setsid();
+ }
+
if (flag & F_SIGINT)
signal(SIGINT, SIG_DFL);
execlp(file, file, arg1, arg2, NULL);
}
/* Invoke desktop opener as last resort */
- spawn(utils[OPENER], newpath, NULL, NULL, nowait);
+ spawn(utils[OPENER], newpath, NULL, NULL, F_NOWAIT | F_NOTRACE);
continue;
}
default:
goto nochange;
}
- spawn(desktop_manager, path, NULL, path, F_NOTRACE | F_NOWAIT);
+ spawn(desktop_manager, path, NULL, path, F_NOWAIT | F_NOTRACE);
break;
case SEL_FSIZE:
cfg.sizeorder ^= 1;
/* Get the default copier, if set */
copier = getenv("NNN_COPIER");
- /* Get nowait flag */
- nowait |= getenv("NNN_NOWAIT") ? F_NOWAIT : 0;
-
/* Enable quotes if opted */
if (getenv("NNN_QUOTE_ON"))
cfg.quote = 1;