No menu icon on linux

Steps to reproduce

  • Install obsidian on Xubuntu using snap: snap install obsidian
  • open obsidian

Expected result

Menu item should have obsidian icon

Actual result

Has generic icon

image

Environment

SYSTEM INFO:
	Obsidian version: v1.6.5
	Installer version: v1.6.5
	Operating system: #41~22.04.2-Ubuntu SMP PREEMPT_DYNAMIC Mon Jun  3 11:32:55 UTC 2 6.5.0-41-generic
	Login status: not logged in
	Insider build toggle: off
	Live preview: on
	Base theme: adapt to system
	Community theme: none
	Snippets enabled: 1
	Restricted mode: off
	Plugins installed: 1
	Plugins enabled: 0

Additional information

The desktop icon is showing fine in the application menu, it’s just not show in the menu of the currently opened windows.

This is a bug affecting multiples apps using electrons. Might be the same issue as this one:

Obsidian not being open source I cannot experiment on how to fix . I’m happy to provide further assistance if you do not have access to an xfce desktop

Thanks

A “generic” icon tends to mean that the desktop cannot associate the window with the .desktop launcher. That can be corrected by having a StartupWMClass=<WMCLass> entry in the .desktop launcher, where mentions the actual window name.

I cannot reproduce your issue on standard Ubuntu 24.04 nor 22.04 (with the Gnome Desktop), though. The Obsidian window has the WMClass “obsidian”, whereas the launcher contains the statement StartupWMClass=obsidian. This therefore may be an XFCE problem.

Check the WMClass at the terminal with xprop WM_CLASS or wmctrl -lx.
Check the contents of the .desktop launcher, which is installed in/var/lib/snapd/desktop/applications/obsidian_obsidian.desktop

1 Like

move to help

@vanadium thanks for your answer.

This is the content of the desktop entry:

[Desktop Entry]
X-SnapInstanceName=obsidian
Name=Obsidian
Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/obsidian_obsidian.desktop /snap/bin/obsidian %U
Terminal=false
Type=Application
Icon=/snap/obsidian/34/meta/gui/icon.png
StartupWMClass=obsidian
Comment=Obsidian
MimeType=x-scheme-handler/obsidian;
Categories=Office;                     

and xprop WM_CLASS will return:

WM_CLASS(STRING) = "obsidian", "obsidian"

I did compare the desktop entry for other softwares, for which the icon is showing properly, such as firefox, and they do not have a StartupWMClass entry in them, and nothing that could map the icon to the window.

I found more electron apps having this issue in XFCE:

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