Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround for Edit Button (Ubuntu/Linux with "Snap") ? #355

Open
janbottger opened this issue Jan 27, 2025 · 11 comments
Open

Workaround for Edit Button (Ubuntu/Linux with "Snap") ? #355

janbottger opened this issue Jan 27, 2025 · 11 comments

Comments

@janbottger
Copy link

The "Edit" button in [Settings] -> [Template Files] does not work for me with Thunderbird 128.6.0esr (64-bit) under Ubuntu/Linux.
extensions.smartTemplate4.fileTemplates.editor.path is set to "/snap/bin/code" (without the quotes). "/snap/bin/code" is the binary of virtual studio code.
The edit button also does not work if I put anything else, e.g. "/usr/bin/codium" - a shell script to start virtual studio codium or "/usr/bin/gnome-text-editor" - the binary of the default text editor.
All editors can be started from the command line and would also take one or more file names as arguments.
Also, I don't get an error message.

@MarkyMarkDE
Copy link
Collaborator

MarkyMarkDE commented Jan 27, 2025

I can confirm that (same on Ubuntu 24.04.1 LTS) and it can be an issue with the permissions or with the missing .exe extension, we must check if it is a solution for Linux Users to use Notepad++ via wine platform.
Not sure if we are able to handle, Thunderbird and Firefox are additionally snap-Versions, this fact can be also a big abstacle.

@MarkyMarkDE MarkyMarkDE self-assigned this Jan 27, 2025
@RealRaven2000
Copy link
Owner

Can you try it out with /usr/bin/gedit ? it worked for me here.

Maybe Visual Studio Code needs to be opened manually first and told to trust the home directory of your templates?

@MarkyMarkDE
Copy link
Collaborator

MarkyMarkDE commented Jan 27, 2025

/usr/bin/gedit

not possible here.

Image

I have various editors here but no one is accessible from ST not in /usr/bin/ nor in /usr/sbin/ and nor in /run/user/1000/ - no chance.
I'm not an expert, but I suspect that we can't access any processes outside of Thunderbird from Thunderbird snap itself, so the wine solution will probably also not work.

@RealRaven2000
Copy link
Owner

/usr/bin/gedit

not possible here.

I would think that you inherit the rights that you start Thunderbird with. I didn't do anything special to start it, but I know very little about user and app permissions within ubuntu... it works in my VM (probably with an older version of Ubuntu). maybe my user has special privileges, I am not sure...

@RealRaven2000
Copy link
Owner

I think you can do

which gedit

to get the full path in linux.

@MarkyMarkDE
Copy link
Collaborator

MarkyMarkDE commented Jan 27, 2025

I think you can do

which gedit

to get the full path in linux.

The path is right, but I or ST can't access

You've already read that I mean the snap variant of Thunderbird and Firefox, which are now the default on Ubuntu? This snap nonsense has completely different rules than "simple" sandboxing, doesn't it?
If I read wiki.ubuntuusers correctly, the snaps are shielded from each other and also from the system. But I'm not an expert either ...

@RealRaven2000
Copy link
Owner

Can i check user or App rights in Ubuntu somehow? I dont think I have the very latest distro, so maybe they changed something in the behavior…

@janbottger
Copy link
Author

Thanks for all the input so far!
This definitively is a problem that came with snap. One cannot simply launch other snaps or non-snap executable from within a contained snap environment.
I see two options:
a) me getting rid of snap and you to announce incompatibility with snap/thunderbird installations
b) if anyone knows how to address another snap or non-snap application in the setting, we document this
c) instead a command-line setting for the editor path, we might have a dialog-based selector for the editor app. This should work with non-snap and snap installations. Snap would use a different method to access other snaps (namely the interface "desktop launch").

All of the options change the issue from a 'bug' to 'documentation' or 'feature request' in my opinion.

@RealRaven2000
Copy link
Owner

You've already read that I mean the snap version of Thunderbird and Firefox, and that they are now the default in Ubuntu? This snap nonsense has completely different rules than "simple" sandboxing, right?
If I read what wiki.ubuntuusers said correctly, the snaps are shielded from each other and from the system. But I'm not an expert either...

I have no idea never heard of snap before to be honest.

c) instead a command-line setting for the editor path, we might have a dialog-based selector for the editor app. This should work with non-snap and snap installations. Snap would use a different method to access other snaps (namely the interface "desktop launch").

we can change this to feature request, but what should the title be, and what exactly can we do seeing that Thunderbird Add-ons should behave platform agnostic? Would it be possible to start some sort of batch script that opens the editor via a message or timeout? there should be some creative method to decouple it from the app. In the meantime, I will change the issue to "question".

@RealRaven2000 RealRaven2000 changed the title Edit Button not working (Ubuntu/Linux) Workaround for Edit Button (Ubuntu/Linux with "Snap") ? Jan 28, 2025
@MarkyMarkDE
Copy link
Collaborator

MarkyMarkDE commented Jan 28, 2025

I have no idea never heard of snap before to be honest.

==> snap (german only)

we can change this to feature request, but what should the title be, and what exactly can we do seeing that Thunderbird Add-ons should behave platform agnostic? Would it be possible to start some sort of batch script that opens the editor via a message or timeout? there should be some creative method to decouple it from the app. In the meantime, I will change the issue to "question".

don't know what we shoud or or what we are able to do, but any solution would be great.

@MarkyMarkDE
Copy link
Collaborator

MarkyMarkDE commented Jan 28, 2025

Can i check user or App rights in Ubuntu somehow? I dont think I have the very latest distro, so maybe they changed something in the behavior…

Do you mean something like that?
==> askubuntu
==> gedit is an example only <==
==> stat /usr/bin/gedit
==> ls -l /usr/bin/gedit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants