lnav icon indicating copy to clipboard operation
lnav copied to clipboard

Can't open files anymore?

Open superDuperCyberTechno opened this issue 2 years ago • 7 comments

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.

superDuperCyberTechno avatar Apr 12 '22 09:04 superDuperCyberTechno

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.

tstack avatar Apr 12 '22 13:04 tstack

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.

superDuperCyberTechno avatar Apr 12 '22 15:04 superDuperCyberTechno

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?

acolomb avatar Apr 12 '22 17:04 acolomb

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?

superDuperCyberTechno avatar Apr 12 '22 17:04 superDuperCyberTechno

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

tstack avatar Apr 12 '22 20:04 tstack

Thanks. I'm probably gonna slap together a bash install script for the binaries, for future use.

superDuperCyberTechno avatar Apr 13 '22 06:04 superDuperCyberTechno

$ 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          -

superDuperCyberTechno avatar Apr 13 '22 07:04 superDuperCyberTechno