One way to get desktop icons to IceWM desktop is to use Idesk. Desktop links can made by hand, but it easier to make using a script. More info from Idesk from https://wiki.archlinux.org/title/Idesk
This script needs Yad package to be installed.
28.3.2025: New and the best idesk-linkmaker2
Idesk-linkmaker2-deb-package-and-script.zip
idesk-linkmaker-rpm-package-and-script.zip
Code:
#!/bin/bash
## RPJ 28.3.2025 New version from Idesk linkmaker
# Works only then when icon is write correctly in desktop-file (path and type)
#
# xdg-open must be right configured
# Query about current mimetype:
# xdg-mime query default inode/directory
# Test about current mimetype:
# XDG_CURRENT_DESKTOP='X-Generic' xdg-open ~
# Change default mimetype (if wanting caja):
# xdg-mime default caja.desktop inode/directory
#
xdg-open /usr/share/applications | \
yad --dnd --geometry=600x200 --on-top --no-buttons --title=$"Idesk desktop link program" --text=$"Drag and drop application for desktop into this box " | while read selection
do
##
FILE=$(echo "$selection" | sed 's/file:\/\///')
FILE2=$(sed 's/ /\\ /g' <<< "$FILE")
sleep 0,1
echo "$FILE" > /tmp/file.txt
sleep 0,1
cat /tmp/file.txt > /tmp/name0.txt
sed -i 's/.desktop//g' /tmp/name0.txt
sleep 0,1
cat /tmp/name0.txt | sed "s/.*\///" > /tmp/name.txt
pkill yad
NAME=$(cat /tmp/name.txt)
xdg-open /usr/bin | \
yad --dnd --geometry=600x200 --on-top --no-buttons --title=$"Idesk desktop link program" --text=$"Drag and drop program for desktop link into this box " | while read selection
do
##
PROG1=$(echo "$selection" | sed 's/file:\/\///')
PROG2=$(sed 's/ /\\ /g' <<< "$PROG1")
sleep 0,1
echo "$PROG2" > /tmp/prog.txt
pkill yad
PROG=$(cat /tmp/prog.txt)
xdg-open /usr/share/icons | \
yad --dnd --geometry=600x200 --on-top --no-buttons --title=$"Idesk desktop link icon" --text=$"Drag and drop icon for desktop link into this box " | while read selection
do
#
ICON1=$(echo "$selection" | sed 's/file:\/\///')
ICON2=$(sed 's/ /\\ /g' <<< "$ICON1")
sleep 0,1
echo "$ICON2" > /tmp/icon.txt
pkill yad
ICON=$(cat /tmp/icon.txt)
mkdir -p $HOME/.idesktop
{
echo 'table Icon'
echo "Caption: $NAME"
echo "ToolTip.Caption: $NAME"
echo "Icon: $ICON"
echo 'Width: 48'
echo 'Height: 48'
echo 'X: 400'
echo 'Y: 400'
echo "Command[0]: $PROG"
echo 'end'
} > $HOME/.idesktop/$NAME.lnk
KILLIDESK=$(killall idesk & sleep 0,1 && idesk &)
/bin/bash -c "$KILLIDESK"
done
done
done
##############################################################################
OLD VERSIONS
Edit 9.5.2024:
New installation rpm and deb packages.
IDESK-LINKMAKER-5-installation-packages.zip
############################################
OLD-VERSION-idesk-linkmaker2.zip
Read also: https://puolanka.info/goto/icons-for-icewm-desktop/