linuxmint / cinnamon

A Linux desktop featuring a traditional layout, built from modern technology and introducing brand new innovative features.
GNU General Public License v2.0
4.48k stars 730 forks source link

Main menu ignores firejail #12325

Open dmitryvakulenko opened 1 month ago

dmitryvakulenko commented 1 month ago

Distribution

Mint 22

Package version

6.2.7+wilma

Graphics hardware in use

No response

Frequency

Always

Bug description

I try to make Telegram launches inside firejail. But Cinnamon ignores any changes inside a Telegram.desktop or with the menu editor. It always launches itself.

Steps to reproduce

  1. Open main menu editor
  2. Select Telegram item
  3. Click on a "Properties" button.
  4. Prepend 'firejail' into command text field
  5. Launch Telegram

OR

  1. Open main menu editor
  2. Select Telegram item
  3. Click on a "Edit desktop file" button.
  4. Prepend 'firejail' to a 'Exec' property to make like this 'Exec=firejail /opt/Telegram/Telegram -- %u'
  5. Launch Telegram

Expected behavior

Telegram launches inside firejail. Command ps -ax contains 'firejail /opt/Telegram/Telegram' or firejail --list output is not empty.

Additional information

I have no idea how can it be. I tried to use update-desktop-database, edited .desktop without menu editor - directly in ./.local/share/applications, wrote full path to firejail - nothing helped. I'm not sure is this Cinnamon issue but I don't know how to investigate this trouble more.

Thank you.

dmitryvakulenko commented 1 month ago

I made some investigation and find out this

  1. On my laptop (with the same Mint version) I have a file "~/.local/share/applications/userapp-Telegram Desktop-U4Z9P1.desktop" and everything works as expected. Telegram start in firejail. But this file doesn't contain Categories key. Despite this this item is shown in the main menu and exactly this file is opened on click "Edit Desktop file" button.
  2. On my desktop I got a file "~/.local/share/applications/org.telegram.desktop._3e485da34fc040f9218e3891ecde1e6c.desktop". It's longer then the laptop file, but adding 'firejail' in it do nothing. Telegram start themself and rewrite this file to a standard version.
  3. I remove the file from the desktop and add the file from the laptop. As a result Telegram is disappeared from the main menu. But why it works on the laptop??
  4. I remove both files from the desktop and create a new one through a cinnamon-menu-editor. It made a 'alacarte-made-' prefixed file and it works like expected - Telegram starts inside firejail.

Can somebody explain me this behavior? Everything works now but it looks strange.

dmitryvakulenko commented 1 month ago

Attach both .desktop files desktops.zip