Bug 304816 - Dolphin should warn the user before closing if there's a process (program, script) running in built-in shell
Summary: Dolphin should warn the user before closing if there's a process (program, sc...
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: panels: terminal (show other bugs)
Version: 2.1
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2012-08-08 19:29 UTC by titombitel
Modified: 2024-03-08 09:05 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 19.04.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description titombitel 2012-08-08 19:29:04 UTC
Some users (like me) often run their programs from built-in shell to see stderr error messages. Unfortunately, the program run from shell is a child of konsole, that is a child of dolphin. Closing Dolphin kills the program.
This affects KWrite but for some reason it doesn't touch Kaffeine. So for some reason not even all Qt4 apps are affected.

Simple solution:
Dolphin should at least warn the user that closing it will cause his program to get killed.

Solution from my dreams:
Konsole with the program run from it should still be running as children of kdeinit4, with no dolphin above. Dolphin should close normally. Konsole should get a new window. I have nice dreams, huh? :D

Reproducible: Always

Steps to Reproduce:
1. Open Dolphin
2. Summon the shell (F4)
3. Run something like glxgears
4. Close Dolphin.
Actual Results:  
The program gets killed.

Expected Results:  
It should be still running.

Configuration shouldn't matter.
Comment 1 Frank Reininghaus 2012-08-09 10:27:34 UTC
Thanks for the report!

I agree that some kind of warning might be nice, but please note that not even Konsole warns when closing it and indirectly killing its child processes. Moreover, I think that this is far from easy to implement. I consider this a feature request and not a bug.
Comment 2 titombitel 2012-08-09 19:29:55 UTC
You're completely right, thanks for fast response.
But users are not used to get their program killed when they close file manager. That's kind of trap.

Another idea: Warn the user when he opens (not closes) built-in shell that closing Dolphin will cause the shell job to be terminated and include "Don't show it again" checkbox. That would be rather easy.

However, I didn't emphasize it: some programs like Kaffeine don't suffer from this "trap".
Comment 3 Frank Reininghaus 2012-08-09 21:10:51 UTC
(In reply to comment #2)
> You're completely right, thanks for fast response.
> But users are not used to get their program killed when they close file
> manager. That's kind of trap.
> 
> Another idea: Warn the user when he opens (not closes) built-in shell that
> closing Dolphin will cause the shell job to be terminated and include "Don't
> show it again" checkbox. That would be rather easy.

Yes, but it would annoy many users. Of course, the unexpected closing of apps is also an annoyance, but I think we did not get any bug reports about that before, and the issue has been around for many years. Therefore, I think that the benefit of having such a warning would not outweigh the negative effects of the annoying warning. But I'm not 100% sure, maybe I'm wrong after all.

> However, I didn't emphasize it: some programs like Kaffeine don't suffer
> from this "trap".

It could be that the Kaffeine process which is run in the shell starts the process which actually runs the app indirectly, such that this one is not affected by killing the terminal.
Comment 4 Jeroen van Meeuwen (Kolab Systems) 2012-08-24 16:21:28 UTC
Resetting assignee to default as per bug #305719
Comment 5 Nate Graham 2018-03-15 03:12:19 UTC
There's a patch for this: https://phabricator.kde.org/D10960
Comment 6 Nate Graham 2019-01-19 15:15:26 UTC
Git commit 2100a7a5c85931d46b72d391faa3d136d4401010 by Nate Graham.
Committed on 19/01/2019 at 15:15.
Pushed by ngraham into branch 'master'.

Ask for confirmation when Closing Dolphin windows with a terminal panel running a program

Summary:
Ask for confirmation when Closing Dolphin windows with a terminal panel running a program.
FIXED-IN: 19.04.0

Test Plan:
# Open terminal panel
# Run `watch ls`
# Close Dolphin
# Observe confirmation
# Disable confirmation
# Repeat, observe no confirmation
# Enable confirmation in the settings
# Repeat, observe a confirmation

Reviewers: #dolphin, markg, elvisangelaccio, rominf

Reviewed By: #dolphin, elvisangelaccio

Subscribers: kfm-devel, elvisangelaccio, markg, ngraham, rkflx, broulik, #dolphin

Tags: #dolphin

Differential Revision: https://phabricator.kde.org/D10960

M  +53   -1    src/dolphinmainwindow.cpp
M  +13   -3    src/panels/terminal/terminalpanel.cpp
M  +3    -1    src/panels/terminal/terminalpanel.h
M  +4    -0    src/settings/dolphin_generalsettings.kcfg
M  +28   -0    src/settings/general/confirmationssettingspage.cpp
M  +5    -0    src/settings/general/confirmationssettingspage.h

https://commits.kde.org/dolphin/2100a7a5c85931d46b72d391faa3d136d4401010