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

contrib/syntax: firejail-profile.lang causes Gnome Editor to recognize every plain text document as "Firejail Profile" #6057

Closed
3 of 7 tasks
mammo0 opened this issue Oct 20, 2023 · 3 comments · Fixed by #6059
Labels
bug Something isn't working

Comments

@mammo0
Copy link
Contributor

mammo0 commented Oct 20, 2023

Description

The firejail installation also adds a language definition file in /usr/share/gtksourceview-5/language-specs/firejail-profile.lang (path on Arch Linux).
The mimetypes property contains the section text/plain. This causes for example the Gnome Editor to recognize every simple text file as a firejail profile file. See this issue: https://gitlab.gnome.org/GNOME/gnome-text-editor/-/issues/612

If I change the property line to

<property name="mimetypes">text/x-firejail-profile</property>

everything works as expected.

Steps to Reproduce

Steps to reproduce the behavior

  1. Install firejail
  2. Open Gnome Editor
  3. type asdf and hit enter

Expected behavior

This should not change the default document type.

Actual behavior

Document type gets set to "Firejail Profile", which makes the text light up as syntax errors.

Behavior without a profile

N/A

Additional context

N/A

Environment

  • Linux distribution and version: "Arch Linux"
  • Firejail version: 0.9.72

Checklist

  • The issues is caused by firejail (i.e. running the program by path (e.g. /usr/bin/vlc) "fixes" it).
  • I can reproduce the issue without custom modifications (e.g. globals.local).
  • The program has a profile. (If not, request one in https://github.com/netblue30/firejail/issues/1139)
  • The profile (and redirect profile if exists) hasn't already been fixed upstream.
  • I have performed a short search for similar issues (to avoid opening a duplicate).
    • I'm aware of browser-allow-drm yes/browser-disable-u2f no in firejail.config to allow DRM/U2F in browsers.
  • I used --profile=PROFILENAME to set the right profile. (Only relevant for AppImages)

Log

N/A

@rusty-snake
Copy link
Collaborator

rusty-snake commented Oct 20, 2023

PR welcome ;)

@mammo0
Copy link
Contributor Author

mammo0 commented Oct 21, 2023

@rusty-snake done :)

@kmk3 kmk3 changed the title current firejail-profile.lang causes Gnome Editor to recognize every plain text document as "Firejail Profile" firejail-profile.lang causes Gnome Editor to recognize every plain text document as "Firejail Profile" Oct 21, 2023
@kmk3 kmk3 added the bug Something isn't working label Oct 22, 2023
@kmk3 kmk3 changed the title firejail-profile.lang causes Gnome Editor to recognize every plain text document as "Firejail Profile" contrib/syntax: firejail-profile.lang causes Gnome Editor to recognize every plain text document as "Firejail Profile" Oct 22, 2023
glitsj16 pushed a commit that referenced this issue Oct 22, 2023
)

The `mimetypes` property contains the section `text/plain`. This causes
for example the Gnome Editor to recognize every simple text file as a
firejail profile file. See this issue:
https://gitlab.gnome.org/GNOME/gnome-text-editor/-/issues/612

Fixes #6057.
@github-project-automation github-project-automation bot moved this to Done (on RELNOTES) in Release 0.9.74 Aug 28, 2024
@bjesus
Copy link

bjesus commented Dec 9, 2024

If anyone is still facing this issue and is confused why — it's because Firejail didn't have a release since Jan 2023.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done (on RELNOTES)
Development

Successfully merging a pull request may close this issue.

4 participants