Skip to content
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

Can't open files anymore? #970

Open
superDuperCyberTechno opened this issue Apr 12, 2022 · 7 comments
Open

Can't open files anymore? #970

superDuperCyberTechno opened this issue Apr 12, 2022 · 7 comments
Labels

Comments

@superDuperCyberTechno
Copy link

superDuperCyberTechno commented Apr 12, 2022

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.

@tstack
Copy link
Owner

tstack commented Apr 12, 2022

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.

@superDuperCyberTechno
Copy link
Author

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.

@acolomb
Copy link

acolomb commented Apr 12, 2022

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?

@superDuperCyberTechno
Copy link
Author

superDuperCyberTechno commented Apr 12, 2022

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?

@tstack
Copy link
Owner

tstack commented Apr 12, 2022

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

@superDuperCyberTechno
Copy link
Author

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

@superDuperCyberTechno
Copy link
Author

superDuperCyberTechno commented Apr 13, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants