Desktop Entry with shellscript doesn't work.
by Everes from LinuxQuestions.org on (#4TKX8)
Hello Guys!
I created a shellscript and the desktop entry but when I click on the icon in the start menu it doesn't run. The script is working fine running in the terminal. Does anyone know what's happen?
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Name=Steam Wrapper
GenericName=Steam Wrapper
Type=Application
Terminal=true
Icon=steam
Exec=/opt/teste.sh
TryExec=/opt/teste.sh
Comment=Application for managing and playing games on Steam
Type=Application
Categories=Game;
#OnlyShowIn=MATE;
$ sudo chmod +x /opt/teste.sh
$ cat /opt/teste.sh (It's working correctly !)
#!/bin/sh
(
marco --replace &
sleep 2
cd /usr/bin && ./steam %U
sleep 2
compiz ccp --replace && PID=$! &
sleep 2
echo $PID
) &
exit 0
I can't find solution for this issue.
Thks.


I created a shellscript and the desktop entry but when I click on the icon in the start menu it doesn't run. The script is working fine running in the terminal. Does anyone know what's happen?
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Name=Steam Wrapper
GenericName=Steam Wrapper
Type=Application
Terminal=true
Icon=steam
Exec=/opt/teste.sh
TryExec=/opt/teste.sh
Comment=Application for managing and playing games on Steam
Type=Application
Categories=Game;
#OnlyShowIn=MATE;
$ sudo chmod +x /opt/teste.sh
$ cat /opt/teste.sh (It's working correctly !)
#!/bin/sh
(
marco --replace &
sleep 2
cd /usr/bin && ./steam %U
sleep 2
compiz ccp --replace && PID=$! &
sleep 2
echo $PID
) &
exit 0
I can't find solution for this issue.
Thks.