Review Request: Add the possibility of "run scripts in konsole" when using dolphin

David Faure faure at kde.org
Tue Dec 4 12:52:58 GMT 2012



> On Nov. 12, 2012, 9:32 p.m., David Faure wrote:
> > desktop/run-in-konsole.desktop, line 8
> > <http://git.reviewboard.kde.org/r/107086/diff/2/?file=93060#file93060line8>
> >
> >     I mean:
> >     
> >     Exec=%f
> >     Terminal=true
> >     
> >     This will run %f in a terminal, won't it?
> 
> Jekyll Wu wrote:
>     OK, I see. 
>     
>     I think that should work. But strangely it doesn't work as expected. No matter which emulator(xterm,urxvt,etc) I have chosen as the default emulator, it is always konsole that is started to provide a running environment. "Shift+F4" in dolphin opens the chosen emulator, as expected.
>     
>     
>     And even for that konsole case, it is invoked like "konsole -e /some/script.sh" without the "--hold" option. I think that "--hold" option is very important for the suggested use case. I don't want to the terminal window to suddenly disappear the moment the script finishes its job.
>     
>     
>

Even after restarting KDE (or at least dolphin)? Maybe KRun just didn't reparse the configuration file after you changed the setting.

That code could also add --hold to the command line when the chosen terminal is konsole.
kdelibs/kio/kio/krun.cpp: 501:         QString terminal = cg.readPathEntry("TerminalApplication", "konsole");

The question is whether any user configuring a .desktop file Terminal=true would like the terminal to stay open after the app exits. For scripts yes, for GUI apps, maybe this isn't actually wanted....

Well, if you think that it's not wanted for gui apps, then indeed don't use Terminal=true, but your current patch.


- David


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/107086/#review21892
-----------------------------------------------------------


On Nov. 11, 2012, 7:56 a.m., Jekyll Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/107086/
> -----------------------------------------------------------
> 
> (Updated Nov. 11, 2012, 7:56 a.m.)
> 
> 
> Review request for Dolphin, Konsole and David Faure.
> 
> 
> Description
> -------
> 
> @David, I'd like to know your idea of this workaround, because I think its usefulness will influence or be influenced by how bug 275405 will be finally resolved. 
> 
> 
> The current situation of clicking an executable shell script in dolphin/konqueror:
> 
> 1. It is always executed, instead of being opened by the preferred application according to its mimetype. (bug 275405)
> 
> 2. It is executed in a silent way, without invoking konsole to provide a running environment (bug 225563). That means at least two issues:
> 
>     a). There is no feedback and no easy way for user to know whether that script has been started. He/She need use ps or ksysguard to verify it.
> 
>     b). interactive script just doesn't work.
> 
> 
> This patch *doesn't* really solve any of the above two problems. It just provides the possibility for users to run an executable script in konsole when using dolphin/konqueror.
> 
> It adds two .desktop files: 
> 
>     applications/kde4/run-in-konsole.desktop, which can be used in the "Open with" submenu
>     ServiceMenus/konsolerun.deksotp, which can be used in the "Actions" submenu
> 
> I'm not sure which solution is better, so I just provide both :)
> 
> 
> This addresses bugs 225563 and 275405.
>     http://bugs.kde.org/show_bug.cgi?id=225563
>     http://bugs.kde.org/show_bug.cgi?id=275405
> 
> 
> Diffs
> -----
> 
>   desktop/CMakeLists.txt 0fe39d2 
>   desktop/konsolerun.desktop PRE-CREATION 
>   desktop/run-in-konsole.desktop PRE-CREATION 
> 
> Diff: http://git.reviewboard.kde.org/r/107086/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Jekyll Wu
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20121204/7edc6932/attachment.htm>


More information about the kfm-devel mailing list