VSCodium / vscodium

binary releases of VS Code without MS branding/telemetry/licensing
https://vscodium.com
MIT License
25.63k stars 1.12k forks source link

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

Open hcsch opened 1 year ago

hcsch commented 1 year ago

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

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

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](https://user-images.githubusercontent.com/34245439/219902136-0e6409f7-cf79-45e3-a013-803d0b26eb1d.png) ![screenshot of active window icon in dash with name shown](https://user-images.githubusercontent.com/34245439/219902137-91e75339-cfcf-4a16-a996-f19e3716ff1f.png) ![Screenshot of active window icon menu in dash missing "pin to dash"](https://user-images.githubusercontent.com/34245439/219902139-8d1e961d-054a-428c-a839-bcc485e22596.png)

Desktop (please complete the following information):

sambilbow commented 1 year ago

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
hcsch commented 1 year ago

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.

github-actions[bot] commented 1 year ago

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!

bbhtt commented 1 year ago

still an issue, I think

github-actions[bot] commented 8 months ago

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!

zincentimeter commented 8 months ago

I also observed this on vscode with wayland.

github-actions[bot] commented 2 months ago

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!

vec715 commented 2 months ago

any updates? Still actual meh

Luflosi commented 1 week ago

This should be fixed in https://github.com/microsoft/vscode/pull/231472. I believe version 1.95.0 includes this fix.