orhun / gpg-tui

Manage your GnuPG keys with ease! πŸ”
https://blog.orhun.dev/introducing-gpg-tui/
MIT License
1.29k stars 31 forks source link

alpinelinux UART serial - broken rendering #25

Open coelner opened 2 years ago

coelner commented 2 years ago

Describe the bug

rpi_zero:~# gpg-tui 
failed to initialize clipboard: XcbConn(ClosedParseErr)
[Nothing is shown - q closes program]

To Reproduce

run gpg-tui over the UART serial on the alpine linux version on a rpi zero.

Expected behavior

the same output after running it under tmux.

Screenshots/Logs

If applicable, add screenshots or logs to help explain your problem.

System Information

Additional context

I run this on a rpi zero over the UART serial. Using tmux it works and the keys get shown. tmux env:

TMUX=/tmp/tmux-0/default,4188,0
USER=root
SHLVL=2
HOME=/root
TERM_PROGRAM_VERSION=3.2
PAGER=less
PS1=\h:\w\$ 
LOGNAME=root
TERM=screen
LC_COLLATE=C
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.local/bin
LANG=C.UTF-8
TERM_PROGRAM=tmux
SHELL=/bin/ash
PWD=/root
CHARSET=UTF-8
TMUX_PANE=%0

env for the UART shell:

USER=root
SHLVL=1
HOME=/root
PAGER=less
PS1=\h:\w\$ 
LOGNAME=root
TERM=vt100
LC_COLLATE=C
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.local/bin
LANG=C.UTF-8
SHELL=/bin/ash
PWD=/root
CHARSET=UTF-8
orhun commented 2 years ago

failed to initialize clipboard: XcbConn(ClosedParseErr)

FYI this is normal for non-X11 environments, since copy/paste feature requires X11.

[Nothing is shown - q closes program]

Can you press '?' and share what's shown the bottom right? It seems like $GNUPGHOME is not set (or set to somewhere else) so the keyring is empty. For example:

cap

Also you can compare these values to your working environment. I'm not familiar with the UART serial so I think it's a (shared) keyring problem.


Are you having any other problems about the rendering? Are the other keys work normally or is it completely broken?

coelner commented 2 years ago
failed to initialize clipboard: XcbConn(ClosedParseErr)

I get a blank screen with the direct call within ash, but after calling tmux the output is visible.Both is about the serial connection.

Due the missing clipboard the I/O is limited (maybe there a way to paste it into the shell buffer/ or disable the menu items)

orhun commented 2 years ago

Hmm it's weird. I don't really have the environment to reproduce this issue but feel free to guide me.

I get a blank screen with the direct call within ash, but after calling tmux the output is visible.Both is about the serial connection.

I wonder what does tmux do differently.

I'll research a little bit. It'd be good if you let me know if anything changes.

coelner commented 2 years ago

No problem, I was just stumpling over this. [background: the rpi should be a air gap gnupg key generator and master key storage]