Open danielkrajnik opened 1 year ago
This is due to the fact that some "-" characters are not escaped with a backslash.
@danielkrajnik When doing the 4 steps to reproduce (in my preferred xfce4-terminal) it actually works fine for me:
$ ls /run/user/$UID/gnupg
S.dirmngr S.gpg-agent S.gpg-agent.browser S.gpg-agent.extra S.gpg-agent.ssh
Perhaps it's dependent on the terminal-emulator? Have you tried a different one than what you normally use yet?
@glitsj16 even if it does not happen with all terminals/viewer/... the format is wrong. See @vinc17fr post which writes it down the first time.
with /run/user/$UID/gnupg available
Has nothing todo with writable-run-user.
it actually works fine for me
Strange, it is working for me now as well even though it's the same terminal (alacritty). Maybe switching from Wayland to X11? Or maybe something else changed since July.
Has nothing todo with writable-run-user.
@glitsj16 even if it does not happen with all terminals/viewer/... the format is wrong. See @vinc17fr post which writes it down the first time.
@rusty-snake
The format might be wrong, but how do you explain it sometimes works and sometimes it doesn't? Or in other words, do you have an actionable thing in mind by which we could fix this?
Maybe switching from Wayland to X11?
@danielkrajnik
That's what I'm seeing as well. Not that I can explain the difference...
https://github.com/netblue30/firejail/issues/5903#issuecomment-1735423058 proper escaping with a backslash.
5903 (comment) proper escaping with a backslash.
That's already the case:
Maybe switching from Wayland to X11?
I've just tried logging out of X11 and logging back into Wayland and it still worked (hyphens were again correctly copied as hex 2d
). Both on KDE Plasma. Sorry, not sure what's caused it before.
I can confirm that this was a problem when the issue was opened, though I can't immediately reproduce it now either with man-db 2.11.2-1 on Artix.
I also had attempted a regex to fix this, but I didn't finish it.
This is what I had written (the examples are current):
2. search for an option, e.g.
/ --writable‐run‐user
Error: invalid --writable‐run‐user command line option
GNU man ("man-db" package on Arch Linux) converts -
(hyphen-minus) into
e28090
in the output, unless it's escaped as \-
in the source and currently
only the first ones are escaped in the man pages, such as in
\-\-writable-run-user
(it should be \-\-writable\-run\-user
):
$ git grep -E 'writable\\?-run\\?-user' -- src/man/firejail.1.in
src/man/firejail.1.in:\fB\-\-writable-run-user
src/man/firejail.1.in:$ sudo firejail --writable-run-user
Most/all options are unfortunately also half-escaped:
$ git grep ' \\-\\-[^ ]*-' -- src/man/firejail.1.in | head
src/man/firejail.1.in:firejail {\-? | \-\-debug-caps | \-\-debug-errnos | \-\-debug-syscalls | \-\-debug-syscalls32 | \-\-debug-protocols | \-\-help | \-\-version}
src/man/firejail.1.in:$ firejail \-\-dbus-system=none
src/man/firejail.1.in:$ firejail \-\-dbus-user=none
src/man/firejail.1.in:$ firejail \-\-debug-blacklists firefox
src/man/firejail.1.in:$ firejail \-\-debug-caps
src/man/firejail.1.in:$ firejail \-\-debug-errnos
src/man/firejail.1.in:$ firejail \-\-debug-protocols
src/man/firejail.1.in:$ firejail \-\-debug-syscalls
src/man/firejail.1.in:$ firejail \-\-debug-whitelists firefox
src/man/firejail.1.in:$ firejail \-\-disable-mnt firefox
Note that mandoc does not convert them, so this seems to be a GNU-specific thing.
5903 (comment) proper escaping with a backslash.
That's already the case:
Here I can see
\fB\-\-writable-run-user
The first two are properly escaped, so that they appear correctly in the man page. The other two are not escaped, so that they appear as U+2010 HYPHEN in the man page. This confirms the issue.
GNU man ("man-db" package on Arch Linux) converts
-
(hyphen-minus) intoe28090
in the output, unless it's escaped as\-
in the source and currently only the first ones are escaped in the man pages, such as in\-\-writable-run-user
(it should be\-\-writable\-run\-user
): [...] Note that mandoc does not convert them, so this seems to be a GNU-specific thing.
This actually comes from a recent change in groff
. See the discussion in Debian bug 1041731.
Description
Copying flags from man pages doesn't work - hyphens are encoded as
e280 90
instead2d
.They will look the same, but firejail will error (for example):
Steps to Reproduce
man firejail
/ --writable‐run‐user
firejail --writable‐run‐user
Expected Behaviour
enter shell in firejail with
/run/user/$UID/gnupg
availableActual Behaviour
Error: invalid --writable‐run‐user command line option
Environment
Compile time support:
Checklist
/usr/bin/vlc
) "fixes" it).https://github.com/netblue30/firejail/issues/1139
)browser-allow-drm yes
/browser-disable-u2f no
infirejail.config
to allow DRM/U2F in browsers.--profile=PROFILENAME
to set the right profile. (Only relevant for AppImages)