Is your feature request related to a problem? Please describe.
Whenever I close a tab where the connection is still open, I get asked if I'm sure.
Unfortunately the default button selected is cancel. So I always need to hit tab, or use the mouse to click on ok. In most applications for dialog boxes the default selected is the affirmative button.
Describe the solution you'd like
Select "OK" be default
Hi @yennor
If you set the General Settings > Terminal Options > Close terminal on disconnect. You can avoid any confirmation. You would have to always exit properly from a session : type exit in ssh (sftp,mosh) sessions, log out on rdp sessions, and so on. Which is convenient; since, if you log out properly, you know you are not leaving anything incomplete by mistake.
Now, with respect to your comments. This kind of requests are always controversial. As you may like the Ok button to be the default, there will be others that would disagree.
I do not know if making a poll would help either.
And adding an option to choose your preferred default will become complicated when people begin asking to have a terminal closing default to OK, but delete nodes default to Cancel, and delete group default to OK, and so on.
Never the less, I do not like to be asked at all, when closing a terminal. And thou there are options like : do not confirm on Exit, or close the terminal on disconnect (explained earlier), I personally would prefer an option that would allow to close any terminal without any confirmation.
Sorry to invade your issue, I just wanted to share my thoughts here in your thread because this would have to be decided by @gfrenoy as the leader of the project, and he will need many points of view.
I'm not a UX guru (do we have one on board?) but, if we follow the Gnome HIG recommendations : the general idea should be : default is OK unless it can lead to a loss of data (see https://developer.gnome.org/hig/stable/buttons.html.en for more details).
Closing a terminal "too quickly" is for a me a risk to loose an important connection (like a software update or stopping a running server) so it deserves that you think twice about it.
Is there any other opinion about this ?
I've just checked it out with 4 file managers. When I want to delete something. The default is "ok - Delete". I think it is like that with most applications. I'm really used to just press enter (or spacebar) to say yes to whatever action I wanted to do, and escape when it was a mistake.
Now when in the dialog the default button is cancel, then I can press escape => cancel. Enter => cancel. There's no way to agree to the action with a single key stroke. I'm pretty sure that basically all applications I use work with using ok as default. Otherwise I would have noticed and would have been annoyed ;-).
It's a minor issue anyway... It just nags me each time I want to close a tab or the whole application.
But I guess in most cases when the application asks a user for confirmation, the user wants to confirm., otherwise he wouldn't have started that action.
I do not mind change it.
@gfrenoy
Now, to be fare. We changed the order of the buttons from : "Ok" - "Cancel" to "Cancel" - "Ok" ( #229 )
And that, introduced the change in the defaults.
So before that the "Ok" button __was the default__.
So to me this is more an issue of a regression caused by #229
The whole point is to see if we consider that this action can lead to a potential loss of data. In that case, it should not be the default. Otherwise it's actually better to not ask ; nobody will read it anyway...
The fact that you have to make 2 strokes is done on purpose to let you think twice about your action.
I've just checked it out with 4 file managers. When I want to delete something. The default is "ok - Delete"
Ok so they do not follow the Gnome HIG recommendations :-p
It just nags me each time I want to close a tab or the whole application.
Yes I understand but that's somehow on purpose. I used to do Ctrl+D / Ctrl+F4 to close a connection and I know that if a popup is shown, something is wrong and I need to read on.
when the application asks a user for confirmation, the user wants to confirm., otherwise he wouldn't have started that action.
Unless user believes it's safe to execute that action and it is not ! So again : how can we make sure that closing a terminal is "safe" ...?
this is more an issue of a regression caused by #229
Ok but if it was wrong before ; no problem to have it right now :)
The whole point is to see if we consider that this action can lead to a potential loss of data. In that case, it should _not_ be the default. Otherwise it's actually better to not ask ; nobody will read it anyway...
In most programs I don't read the dialogs anyway, since I know what they say, but I won't deactivate them anyway.
It happened to many times that I've accidentally drag'n dropped a file somewhere else, hit the wrong button, clicked the wrong menu entry etc.
It also happens that I want to change a tab in asbru and accidentally hit the x with the mouse.
So when a dialog appears which asks me if I'm sure, and I didn't expect any, I always read them :-).
Ok so they do not follow the Gnome HIG recommendations :-p
I've just checked out the gnome file manager. Guess what it does:
that about the Gnome hig recommendations
If you set the General Settings > Terminal Options > Close terminal on disconnect. You can avoid any confirmation. You would have to always exit properly from a session : type
exitin ssh (sftp,mosh) sessions, [...]
+1 for this; nitpicking: Ctrl+D is faster :)
the Gnome HIG recommendations : the general idea should be : default is OK unless it can lead to a loss of data
If I remember correctly, somewhere else the HIG says something like: don't ask for confirmation at all if accidentally executing the action can be undone in less than about half a minute.
Closing a terminal "too quickly" is for a me a risk to loose an important connection (like a software update or stopping a running server) so it deserves that you think twice about it.
My opinion is the opposite. Of course the terminal is tricky because it can host a wide range of applications. But an interrupted software update can usually easily be continued, a running server can easily be restarted. Text editors save the file into a temporary one when the terminal disappears. Terminal-based apps are well prepared for the terminal disappearing, because an ssh connection can break at any time.
If accidentally stopping a running server causes more harm than an inconvenience of about half a minute, you shouldn't be running it directly in the terminal, you should run it in daemon mode, or at the very least inside a screen/tmux.
I can hardly imagine scenarios when accidentally closing a terminal would result in severe consequences.
We changed the order of the buttons from : "Ok" - "Cancel" to "Cancel" - "Ok" ( #229 ) And that, introduced the change in the defaults. So before that the "Ok" button was the default. So to me this is more an issue of a regression caused by #229
I definitely did not intend to change the default, and if that's truly what happened, I also find it a regression that should be reverted.
Just the 2 cents of someone not even using 脕sbr煤 :P
Just the 2 cents of someone not even using 脕sbr煤 :P
Ahhhh?!, come on!!, is the best how can you do that to us?
In case it wasn't clear: I never used Pac / 脕sbr煤 (other than for testing). I only cared about retiring the ancient GTK 2 based VTE. And I'm only lurking around here to look for new VTE bugs. :rofl:
But an interrupted software update can usually easily be continued, a running server can
easily be restarted. Text editors save the file into a temporary one when the terminal
disappears. Terminal-based apps are well prepared for the terminal disappearing, because
an ssh connection can break at any time.
Ok so that is the point ! How "bad" it is to wildly close a terminal ? And consequently what should be the default.
Let's make a quick poll:
:+1: --> I don't care accidentally loosing a terminal, please make OK the default action when closing a terminal
:-1: --> it would be a mess to accidentally loose a terminal, just leave Cancel as the default action
(on the initial post, please)
Thanks all for your feedback and positive discussion.
btw. just to mention it: when closing asbru. The dialog shown has got exactly the same behaviour. Doesn't matter if any connections or tabs are open or not. I don't know if there are any more dialogs. But I guess it would be good if they all behave similarly
From my previous comment and #606
Never the less, I do not like to be asked at all, when closing a terminal.
Apparently I'm not the only one with that feeling, that we do not want to be protected when closing a terminal.
@gfrenoy, so we would like to put this into your consideration too. Option to disable the warning.
Not a huge amount of votes but anyway, if we have some smart options ; I guess we can indeed have this right for all. But we probably need to think more globally on those "UX" questions...
1) Default button when closing a terminal --> let's change this to OK (this is done for 6.2)
2) Have option to close terminal without warning --> we might want to review "Preferences > Terminal Options" and do it with sections "At start" / "At exit" like it exists for "Preferences > Main Options" ? And we re-group there some already existing options ?
Have option to close terminal without warning
I think that is a "Terminal" option and should fit better here

Together with : "Close on disconnect", above or below, the same to me.
I think that is a "Terminal" option and should fit better here
Yes, that's what I was _trying_ to say (sorry if I did not make myself clear).
But I was thinking we can arrange the options in that screen with the same columns "At start" / "At exist" as we have in the other screen...?
we can arrange the options in that screen with the same columns
We would have to rewrite those label to some decent length.
Maybe removing the double explanation and pass that to tooltips
"Close terminal on disconnect" ( move to tooltip --> "close container TAB or Window when connection is closed")
The same for split , unsplit.
removing the double explanation and pass that to tooltips
Yes, definitely :)
actually that works now :-) at least with 6.2.1. so I guess we could close it. or is there any reason to leave the ticket open?
The initial request has been indeed fulfilled; we had other ideas along the way but we should probably leave this for later / another specific issue if requested. Thanks for the heads-up.
Most helpful comment
Ok so that is the point ! How "bad" it is to wildly close a terminal ? And consequently what should be the default.
Let's make a quick poll:
:+1: --> I don't care accidentally loosing a terminal, please make OK the default action when closing a terminal
:-1: --> it would be a mess to accidentally loose a terminal, just leave Cancel as the default action
(on the initial post, please)
Thanks all for your feedback and positive discussion.