Why can't the AUR VS Code window be pinned in the Dash?

aur/visual-studio-code-bin 1.82.3-1

If I run it, and right click its icon in the Dash, I see no “Pin” menu. Why is that?

image

Other apps

image

Hello!
The issue the you are facing, where you cannot pin “VS Code” from AUR to the dash in GNOME, might be related to the desktop environment and file manager settings. Here are some steps you can try to resolve the problem:

  1. Check Dash Favorites:

    • Make sure that the “Visual Studio Code” is not already in the dash favorites. It’s possible that it’s already there, but the user hasn’t noticed.
  2. Create a Desktop Entry:

    • It’s possible that there is no desktop entry created for Visual Studio Code. They can manually create one. To do this, they should create a .desktop file in the appropriate directory. Here’s an example of what the file might look like:
      [Desktop Entry]
      Name=Visual Studio Code
      Exec=/usr/bin/code
      Icon=/path/to/visual-studio-code-icon.png
      Type=Application
      Categories=Development;
      

    Replace /usr/bin/code with the actual path to the VS Code executable and /path/to/visual-studio-code-icon.png with the actual path to the VS Code icon.

  3. Restart GNOME Shell:

    • Sometimes, a simple restart of the GNOME Shell can refresh the dash and make the “Pin” option appear. You can do this by pressing Alt + F2, then entering “r” and pressing Enter.
  4. GNOME Tweaks:

    • Ensure that they have GNOME Tweaks installed. In GNOME Tweaks, they can navigate to the “Extensions” tab and check if there is an extension related to managing dash favorites. You can enable or configure this extension as needed.
  5. File Manager:

    • Ensure that the file manager (Nautilus) is not causing any issues. Sometimes, file manager settings or extensions can affect how icons are managed. Check for any Nautilus extensions or settings that might be interfering with adding icons to the dash.
  6. Check for Updates:

    • Ensure that both GNOME Shell and Visual Studio Code are up to date. Outdated software can sometimes cause unexpected issues.
  7. Permissions:

    • Check the permissions of the Visual Studio Code installation directory and its desktop entry file. Ensure that the user has permission to read and execute these files.
  8. Reset Dash:

    • As a last resort, if none of the above solutions work, you can try resetting the GNOME dash to its default settings. To do this, they can open a terminal and run the following commands:

      dconf reset -f /org/gnome/
      gnome-shell --replace
      

    This will reset the dash and restart the GNOME Shell.

If you continue facing issues after trying these steps, you may want to seek help on the EndeavourOS forum or the Arch Linux community, as it could be a specific issue related to their distribution or desktop environment setup.

1 Like

Can you see the pin option by right clicking VSCode in appmenu?

Yes, but if I pin VS Code like that, clicking it to run it creates a new entry in the Dash.

image

Is there any particular reason you using VS Code from the AUR? Try installing the package code from the repos.

that looks to me like the original app menu entry starts some kind of launcher (that you can pin) which then starts the actual program(that you can’t pin) and quits itself.

that is true. AUR should only be used when the Repo does not contain stuff.

The repository version is something that has removed all Microsoft stuff. I had found that most of the extensions were not available in that version, so I needed the Microsoft VS Code, and the one in the AUR was that.

Did you end up resolving this issue somehow? I’m facing the same with vscode exported from an arch distrobox container now

Yeah… by…
SWITCHING TO PLASMA 6.0.

God no lol. Well I’ll keep looking for a solution then and post it here if I succeed

Okay, solved it. I changed the desktop file:
StartupWMClass=Code to StartupWMClass=code-url-handler
and added --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform=wayland to both exec fields (main one and the new window one) to enable wayland. Not sure enabling wayland is necessary, but I changed the file analogously to how vscodium-bin package formatted theirs. I noticed that while I could pin their wayland windows, I could not the stock one. So I created a wayland option for vscode and it worked too.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.