Code: #!/bin/bash # wine-extracticon echo Usage : wine-extracticon myapp.exe MYFILE=$(readlink -f "$1") shift for i in $@; do MYFILE="$MYFILE $i"; done MYBASENAME=$(basename "$( readlink -f "$MYFILE")") echo "Extracting icon(s)..." wrestool -x -t 14 "$MYFILE" > "/tmp/$MYBASENAME.ico" echo Converting icon to PNG... convert -alpha on "/tmp/$MYBASENAME.ico" "/tmp/$MYBASENAME.png" # the script will assume the best icon is the bigger one echo Copy "$(ls -S -1 "/tmp/$MYBASENAME"*".png" | tac | tail -n 1)" to "$MYFILE.icon.png" ... cp "$(ls -S -1 "/tmp/$MYBASENAME"*".png" | tac | tail -n 1)" "$MYFILE.icon.png" echo "Done." Code: #!/bin/bash # wine-createshortcut echo Usage : wine-createshortcut myapp.exe echo Extract icon... wine-extracticon "$@" MYFILE=$(readlink -f "$1") shift for i in $@; do MYFILE="$MYFILE $i"; done MYBASENAME=$(basename "$( readlink -f "$MYFILE")") echo Create shortcut contents... myshortcut="[Desktop Entry]"\\n"Exec=wine start /Unix \""$MYFILE"\""\\n"Type=Application"\\n"Categories=Application"\\n"Icon="$MYFILE.icon.png"" echo Create .desktop file... echo -e $myshortcut >"$MYFILE".desktop echo Create links on desktop and applications menu... ln -s "$MYFILE.desktop" "$HOME/Desktop/$MYBASENAME.desktop" ln -s "$MYFILE.desktop" "$HOME/.local/share/applications/$MYBASENAME.desktop" echo Done.