I have a .desktop file that launches an app, and it uses the .desktop icon:
[Desktop Entry]
Name=My Ro
Type=Application
Comment=Web Application
Exec=/path/to/myapp -test
Icon=/opt/giteye/icon.xpm
Name[en_US]=My Ro
I want to use a shell script instead to launch this app because with shell script i can pass the script command line arguments which then get passed to the launching app.
#!/bin/sh
nohup /path/to/myapp -test "$@" &
However with shell script the icon is not that of the shell file. It uses the default icon of the myapp. Is there anyway to make this behave as the .desktop and make the shell launch the app with custom icon?
EDIT - I tried giving the desktop entry path to shell
One desktop entry:
[Desktop Entry]
Name=Firefox
Type=Application
Comment=Web Application
Exec=/home/yasir/Desktop/launchers/Mozilla\ Firefox\ -\ test.sh
Icon=/home/yasir/Desktop/customFx.png
Name[en_US]=Firefox
Another desktop:
[Desktop Entry]
Name=Firefox Safe Mode
Type=Application
Comment=Web Application
Exec=/home/yasir/Desktop/launchers/Mozilla\ Firefox\ -\ test.sh -safe-mode
Icon=/home/yagt/Documents/fxSafe.png
Name[en_US]=Firefox Safe Mode
Shell:
#!/bin/sh
nohup /usr/lib/firefox/firefox "$@" &
Exec
in.desktop
file? – Ron Jul 03 '15 at 11:12.desktop
and it does take the custom icon, however desktop entries cannot take command line arguments which is what i badly need. http://stackoverflow.com/questions/31196869/desktop-with-command-line-args-passed-to-exec-similar-to-shell-script/31196950#31196950 – yatg Jul 06 '15 at 16:59