terminator
terminator copied to clipboard
User Help: Confirmation Promt Not Showing When Closing The Terminal With An Active Child
Hello,
I am new to this software and I am trying to set up terminator to give a warning/confirmation dialog box when a process like vim is active. This is what I usually get in gnome-terminal.
I have tried following the advice here
https://askubuntu.com/questions/798188/make-terminator-ask-for-permission-before-closing-if-something-is-being-executed
and changed the /usr/share/terminator/terminatorlib/container.py
file.
I have also made sure that the suppress_multiple_term_dialog
in .config/terminator/config is set to false
.
Yet, I have found no success in my attempts. Could someone please help me?
What Happens
What I desire
Cool, I think that this is actually caused by a bug. When I reproduced it, I got the following traceback:
mattrose@sorrento terminator]$ ./terminator -u
** (terminator:421094): WARNING **: 10:25:50.613: Binding '<Control><Alt>a' failed!
Unable to bind hide_window key, another instance/window has it.
Traceback (most recent call last):
File "/home/mattrose/Code/terminator/terminatorlib/notebook.py", line 351, in closetab
del nb.last_active_term[child]
KeyError: <terminal.Terminal object at 0x7fe57ff97a40 (terminatorlib+terminal+Terminal at 0x555d3ae23cc0)>
<window.Window object at 0x7fe581a2eac0 (terminatorlib+window+Window at 0x555d3a9d4280)> is not in registered window list
@mattrose Thank You for responding.
It might not be a bug because this is my first time using gnome-terminal. Most probably I might be doing something wrong. I just don't want terminator to accidentally close without prompting me.
You're definitely right about prompting before closing if the terminal is running processes, I just have to figure out how to do that. The traceback was possibly related, but I think there's more work to do. I am working on this.
Found the gnome-terminal code. It's ... complex. MIght take me a bit to implement. Hopefully I can use the python-psutil lib to simplify.
@mattrose ahh geez much appreciate the effort.
This is proving a lot hairier than I originally thought. Still working on it, but progress is slow.
How is this going? Can't wait to update this feature. 😋
Hello, I regularly trigger some bindings inadvertently trying to split the terminal which just closes everything. I've yet to identify the binding responsible for this.
Can I suggest in the meantime to put a "dumb" toggle setting that will ask you confirmation no matter what?
FYI - I just got burned by the 'Binding '<Control><Alt>a' failed' issue. It caused the launched terminator window to be bound to the launching windows process rather than being independent. The fix is to go into terminator and changing the binding of '<Control><Alt>a' to something else.
Now when my script launches terminator, the launching window goes away and the terminator window persists as it should.
Close tab by accidently
- Click on tab close button OR
- Midle click tab title
I also desire to this feature, Confirm before close tab
This is proving a lot hairier than I originally thought. Still working on it, but progress is slow.
@mattrose
the gnome-terminal
has this feature, which also libvte
based.
Is it possible to imitate its implementation?
and it's smart (only need confirm when have active task)