Terminal ends up garbled after abnormal termination
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 3k
- Forks
- 79
- PR merge metrics
- No merged PRs in 30d
Description
I've started bluetui without my bluetoothd running (on my OpenRC / Gentoo system in KDE's konsole) , which yields an error
Error: internal error: D-Bus error org.freedesktop.DBus.Error.ServiceUnknown: The name org.bluez was not provided by any .service files
followed by a line feed (without a carriage return), and my prompt. Typing no longer echoes to the terminal, though. One has to blind-type reset, for things to normalize.
(The error is avoided if bluetoothd is up (i. e. if /etc/init.d/bluetooth start was issued), in which case bluetui works fine, and exits normally. So it's not a big deal, but you might still want to fix it. Also, inexperienced users might have trouble getting out of the garbled state.)
So, this looks like the TUI disables local echo, and then dies without restoring it, perhaps? This could be a library problem, of course, but maybe there is some exit hook that could be used to reset the terminal to a normal state.
Cheers!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the TUI terminal setup and the error path triggered when bluetoothd is unavailable. Reproduce the issue in a Linux terminal with bluetoothd stopped, then inspect how abnormal termination handles terminal cleanup. Done means the D-Bus failure returns the user to a prompt with local echo and normal terminal behavior restored.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100