Skip to content

fix: restore TTY access for eval_password commands#2145

Merged
jubalh merged 6 commits intomasterfrom
fix/2143
Apr 2, 2026
Merged

fix: restore TTY access for eval_password commands#2145
jubalh merged 6 commits intomasterfrom
fix/2143

Conversation

@jubalh
Copy link
Copy Markdown
Member

@jubalh jubalh commented Apr 2, 2026

Replace g_spawn_command_line_sync with g_spawn_sync with the G_SPAWN_CHILD_INHERITS_STDIN flag.
This is actually needed to so that interactive commands can access the terminal.
Otherwise they cannot ask the user for the passphrase.

Ref: f5787fb

@jubalh jubalh added this to the 0.18.0 milestone Apr 2, 2026
@jubalh jubalh self-assigned this Apr 2, 2026
@balejk
Copy link
Copy Markdown
Contributor

balejk commented Apr 2, 2026

This does seem to fix #2143, however the screen seems to not be redrawn after the pinentry closes causing interwoven output until /redraw is issued manually. Is there any chance you could make the redraw automatic? I haven't checked but I don't recall getting interwoven output in previous versions.

Replace g_spawn_command_line_sync with g_spawn_sync with the
G_SPAWN_CHILD_INHERITS_STDIN flag.
This is actually needed to so that interactive commands can access the
terminal.
Otherwise they cannot ask the user for the passphrase.

Ref: f5787fb
Fixes: #2143
Signed-off-by: Michael Vetter <jubalh@iodoru.org>
@jubalh
Copy link
Copy Markdown
Member Author

jubalh commented Apr 2, 2026

Good catch. Please test again.

@balejk
Copy link
Copy Markdown
Contributor

balejk commented Apr 2, 2026 via email

@jubalh
Copy link
Copy Markdown
Member Author

jubalh commented Apr 2, 2026

I'm using pass and everything works here fine. Could you maybe attach a screenshot or explain how to setup the thing you use?
And you are sure you pulled the latest changes, right?

@jubalh
Copy link
Copy Markdown
Member Author

jubalh commented Apr 2, 2026

This task now turned into a whole quest :)
I found a bug in /accounts that prevents removing entries.
And while looking at the UI/ncurses/TTY stuff I also thought about the editor task and worked on this as well.
So this PR now also fixes #1888.

jubalh added 4 commits April 2, 2026 22:47
Commit 81f92f1 introduced a selective update mechanism to
_accounts_save() to prevent overwrites when running multiple instances
by only modifying the specific account being saved.

Commit 5c484c fixed a problem with that commit regarding empty accounts.

It turns there was another bug introduced:
The new implementation only set the keys that existed in memory.
So removal of keys was not possible anymore.

Fixes: 81f92f1
Ref: 5c484c2
Signed-off-by: Michael Vetter <jubalh@iodoru.org>
There was way too much repetition here.
This is in preparation for future changes regarding the editor.

Signed-off-by: Michael Vetter <jubalh@iodoru.org>
Move from blocking fork/wait logic to nonblocking fork and
g_child_watch_add.

This ensures that the Profanity main loop continues to run while an
external editor is open. So we don't loose connection and react to
pings.

We change editor handling also in vcard and muc subject editing.
In the new implementation we are launching the editor and passing a
callback which we will use once the editor exited.

We use the recently added ui_susped() and ui_resume().

To not clutter the UI we need to check whether Profanity UI is suspended
and omit drawing in this case.

Fixes: #1888
Ref: 9b11290
Signed-off-by: Michael Vetter <jubalh@iodoru.org>
This was forgotten in a refactor commit.

Ref: c43c956
Signed-off-by: Michael Vetter <jubalh@iodoru.org>
Remove IDE specific entries, they belong in the global conf of the user.
Remove autotools specific files.

Ref: bc777c5
Signed-off-by: Michael Vetter <jubalh@iodoru.org>
@jubalh jubalh merged commit c0f96e9 into master Apr 2, 2026
9 checks passed
@jubalh jubalh deleted the fix/2143 branch April 2, 2026 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants