-
Notifications
You must be signed in to change notification settings - Fork 566
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
man: cannot use nvim as man pager #6112
Comments
Lua is blacklisted in firejail/etc/inc/disable-interpreters.inc Lines 13 to 20 in 8f55f6c
You probably just need to allow it in the man sandbox. Try |
It's better now, thanks a lot ! However I have new errors now, the man page opens, but is not displayed properly : Here's the error I have:
In |
Yeah that won't work, but you're on the right track. You only need to cherrypick the nvim configuration paths and add those into man.local: $ cat ~/.config/firejail/man.local
include allow-lua.inc
noblacklist ${HOME}/.vim
noblacklist ${HOME}/.vimrc
noblacklist ${HOME}/.cache/nvim
noblacklist ${HOME}/.config/nvim
noblacklist ${HOME}/.local/share/nvim
noblacklist ${HOME}/.local/state/nvim
whitelist /usr/share/nvim What does that do? |
Still no luck, the error is different and doesn't give much information unfortunately:
Here's what my
Is there a way to know exactly what is being denied ? I tried to use something like:
With no luck. Here's the output of Log
|
I tried to copy the whole
Still the same error |
I managed to get it working with the following in man.local:
Note: The @ShellCode33 Does that work for you? |
Works like a charm, thanks a lot ! The key thing seems to be Small additional note, I had errors you apparently didn't have which seem to be related to my/your nvim config. The first one I had to solve was related to nvim swap mechanism, I don't want them anyway so instead of changing the firejail profile, I disabled it in my nvim config:
The second one I've been unable to solve for now is related to treesitter:
I'm not sure why the write permission is required for I tried to add This is not an error that prevents me from reading the man page, but the warning is annoying: |
No problem.
Probably for executing Vimscript, Lua, etc.
With the default configuration, if the swapfile and shada file are disabled in MANPAGER='nvim -n -i NONE +Man!' firejail /usr/bin/man sendfile
Note that there are multiple $ grep -R '^read-only .*nvim' /etc/firejail/
/etc/firejail/disable-common.inc:read-only ${HOME}/.config/nvim
/etc/firejail/disable-common.inc:read-only ${HOME}/.local/share/nvim
/etc/firejail/disable-common.inc:read-only ${HOME}/.local/state/nvim In this case the
|
Thanks for your reply. I tried to add all these read-write statements but it doesn't seem to work. I think the issue might be that |
Good catch; though the How about the following?
|
Nop still doesn't work :/ Here's what my
|
Is the error still about treesitter read/write? What is the neovim and treesitter plugin version? How is treesitter configured in neovim? Does it still happen with firejail-git? If you join the sandbox, what are the permissions in the treesitter Can you create files in them? Example: MANPAGER='nvim -n -i NONE +Man!' firejail --name=nvim /usr/bin/man sendfile
# in another shell
firejail --join=nvim
ls -l ~/.local/share/nvim/lazy/nvim-treesitter/parser
mkdir -p ~/.local/share/nvim/lazy/nvim-treesitter/parser
touch ~/.local/share/nvim/lazy/nvim-treesitter/parser/test
ls -l ~/.local/share/nvim/lazy/nvim-treesitter/parser |
Yes it is
Neovim up to date with ArchLinux repo
I don't know what is the version of Treesitter but it is built into Neovim, so for reproducibility purposes, having neovim However I use the nvim-treesitter plugin which - from what I understand - is a common interface for other plugins to build onto. And I'm on b41bbcb (almost the head). I might be wrong but I don't think this plugin is relevant.
I use LazyVim which configures it for me, its Treesitter configuration can be found here ("Full spec" must be selected) My whole neovim config can be found here.
Yes it does, the exact same error
No
Full logs of the commands you provided
Process tree in case that's useful:
Note: my Again, thanks a lot for your help |
Description
I'm unable to use nvim as man pager.
Steps to Reproduce
Expected behavior
To show the man page.
Actual behavior
Behavior without a profile
Works fine.
Additional context
I tried to create a
man.local
with the following content with no luck (I'm not familiar at all with Firejail):(notice the
nvim
at the end of theprivate-bin
statement)Not sure it's relevant but just in case:
Environment
Checklist
/usr/bin/vlc
) "fixes" it).https://github.com/netblue30/firejail/issues/1139
)Log
Output of
LC_ALL=C firejail /path/to/program
Output of
LC_ALL=C firejail --debug /path/to/program
The text was updated successfully, but these errors were encountered: