Skip to content

Remove StartupWMClass from URL handler desktop file - #63750

Merged
João Moreno (joaomoreno) merged 1 commit into
microsoft:masterfrom
valenfys:patch-1
Nov 28, 2018
Merged

Remove StartupWMClass from URL handler desktop file#63750
João Moreno (joaomoreno) merged 1 commit into
microsoft:masterfrom
valenfys:patch-1

Conversation

@valenfys

@valenfys Val Enfys (valenfys) commented Nov 25, 2018

Copy link
Copy Markdown
Contributor

Fixes #61989

See also #56727 (comment)

@joaomoreno

Copy link
Copy Markdown
Contributor

Awesome. Does the URL handling still work without issues?

@joaomoreno João Moreno (joaomoreno) added linux Issues with VS Code on Linux workbench-os-integration Native OS integration issues labels Nov 26, 2018
@valenfys

Copy link
Copy Markdown
Contributor Author

João Moreno (@joaomoreno) Yep, works fine! I tested with the URL vscode://file/etc/hosts

@joaomoreno
João Moreno (joaomoreno) merged commit dbb3e0a into microsoft:master Nov 28, 2018
@joaomoreno

Copy link
Copy Markdown
Contributor

Thanks!

@pycontracts

pycontracts commented Jan 16, 2019

Copy link
Copy Markdown

Doesn't work at all, I am still getting getting the second icon on Gentoo, GNOME 3.30, and removed StartupWMClass.

@pycontracts

Copy link
Copy Markdown

Update: I was able to fix the issue by actually ADDING:

StartupWMClass=code

The fix in the commit obviously is a big bummer! Please revise!

@valenfys

Copy link
Copy Markdown
Contributor Author

pycontracts are you sure you're on the latest Code version? I'm also using GNOME 3.30 (and Code 1.30.2 with this fix) so not sure why you'd be experiencing the problem but not me. Can you paste each of your .desktop files for Code?

@saboya

Copy link
Copy Markdown

I have the exact same issue, and adding

StartupWMClass=code

also fixed the issue for me. Also using Gentoo.

@saboya

Copy link
Copy Markdown

Arch users also have the same issue, fixed the same way:

https://aur.archlinux.org/packages/visual-studio-code-bin/

@SvenKayser

Copy link
Copy Markdown

Can confirm, adding
StartupWMClass=code
fixes the issue, running Gentoo 17.0/Gnome 3.24/vscode 1.31.0

@joaomoreno

Copy link
Copy Markdown
Contributor

davidbailey00 Maybe we gotta rethink this? Can you figure out why this doesn't work for you when StartupWMClass=code is set?

@valenfys

Copy link
Copy Markdown
Contributor Author

João Moreno (@joaomoreno) Not sure. Maybe it works for Sven Kayser (@SvenKayser) and Rodrigo Saboya (@saboya) since lowercase "code" is treated differently to uppercase "Code"?

I'm running Ubuntu 18.10, Gnome Shell 3.30.2, Code 1.32.3 and it's working correctly for me.

@saboya

Copy link
Copy Markdown

davidbailey00 That would suggest a locale issue, but is there a locale where lowercase "code" is treated the same as "Code"?

Also, I don't think removing StartupWMClass is correct. Not sure how Ubuntu handles this but it's certainly different from Gentoo. What determines a window's WM_Class?

@saboya

Rodrigo Saboya (saboya) commented Mar 18, 2019

Copy link
Copy Markdown

https://github.com/electron/electron/pull/858/files

$ xprop WM_CLASS
WM_CLASS(STRING) = "code", "Code"

@github-actions github-actions Bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

linux Issues with VS Code on Linux workbench-os-integration Native OS integration issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Duplicate icon in GNOME sidebar when Code is added to the favorites

5 participants