I have no idea. There's no reason that "sudo" should be required. But the
revised code is just now in the devel branch. It should recognize and use
konsole without a need to specify it in the @data node. Please try it out.
I tested it myself with my own single-line Python script and it worked:
print('This is a test')
You might get that output from running a script with a shebang line, if
that script didn't have execute permissions. But the command's code
inserts Python into the command line so that shouldn't be an issue.
I tested the new code on OpenSUSE/KDE, which uses konsole, and
EndeavourOS/Cinnamon, which uses gnome-terminal.
On Tuesday, October 15, 2024 at 4:44:07 AM UTC-4 lewis wrote:
> Thomas, thanks for the update. I'm running build c22c944ab2
> Konsole is not working currently, so I updated Node @data
> run-external-processor-map in myLeoSettings.leo to specify qterminal :
>
>
>
> *# Optionally specify a Linux terminal (e.g., konsole) on the# line after
> the "TERMINAL" line.TERMINAL*
> *qterminal*
>
>
> When I run execute-external-file command it opens a qterminal with tab
> named "Shell No. 1" and a single line:
> /usr/bin/bash: line 1: /home/lewisneal/test_leo.py: Permission denied
>
> Any idea why the Permission denied message occurs?
>
> Lewis
>
> On Sunday, October 13, 2024 at 12:57:41 PM UTC+11 [email protected] wrote:
>
>> It's a definite bug. I don't know where my mind was when I wrote that
>> bit of code, because it can't work. I probably changed the design of the
>> @data node but forgot to follow up in the code. I'll file an issue and get
>> out a PR.
>>
>> On Saturday, October 12, 2024 at 8:12:50 AM UTC-4 Thomas Passin wrote:
>>
>>> By coincidence, I'm in the middle of working on the command. I'll try
>>> to see what's going on there. In the meantime, I *think* that the command
>>> will pick up konsole without you having to list it. I do have an Open-SUSE
>>> VM (not on wsl) but I added Cinnamon to it and IIRC the command finds
>>> gnome-terminal first before konsole. I'll get back here with what I find
>>> out. What kind of program are you trying to run? If it's a Python program
>>> you won't need to put anything into the @data node..
>>>
>>> On Saturday, October 12, 2024 at 4:17:32 AM UTC-4 lewis wrote:
>>>
>>>> I have been setting up to use the "execute-external-file" command for
>>>> #4091.
>>>> Node @data run-external-processor-map is in myLeoSettings.leo and
>>>> includes these lines:
>>>>
>>>>
>>>>
>>>> *# Optionally specify a Linux terminal (e.g., konsole) on the# line
>>>> after the "TERMINAL" line.TERMINALkonsole*
>>>>
>>>> Running wsl openSUSE-Tumbleweed
>>>>
>>>>
>>>> *Leo 6.8.2-devel, devel branch, build 92e7ab6e802024-10-12 02:01:07
>>>> -0500Python 3.12.7, PyQt version 6.7.3*
>>>>
>>>> Konsole is installed.
>>>>
>>>> When I run *execute-external-file* command I get error:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> *Traceback (most recent call last): File
>>>> "/home/lewisneal/leo-editor/leo/core/leoGlobals.py", line 318, in
>>>> new_cmd_wrapperfunc(self, event=event) File
>>>> "/home/lewisneal/leo-editor/leo/core/leoCommands.py", line 1072, in
>>>> execute_external_fileprocessor_map, extension_map, terminal =
>>>> get_external_maps()^^^^^^^^^^^^^^^^^^^ File
>>>> "/home/lewisneal/leo-editor/leo/core/leoCommands.py", line 849, in
>>>> get_external_mapsprocessor_map =
>>>> scan_map('PROCESSORS')^^^^^^^^^^^^^^^^^^^^^^ File
>>>> "/home/lewisneal/leo-editor/leo/core/leoCommands.py", line 837, in
>>>> scan_mapval = keyval[1].strip()~~~~~~^^^IndexError: list index out of
>>>> range*
>>>>
>>>>
>>>>
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/leo-editor/9c6bfa8b-5930-4dbf-8190-1fe7d3a9dfden%40googlegroups.com.