vscodium icon indicating copy to clipboard operation
vscodium copied to clipboard

VSCodium starts with wmclass set as `codium-url-handler`

Open hcsch opened this issue 2 years ago • 8 comments

Describe the bug VSCodium starts with its wmclass set to codium-url-handler (as observed with GNOME looking glass). Due to this, the VSCodium windows get the application title "VSCodium - URL Handler" in the GNOME top bar. Additionally, this also causes the windows not to be displayed under the default .desktop file icon in the dash, also preventing "Pin to Dash" when right-clicking the icon of the active windows in the dash. This is due to the windows being associated with the codium-url-handler.desktop file.

microsoft/vscode#129953 is the upstream issue for this, but it seem no progress is being made there. @dr-br mentioned in that issue, that this seems to be due to codium-url-handler.desktop being the desktop file referenced in the desktopName property of app/package.json, as opposed to the codium.desktop file.

Please confirm that this problem is VSCodium-specific

  • [ ] This bug doesn't happen if I use Microsoft's Visual Studio Code. It only happens in VSCodium.

Please confirm that the issue/resolution isn't already documented

  • [x] I checked the Docs page and my issue is not mentioned there.

To Reproduce Steps to reproduce the behavior:

  1. pkill codium to kill all VSCodium windows
  2. Open VSCode via either the VSCodium Shortcut provided by the codium.desktop file, the codium CLI, or the URL launcher with vscode://file/<some-absolute-file-path>
  3. Observe the above mentioned behaviour

Expected behavior wmclass of all VSCodium windows (regardless of the way they were started) is set to codium, so the windows can be correctly associated with the codium.desktop file.

Screenshots

Click to expand (screenshots always take up way to much visual space in GitHub)

screenshot of application title in top bar screenshot of active window icon in dash with name shown Screenshot of active window icon menu in dash missing "pin to dash"

Desktop (please complete the following information):

  • OS: NixOS (version 23.05.20230215.28319de; nixpkgs revision 28319deb5ab05458d9cd5c7d99e1a24ec2e8fc4b)
  • Architecture: x64
  • Version: 1.75.0
  • App Manager: Nix / home-manager
  • Sandboxed: no

hcsch avatar Feb 18 '23 22:02 hcsch

I'm getting around this currently by creating a codium-url-handler.desktop file as per this reply. Mine is customised a bit to run in electron for fractional scaling reasons:

[Desktop Entry]
Name=Codium
Comment=Code Editing. Refind.
GenericName=Text Editor
Exec=/usr/bin/codium --enable-features=UseOzonePlatform --ozone-platform=wayland --no-sandbox --unity-launch %F
Icon=vscodium
Type=Application
StartupNotify=False
StartupWMCClass=codium-url-handler
Categories=Utility;TextEditor;Development;IDE;
Actions=new-empty-window;

[Desktop Action new-empty-window]
Name=New Empty Window
Exec=/usr/bin/codium --no-sandbox --new-window %F

sambilbow avatar Mar 09 '23 10:03 sambilbow

While that should work to fix the window grouping issues, that probably also breaks the URL handler, sadly. Copying codium.desktop to ~/.local/share/applications/ and changing StartupWMClass to codium-url-handler should work as a temporary workaround though, without breaking the URL handler.

hcsch avatar Mar 10 '23 03:03 hcsch

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment, and we'll keep it open. If you have any new additional information, please include it with your comment!

github-actions[bot] avatar Sep 07 '23 01:09 github-actions[bot]

still an issue, I think

bbhtt avatar Sep 07 '23 01:09 bbhtt

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment, and we'll keep it open. If you have any new additional information, please include it with your comment!

github-actions[bot] avatar Mar 07 '24 01:03 github-actions[bot]

I also observed this on vscode with wayland.

zincentimeter avatar Mar 27 '24 13:03 zincentimeter

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment, and we'll keep it open. If you have any new additional information, please include it with your comment!

github-actions[bot] avatar Sep 24 '24 01:09 github-actions[bot]

any updates? Still actual meh

vec715 avatar Sep 24 '24 11:09 vec715