Le 14/04/2023 à 09:12, Landry Breuil a écrit :
Le Fri, Apr 14, 2023 at 09:06:26AM +0200, Landry Breuil a écrit :
Le Thu, Apr 13, 2023 at 06:30:15PM +0200, Joel Carnat a écrit :

I have also solved the "icons" issue I had with Firefox and Thunderbird.
Basically, it is because the binaries are known as firefox-default and
thunderbird-default in OpenBSD - I noticed this while running Windowmaker
and docking those apps. I had to write my own
~/.local/share/applications/{firefox,thunderbird}.desktop files. And it also
works to apply an icon to xterm(1). Do you think this package should come
with a note about desktop files in MESSAGE or I should rather add those
desktop files in the port?

I wont accept such desktop files in the docklike port, feels like a
kludge to workaround something broken somewhere else. What's the
difference between your desktop file and the original one ? There are no
'default' suffixes in the thunderbird/firefox binaries.. that has to be
some weird ICCCM property, because xprop on a firefox window indeed
gives WM_CLASS(STRING) = "Navigator", "firefox-default"
but i dunno where that comes from. Will have to dig.

ah, seems gdk_set_program_class() in
https://searchfox.org/mozilla-central/source/widget/gtk/nsAppShell.cpp#328
is the one setting that weird name. strange. the -default suffix seems
to come from the update channel set in
https://searchfox.org/mozilla-central/source/toolkit/moz.configure#2780
- for some reason unknown to me we're not on 'release' but 'default',
   probably because we dont get binary updates from mozilla.

so, what have you set in the desktop file to 'fix' that ?

Only the Exec part:
# diff /usr/local/share/applications/firefox.desktop ~/.local/share/applications/firefox.desktop
153c153
< Exec=firefox %u
---
> Exec=firefox-default %u
200c200
< Exec=firefox -new-window
---
> Exec=firefox-default -new-window
219c219
< Exec=firefox -private-window
---
> Exec=firefox-default -private-window

How about xterm ?

what needs to be done for xterm ?

I copied /usr/local/share/applications/xfce4-terminal.desktop into ~/.local/share/applications/xterm.desktop, remove a bunch of translations I don't use and modify the Exec part:
# cat ~/.local/share/applications/xterm.desktop
[Desktop Entry]
Version=1.0
Name=Xterm
Name[fr]=Xterm
GenericName=Terminal emulator for X
GenericName[fr]=Émulateur de terminal X
Comment=Use the command line
Comment[fr]=Utiliser la ligne de commande
Exec=/usr/X11R6/bin/xterm
Icon=funterm
Terminal=false
Type=Application
Categories=Utility;
StartupNotify=true

Reply via email to