You are not logged in.

#1 2021-12-18 18:57:28

herrzinter
Member
Registered: 2019-12-15
Posts: 24

gnome menu item creates unwanted new icon in dash

I created a .desktop entry under .local/share/applications/, to start a certain obsidian vault directly from my gnome dash via an icon:

[Desktop Entry]
Name=Vault-Name
GenericName=Vault-Name
Exec=obsidian "obsidian://open?vault=Vault-Name"
Icon=path/to/awesome/icon
Type=Application
Terminal=false
StartupNotify=true

While this works in principle, i.e. it starts the desired vault, there is the problem, that it does not launch the application under this particular desktop entry in the dash, but rather creates a new application icon of obsidian in the dash. Normally under gnome, all instances of a program are listed under its one application icon in the dash. Anyone know how to change this behavior?

Offline

#2 2021-12-18 19:19:10

robson75
Member
From: Poland
Registered: 2020-06-28
Posts: 144

Re: gnome menu item creates unwanted new icon in dash

You might want to try this

#!/usr/bin/env xdg-open
[Desktop Entry]
Name=Vault-Name
GenericName=Vault-Name
Exec=obsidian "obsidian://open?vault=Vault-Name"
Icon=path/to/awesome/icon
Type=Application
Terminal=false
StartupNotify=true

Arch Linux Xfce - 64Bit Linux User #621110

Offline

#3 2021-12-18 21:07:44

herrzinter
Member
Registered: 2019-12-15
Posts: 24

Re: gnome menu item creates unwanted new icon in dash

Sorry, but adding this line didn't work. Thanks for your support, though!

What partially worked is adding "StartupWMClass=obsidian" to the .desktop file. However, this now leads to all obsidian windows being listed under my icon and not just the new one. A possible solution would probably be to set the WM_CLASS property of the window manually for the window of the obsidian process opened by the desktop file - but I'm not sure how and also not sure if it is worth trying, because the solution than already becomes kind of complicated.

Offline

Board footer

Powered by FluxBB