[GH-ISSUE #6865] firecfg: telegram-desktop desktop file valid but described as 'not a .desktop file' #3402

Closed
opened 2026-05-05 09:58:02 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @tht2005 on GitHub (Aug 17, 2025).
Original GitHub issue: https://github.com/netblue30/firejail/issues/6865

Description

Telegram-desktop's desktop file execute /usr/bin/telegram-desktop and i want to use firecfg --fix to create another desktop file. But firecfg --fix command output

Looking for config files in /etc/firejail/firecfg.d/*.conf
Parsing /etc/firejail/firecfg.d/local.conf

Parsing /etc/firejail/firecfg.config


Fixing desktop files in /home/tomoshibi/.local/share/applications
   mimeinfo.cache skipped (not a .desktop file)
   discord.desktop skipped: file exists
   steam.desktop skipped: file exists
   org.gnome.seahorse.Application.desktop skipped: file exists
   vlc.desktop skipped: file exists
   org.telegram.desktop.desktop skipped (not a .desktop file)

Although it's a valid desktop file

$ cat /usr/share/applications/org.telegram.desktop.desktop 
[Desktop Entry]
Name=Telegram
Comment=New era of messaging
TryExec=/usr/bin/telegram-desktop
Exec=/usr/bin/telegram-desktop -- %u
Icon=org.telegram.desktop
Terminal=false
StartupWMClass=TelegramDesktop
Type=Application
Categories=Chat;Network;InstantMessaging;Qt;
MimeType=x-scheme-handler/tg;x-scheme-handler/tonsite;
Keywords=tg;chat;im;messaging;messenger;sms;tdesktop;
Actions=quit;
DBusActivatable=true
SingleMainWindow=true
X-GNOME-UsesNotifications=true
X-GNOME-SingleWindow=true

[Desktop Action quit]
Exec=/usr/bin/telegram-desktop -quit
Name=Quit Telegram
Icon=application-exit

Steps to Reproduce

  1. Install telegram.
  2. Run firecfg --fix.

Expected behavior

It should install another desktop file in .local to launch firejail.

Actual behavior

Skip because the desktop file "is not valid".

Originally created by @tht2005 on GitHub (Aug 17, 2025). Original GitHub issue: https://github.com/netblue30/firejail/issues/6865 ### Description Telegram-desktop's desktop file execute /usr/bin/telegram-desktop and i want to use `firecfg --fix` to create another desktop file. But `firecfg --fix` command output ``` Looking for config files in /etc/firejail/firecfg.d/*.conf Parsing /etc/firejail/firecfg.d/local.conf Parsing /etc/firejail/firecfg.config Fixing desktop files in /home/tomoshibi/.local/share/applications mimeinfo.cache skipped (not a .desktop file) discord.desktop skipped: file exists steam.desktop skipped: file exists org.gnome.seahorse.Application.desktop skipped: file exists vlc.desktop skipped: file exists org.telegram.desktop.desktop skipped (not a .desktop file) ``` Although it's a valid desktop file ```bash $ cat /usr/share/applications/org.telegram.desktop.desktop [Desktop Entry] Name=Telegram Comment=New era of messaging TryExec=/usr/bin/telegram-desktop Exec=/usr/bin/telegram-desktop -- %u Icon=org.telegram.desktop Terminal=false StartupWMClass=TelegramDesktop Type=Application Categories=Chat;Network;InstantMessaging;Qt; MimeType=x-scheme-handler/tg;x-scheme-handler/tonsite; Keywords=tg;chat;im;messaging;messenger;sms;tdesktop; Actions=quit; DBusActivatable=true SingleMainWindow=true X-GNOME-UsesNotifications=true X-GNOME-SingleWindow=true [Desktop Action quit] Exec=/usr/bin/telegram-desktop -quit Name=Quit Telegram Icon=application-exit ``` ### Steps to Reproduce 1. Install telegram. 2. Run `firecfg --fix`. ### Expected behavior It should install another desktop file in `.local` to launch firejail. ### Actual behavior Skip because the desktop file "is not valid".
gitea-mirror 2026-05-05 09:58:02 -06:00
Author
Owner

@rusty-snake commented on GitHub (Aug 19, 2025):

The substring .desktop is found before the end: org.telegram.desktop.desktop

6228f71ad5/src/firecfg/desktop_files.c (L189-L194)

<!-- gh-comment-id:3199366878 --> @rusty-snake commented on GitHub (Aug 19, 2025): The substring `.desktop` is found before the end: <code>org.telegram<em>.desktop</em>.desktop</code> https://github.com/netblue30/firejail/blob/6228f71ad52291db7f732ceec80c227b1f6335f4/src/firecfg/desktop_files.c#L189-L194
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#3402
No description provided.