Open poon64 opened 1 month ago
Thonny has knowledge about most common terminal programs, so that it can open it with correct environment, working directory etc.
Can you tell me more about /usr/bin/gnome-terminal.wrapper
-- is it similar to another termina in terms of its command line switches and capabilities? You can investigate https://github.com/thonny/thonny/blob/master/thonny/terminal.py to learn, which kind of details Thonny needs to take care of to support a terminal program on Linux.
@aivarannamaa @poon64 Snaps are sand-boxed & hence can not use system terminal, to get thonny to use system shell some terminator emulator will have to be shipped in the snap itself (Not ideal in any case).
The better option for thonny is to detect weather the host is snap by getting the base OS as Ubuntu core
and adding some sort of if
clause to produce better error message like for e.g. 'This option is not supported within snap sandbox'
Edit: I believe the exception can start from here. https://github.com/thonny/thonny/blob/ffc883341dd646452446af9d3556033071affd88/thonny/terminal.py#L18
import distro
os=distro.name()
if os=='Ubuntu Core':
print('This option is not supported within snap sandbox')
else:
...
I get the error below when I try to open the system shell in Ubuntu 24.04 and Thonny 4.1.4. I'm using /usr/bin/gnome-terminal.wrapper as terminal