maxiberta / htop-snap

The `htop` utility packaged as a snap.
MIT License
19 stars 4 forks source link

`man htop` return nothing for htop installed as snap #11

Open N0rbert opened 3 years ago

N0rbert commented 3 years ago

Steps to reproduce:

  1. Have Ubuntu 20.04 LTS installed, without deb-version of htop
  2. Run snap install htop, wait it to finish
  3. Run man htop

Expected results:

Actual results:

Bug at launchpad: https://bugs.launchpad.net/ubuntu/+source/snap/+bug/1910790 .

maxiberta commented 3 years ago

Indeed, the lack of man pages support in snaps can be quite annoying. Unfortunately, individual snaps can do nothing about it, as it needs to be supported by snapd (here's the bug report). The good news is that a fix has been discussed and designed at the snapcraft forum. Edit: there's actually an old PR under review, but it's blocked :-(.

Will leave this issue open as a reminder to add a proper man page whenever the feature lands in snapd.

Thanks for your report!

ameinild commented 3 years ago

Maxiberta, I don't quite agree with your sentiment.

You could put the manpages inside the snap in /snap/htop/current/share/man A user can then do the following in .bashrc (or another file): export MANPATH=":/snap/htop/current/share/man"

And then the manpages work. But since you didn't even include the manpages inside the snap, this workaround does not work. The workaround works on other snaps, like nano, tmux etc.

maxiberta commented 3 years ago

@ameinild fyi, the man page is included in the snap: /snap/htop/current/usr/local/share/man/man1/htop.1.

ameinild commented 3 years ago

Ok thanks for clearing that up.