lnav
lnav copied to clipboard
Can't open files anymore?
lnav version v0.10.1
Describe the bug
I used to simply supply a file path to lnav
and then I could do what I needed. These days I can only open syslogs... Is this intentional? I've been ripping my hair out trying to figure out what's going on.
To Reproduce
Run lnav [path to any plaintext file]
returns what looks like a basic manpage, not a running instance of lnav
with the supplied file loaded.
What platform are you running it on (linux, macos)? How was it installed (snap, brew, …)?
Can you try running it with -d lnav-debug.log
and attaching that log file.
Sorry for the lack of info.
I am using Ubuntu 20.04 (server, SSH access), lnav
installed via Snap. The lnav
version is 0.10.1-dirty.
Running lnav -d ./lnav-debug.log [path to log file]
returns the same help screen as mentioned above. Nothing is written to lnav-debug.log
, in fact it isn't created at all.
Snap restricts access to files only inside the user's home directory by default IIRC. Are you trying to open files from somewhere else maybe?
I am. This makes sense. Just installed v0.8.5 via the official repos and it runs exactly as expcted now. I guess we solved it.
I assume there's no workaround for the Snap package?
What connections are setup for your snap install, here's what I see on an Ubuntu 21.10 vagrant machine:
$ snap connections lnav
Interface Plug Slot Notes
home lnav:home :home -
log-observe lnav:log-observe :log-observe -
network lnav:network :network -
removable-media lnav:removable-media - -
ssh-keys lnav:ssh-keys - -
x11 lnav:x11 :x11 -
The solution is mostly likely asking for "classic" confinement for the snap. But, I haven't cared to do that.
There are binaries attached to releases, you could try that way -- https://github.com/tstack/lnav/releases/tag/v0.10.1
Thanks. I'm probably gonna slap together a bash install script for the binaries, for future use.
$ snap connections lnav
Interface Plug Slot Notes
home lnav:home :home -
log-observe lnav:log-observe :log-observe -
network lnav:network :network -
removable-media lnav:removable-media - -
ssh-keys lnav:ssh-keys - -
x11 lnav:x11 :x11 -