You are not logged in.
Pages: 1
I did ever tried create a desktop file in /usr/share/applications and the icon show but when I open the app does not show the icon. Someone knows how to put an icon on bin files? Thanks in advance
Last edited by frey (2023-06-21 01:17:26)
Offline
Please don't paraphrase, https://bbs.archlinux.org/viewtopic.php?id=57855
when I open the app does not show the icon
Specifically where you'd expect that icon to show up (context and process)
Offline
Please don't paraphrase, https://bbs.archlinux.org/viewtopic.php?id=57855
when I open the app does not show the icon
Specifically where you'd expect that icon to show up (context and process)
https://i.ibb.co/9WG3Ms4/No-Icon.png
there's no icon in the panel.
Last edited by frey (2023-06-21 09:38:22)
Offline
And what /is/ the panel?
What kind of desktop environment is this, assuming the display server is X11, what's the output of "xprop" for the window and what does the desktop service look like you created?
Did you use that to start the application?
Offline
And what /is/ the panel?
What kind of desktop environment is this, assuming the display server is X11, what's the output of "xprop" for the window and what does the desktop service look like you created?
Did you use that to start the application?
output
XKLAVIER_STATE(INTEGER) = 0, 8759296
_NET_WM_STATE(ATOM) =
WM_STATE(WM_STATE):
window state: Normal
icon window: 0x0
_NET_WM_DESKTOP(CARDINAL) = 0
_GTK_EDGE_CONSTRAINTS(CARDINAL) = 170
_NET_FRAME_EXTENTS(CARDINAL) = 0, 0, 43, 0
_NET_WM_ALLOWED_ACTIONS(ATOM) = _NET_WM_ACTION_MOVE, _NET_WM_ACTION_MINIMIZE, _NET_WM_ACTION_SHADE, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_CLOSE, _NET_WM_ACTION_ABOVE, _NET_WM_ACTION_BELOW
WM_HINTS(WM_HINTS):
Client accepts input or input focus: True
Initial state is Normal State.
bitmap id # to use for icon: 0x6000024
window id # of group leader: 0x6000001
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 100663301
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL
_NET_WM_USER_TIME_WINDOW(WINDOW): window id # 0x6000004
WM_CLIENT_LEADER(WINDOW): window id # 0x6000001
_NET_WM_PID(CARDINAL) = 12610
WM_LOCALE_NAME(STRING) = "en_GB.UTF-8"
WM_CLIENT_MACHINE(STRING) = "hostname"
WM_NORMAL_HINTS(WM_SIZE_HINTS):
program specified minimum size: 640 by 431
program specified maximum size: 640 by 431
window gravity: NorthWest
WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_CLASS(STRING) = "xnp2", "Xnp2"
WM_ICON_NAME(STRING) = "NP2"
_NET_WM_ICON_NAME(UTF8_STRING) = "NP2"
WM_NAME(STRING) = "Neko Project II"
_NET_WM_NAME(UTF8_STRING) = "Neko Project II"Desktop environment: Cinnamon
please see the picture.
I put an icon path on .desktop file but when I open the window does not appear on bottom of the screen/panel.
Last edited by frey (2023-06-21 13:36:33)
Offline
Please don't paraphrase, https://bbs.archlinux.org/viewtopic.php?id=57855
Post the desktop service you created.
Offline
Please don't paraphrase, https://bbs.archlinux.org/viewtopic.php?id=57855
Post the desktop service you created.
[Desktop Entry]
Name=X Neko Project II
Comment=Emulator NEC PC-9801
Icon=/home/user/pictures/Neko_Project_Icone_edited.png
Categories=Game;
Type=Application
Exec=/usr/bin/xnp2image:
https://i.ibb.co/yddGbBT/No-Icon.png
I want to show the icon of "cat" on yellow square
Last edited by frey (2023-06-21 14:16:12)
Offline
The name of the entry doesn't fit _NET_WM_NAME, WM_NAME or WM_CLASS and there's no StartupWMClass in the desktop service.
The panel/WM has no chance to guess a relation between the desktop service entry and the window.
The client doesn't set an icon on the window, you could do so using https://aur.archlinux.org/packages/xseticon but might afterwards also have to un/map the window to have the change picked up by the toolbar.
Offline
The name of the entry doesn't fit _NET_WM_NAME, WM_NAME or WM_CLASS and there's no StartupWMClass in the desktop service.
The panel/WM has no chance to guess a relation between the desktop service entry and the window.The client doesn't set an icon on the window, you could do so using https://aur.archlinux.org/packages/xseticon but might afterwards also have to un/map the window to have the change picked up by the toolbar.
thanks! I found a script to run the icon every time that open the app.
you need xseticon from AUR!
named like the name of pacakage. example: gnome-calculator and put in /usr/local/bin
#!/bin/bash
# edit these values to suit
ICON=/home/user/image.png
PROG=/usr/bin/exec
# don't change anything below
function seticon
{
sleep .5
activeWinLine=$(xprop -root | grep "_NET_ACTIVE_WINDOW(WINDOW)")
activeWinId="${activeWinLine:40}"
xseticon -id "$activeWinId" "$ICON"
}
"$PROG" & seticonso edit .desktop file
[Desktop Entry]
Name=X Neko Project II
Comment=Emulator NEC PC-9801
Icon=/home/user/pictures/Neko_Project_Icon_edited.png
Categories=Game;
Type=Application
Exec=/home/user/xnp2.sh # or gnome-calculator.shEDIT: it does not work in the first time, only shows the icon when you open in the second time and so on.
Last edited by frey (2023-06-21 17:35:49)
Offline
Ewww…
…
xseticon -id $(xdotool search --sync --classname xnp2) "$ICON" & exec /usr/bin/xnp2
…Though I'd assume if you fix the "Name" in the "[Desktop Entry]" to "Neko Project II" the panel might accurately guess the relation (though this is heuristically)
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.
Offline
Pages: 1