why cant i add some applications to favourite in ubuntu

Shell
sudo chmod +x /usr/share/applications/yourapp.desktop
sudo nano /usr/share/applications/yourapp.desktop
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/path/to/yourapp
Name=YourApp
Comment=Description of YourApp
Icon=/path/to/yourapp.png

Source

Also in Shell: