2

PROBLEM

Hi, I'm trying to make a .desktop entry for jetbrains toolbox (a program), because for some reason, the desktop entry they included isn't showing the icon on my system (popOS 22.04, a Ubuntu fork).

Here are the file contents in ~/.local/share/applications/jetbrains-toolbox.desktop, and it's permissions are -rwxrw-r--.

I also know using apostrophes in file paths in generally bad. It's an old file path, I have references to it elsewhere, and I don't care to change it because it's working fine.

[Desktop Entry]
Icon=/home/me/OS's and other progs/Jetbrains - PyCharm, etc/jetbrains-toolbox-2.8.0.51430/bin/toolbox.svg
Exec=/home/me/OS's and other progs/Jetbrains - PyCharm, etc/jetbrains-toolbox-2.8.0.51430/bin/jetbrains-toolbox %u
Version=1.0
Type=Application
Categories=Development
Name=JetBrains Toolbox
StartupWMClass=jetbrains-toolbox
Terminal=false
MimeType=x-scheme-handler/jetbrains;
X-GNOME-Autostart-enabled=true
StartupNotify=false
X-GNOME-Autostart-Delay=10
X-MATE-Autostart-Delay=10
X-KDE-autostart-after=panel

WHAT I TRIED

The only way I can get the icon to show is by adding double quotes to the Exec entry. Like so:

Exec="/home/me/OS's and other progs/Jetbrains - PyCharm, etc/jetbrains-toolbox-2.8.0.51430/bin/jetbrains-toolbox" %u

But the problem is that once I do that > Click the icon to open it > do my stuff > close it again... For some reason it rewrites the file and deletes the double quotes from the Exec entry, and then I have to do it all over again, or run the program directly from the terminal via ~/path/to/jetbrains-toolbox, which gets annoying.

I also read the docs for desktop entry keys, and for the Exec variables like %u, and a number of other guides on this site and off, like this one, and this one too.

I also made some other test desktop entries with the same code above but with no double quotes, but using my own and the same toolbox.svg image in other folders for the Icon entry, but with a different Exec entry such as /usr/bin/gedit, and it opened gedit every time. So the problem is obviously the Exec line, but my double quotes keep getting overwritten.

I even chmod 777 jetbrains-toolbox.desktop, and even that wouldn't work.

I also asked Jetbrains about this like a week ago. No response yet.

And nothing I tried is fixing the problem.

QUESTION

What can I do to stop it from overriding my double quotes, or do you have a better idea on making the program run without me having to do the above stuff again and again??

1
  • Did you ever hear back from JetBrains? My reason for wanting to edit the desktop files is for setting StartupNotify=true to get the loading ui over the icon in the task manager. The problem I'm running into is that on recent versions of KDE Plasma, the icon path needs to be specified without the extension for svg files otherwise it will display a "?" icon during the application loading phase. It seems on each launch of the JetBrains Toolbox app it overwrites certain fields / lines in the desktop file including Icon, but it leaves others like 'StartupNotify` and NoDisplay alone. Commented Dec 5, 2025 at 3:50

1 Answer 1

2

But the problem is that once I do that > Click the icon to open it > do my stuff > close it again... For some reason it rewrites the file and deletes the double quotes from the Exec entry

JetBrains likely tries to re-install its own .desktop file every time you open it, and since its .desktop generating code hasn't been written to properly handle paths with spaces (and/or single quotes), it probably thinks that your fixed version is actually incorrect and replaces it with its "correct" version. It seems like a bug they need to fix.

I even chmod 777 jetbrains-toolbox.desktop, and even that wouldn't work.

Not sure why you expect it to work; if anything it sets the opposite permissions than the ones which might work. You want to remove 'write' permissions from everyone including yourself, but 777 does the opposite and grants every possible permission to everyone.

(That is, 777 converted from octal to binary is 111 111 111, which means rwx rwx rwx. In chmod symbolic notation it does ugo=rwx.)

Instead:

  • Try chmod a-w or chmod a=r (rx if you want) or chmod 444 (4oct=100bin=r--). This will prevent direct overwrite, but will not prevent delete-and-replace.

  • If that doesn't help, you can sudo chattr +i to glue the file in place. It will become completely read-only (immutable) until root does a chattr -i again.

  • If your distribution supports it, an AppArmor policy could be written specifically for the jetbrains-toolbox executable to prevent it from touching a specific file while other tools still can, although "allow any other action" is not very straightforward in AppArmor.

  • Finally you could create a differently named file, e.g. jetbrains-toolbox-fixed.desktop, with a distinct icon and name.

2
  • You were right. The easiest and fastest way was to make a jetbrains-toolbox-fixed.desktop, add my double quotes back in, and it works fine. I haven't tried chmod 555 or similar yet, but good call anyway. Thanks! Commented Sep 25, 2025 at 15:13
  • I tried modifying permissions and also sudo chattr but it prevents the app from launching: ``` ERROR main Toolbox_servicesKt Failed to perform startup tasks: java.io.FileNotFoundException: /home/user/. local/share/applications/jetbrains-toolbox.desktop (Operation not permitted) at ... ``` So it seems to run the desktop file generation on each launch and overwrites certain fields. The workaround to create a separate desktop file works and I've added NoDisplay=true to the generated desktop files to prevent duplicate application entries in menus. Commented Dec 5, 2025 at 4:02

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.