[prev in list] [next in list] [prev in thread] [next in thread]
List: kfm-devel
Subject: Re: Review Request: Add the possibility of "run scripts in konsole" when using dolphin
From: "Jekyll Wu" <adaptee () gmail ! com>
Date: 2012-11-11 7:50:24
Message-ID: 20121111075024.27221.31591 () vidsolbach ! de
[Download RAW message or body]
> On Nov. 10, 2012, 11:03 p.m., David Faure wrote:
> > About bug 275405: I just posted a patch there, can you try it?
> >
> > > Does it make sense to provide that workaround for binary executable? It is of \
> > > course valid, but might be seen as overkill and strange in practice.
> >
> > As long as it's "opt in", i.e. people need to choose this menuitem explicitely, I \
> > like having it for all types of executables. Someone who wants to see the debug \
> > output of a GUI app will be able to do it that way, instead of launching a \
> > terminal first and then the app from there, so this sounds useful.
> > > * Is there something called application/x-executablescript, that falls between \
> > > the range of x-executable and x-shellscripts ?
> >
> > No, the freedesktop spec uses multiple inheritance (from x-executable and \
> > text/plain) to represent scripts. But that's hard to specify in a MimeType= \
> > field, no support for predicates there :-)
> > > * Should application/x-desktop be also added into "MimeType"?
> >
> > Can't hurt; same reasoning as for the first question.
> >
> > As to application desktop file or servicemenu... if we decide this only makes \
> > sense inside dolphin/konqueror, then it's a servicemenu. If we want to let people \
> > associate other mimetypes with it externally, then it could be a hidden \
> > application. I guess one could try if the application desktop file allows to make \
> > this work inside folderview too, for instance...
> About bug 275405: I just posted a patch there, can you try it?
I have tried it. Now if I disable "left click executes scripts..." and choose \
run-in-konsole.desktop as the preferred application for shell scirpts, cliking a \
script will invoke konsole and run that script within it. A little couter-intuitive, \
but frankly that is what I really want. :)
> As long as it's "opt in", i.e. people need to choose this menuitem explicitely, I \
> like having it for all types of executables.
OK, I will use x-executable instead.
> Can't hurt; same reasoning as for the first question.
Actually, after thinking it again, I think x-desktop is now not suitable for \
inclusion. Those .dekstop files are not natively executable, so they are (ATM) not \
directly usable for an emulator. I will consider whether it makes sense to support \
"konsole -e /path/to/some/app.desktop" .
> On Nov. 10, 2012, 11:03 p.m., David Faure wrote:
> > desktop/run-in-konsole.desktop, line 3
> > <http://git.reviewboard.kde.org/r/107086/diff/2/?file=93060#file93060line3>
> >
> > Unnecessary field
will remove
> On Nov. 10, 2012, 11:03 p.m., David Faure wrote:
> > desktop/run-in-konsole.desktop, line 8
> > <http://git.reviewboard.kde.org/r/107086/diff/2/?file=93060#file93060line8>
> >
> > That's the default, so this line is unnecessary.
> >
> > However I suppose you tried Terminal=true instead of Exec=konsole --hold -e %f? \
> > It's supposed to do the same (but uses the user's configured terminal emulator). \
> > Doesn't that work?
> > Of course it would mean changing the Name from "Run In Konsole" to "Run in \
> > terminal window" (to match the label of the checkbox in krunner).
Will remove that line.
I didn't really try "Terminal=true". I added it because I thought that expressed a \
strong message explicitly : this one don't and shouldn't require a emulator, because \
itself is.
I'm not sure I understand that using "Terminal=true" instead of "Exec=...." . Konsole \
is an emulator which can be invoked to provide the running environment for \
applications having "Terminal=true" in their .desktop files. What is the semantic for \
konsole ( an emulator) to require an emulator ? And in practice, that doesn't seem to \
work.
It would be great if this "run script" ability can apply to the users' preferred \
emulator, instead of only for konsole. But I don't think that can be solved by only \
providing a .desktop file.
- Jekyll
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/107086/#review21786
-----------------------------------------------------------
On Oct. 31, 2012, 12:45 p.m., Jekyll Wu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/107086/
> -----------------------------------------------------------
>
> (Updated Oct. 31, 2012, 12:45 p.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 :)
>
>
> Known issue:
>
> using application/x-shellscript means this workaround only applies to shell \
> scripts, so it does not provide help for perl/python scripts. But using \
> applicaiton/x-executable means it will also apply to binary executables. So :
> * Does it make sense to provide that workaround for binary executable? It is of \
> course valid, but might be seen as overkill and strange in practice.
> * Is there something called application/x-executablescript, that falls between the \
> range of x-executable and x-shellscripts ?
> * Should application/x-desktop be also added into "MimeType"?
>
>
> As you see, this patch in the current form is still a rough idea.
>
>
> 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
>
>
[Attachment #3 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/107086/">http://git.reviewboard.kde.org/r/107086/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <p style="margin-top: 0;">On November 10th, 2012, 11:03 p.m., <b>David \
Faure</b> wrote:</p> <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;"> <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">About bug 275405: I just posted a patch there, can you try it?
> Does it make sense to provide that workaround for binary executable? It is of \
course valid, but might be seen as overkill and strange in practice.
As long as it's "opt in", i.e. people need to choose this menuitem \
explicitely, I like having it for all types of executables. Someone who wants to see \
the debug output of a GUI app will be able to do it that way, instead of launching a \
terminal first and then the app from there, so this sounds useful.
> * Is there something called application/x-executablescript, that falls between \
the range of x-executable and x-shellscripts ?
No, the freedesktop spec uses multiple inheritance (from x-executable and text/plain) \
to represent scripts. But that's hard to specify in a MimeType= field, no support \
for predicates there :-)
> * Should application/x-desktop be also added into "MimeType"?
Can't hurt; same reasoning as for the first question.
As to application desktop file or servicemenu... if we decide this only makes sense \
inside dolphin/konqueror, then it's a servicemenu. If we want to let people \
associate other mimetypes with it externally, then it could be a hidden application. \
I guess one could try if the application desktop file allows to make this work inside \
folderview too, for instance...</pre> </blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">> About bug 275405: I \
just posted a patch there, can you try it?
I have tried it. Now if I disable "left click executes scripts..." and \
choose run-in-konsole.desktop as the preferred application for shell scirpts, cliking \
a script will invoke konsole and run that script within it. A little \
couter-intuitive, but frankly that is what I really want. :)
> As long as it's "opt in", i.e. people need to choose this menuitem \
explicitely, I like having it for all types of executables.
OK, I will use x-executable instead.
> Can't hurt; same reasoning as for the first question.
Actually, after thinking it again, I think x-desktop is now not suitable for \
inclusion. Those .dekstop files are not natively executable, so they are (ATM) not \
directly usable for an emulator. I will consider whether it makes sense to support \
"konsole -e /path/to/some/app.desktop" .
</pre>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <p style="margin-top: 0;">On November 10th, 2012, 11:03 p.m., <b>David \
Faure</b> wrote:</p> <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;"> <thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;"> <a \
href="http://git.reviewboard.kde.org/r/107086/diff/2/?file=93060#file93060line3" \
style="color: black; font-weight: bold; text-decoration: \
underline;">desktop/run-in-konsole.desktop</a> <span style="font-weight: normal;">
(Diff revision 2)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
"></pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">3</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
">Version=1.0</pre></td> </tr>
</tbody>
</table>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Unnecessary field</pre> \
</blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">will \
remove</pre> <br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <p style="margin-top: 0;">On November 10th, 2012, 11:03 p.m., <b>David \
Faure</b> wrote:</p> <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;"> <thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;"> <a \
href="http://git.reviewboard.kde.org/r/107086/diff/2/?file=93060#file93060line8" \
style="color: black; font-weight: bold; text-decoration: \
underline;">desktop/run-in-konsole.desktop</a> <span style="font-weight: normal;">
(Diff revision 2)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
"></pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">8</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
">Terminal=false</pre></td> </tr>
</tbody>
</table>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">That's the default, \
so this line is unnecessary.
However I suppose you tried Terminal=true instead of Exec=konsole --hold -e %f? \
It's supposed to do the same (but uses the user's configured terminal \
emulator). Doesn't that work?
Of course it would mean changing the Name from "Run In Konsole" to \
"Run in terminal window" (to match the label of the checkbox in \
krunner).</pre> </blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Will remove \
that line.
I didn't really try "Terminal=true". I added it because I thought that \
expressed a strong message explicitly : this one don't and shouldn't require \
a emulator, because itself is.
I'm not sure I understand that using "Terminal=true" instead of \
"Exec=...." . Konsole is an emulator which can be invoked to provide the \
running environment for applications having "Terminal=true" in their \
.desktop files. What is the semantic for konsole ( an emulator) to require an \
emulator ? And in practice, that doesn't seem to work.
It would be great if this "run script" ability can apply to the users' \
preferred emulator, instead of only for konsole. But I don't think that can be \
solved by only providing a .desktop file.
</pre>
<br />
<p>- Jekyll</p>
<br />
<p>On October 31st, 2012, 12:45 p.m., Jekyll Wu wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for Dolphin, Konsole and David Faure.</div>
<div>By Jekyll Wu.</div>
<p style="color: grey;"><i>Updated Oct. 31, 2012, 12:45 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">@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 :)
Known issue:
using application/x-shellscript means this workaround only applies to shell scripts, \
so it does not provide help for perl/python scripts. But using \
applicaiton/x-executable means it will also apply to binary executables. So :
* Does it make sense to provide that workaround for binary executable? It is of \
course valid, but might be seen as overkill and strange in practice.
* Is there something called application/x-executablescript, that falls between \
the range of x-executable and x-shellscripts ?
* Should application/x-desktop be also added into "MimeType"?
As you see, this patch in the current form is still a rough idea.
</pre>
</td>
</tr>
</table>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="http://bugs.kde.org/show_bug.cgi?id=225563">225563</a>,
<a href="http://bugs.kde.org/show_bug.cgi?id=275405">275405</a>
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>desktop/CMakeLists.txt <span style="color: grey">(0fe39d2)</span></li>
<li>desktop/konsolerun.desktop <span style="color: grey">(PRE-CREATION)</span></li>
<li>desktop/run-in-konsole.desktop <span style="color: \
grey">(PRE-CREATION)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/107086/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic