Saturday, 7 February 2015

.desktop file not shown in dash topic






Hi there,

Recently I made two scripts, one that will close some apps, the other will reopen previously closed apps. Here are thee bash scripts:

Code:


#!/bin/bashkillall -9 diodon
killall -9 thunderbird
killall -9 my-weather-indicator
killall -9 alarm-clock-applet
killall -9 caffeine-indicator
killall -9 psensor
killall -9 CopyAgent


and


Code:


#!/bin/bashdiodon &
thunderbird &
/opt/extras.ubuntu.com/my-weather-indicator/bin/my-weather-indicator &
alarm-clock-applet --hidden &
caffeine-indicator &
psensor &
/opt/copy-client/CopyAgent &


When I execute them in terminal by their absolute pat they work as I desire. Here is what I type in gnome-terminal:

Code:


Documents/Copy/Linux/Ubuntu/\[script\]_kill_and_start_apps/killapps.sh

and


Code:


Documents/Copy/Linux/Ubuntu/\[script\]_kill_and_start_apps/startapps.sh


So far so good. But then I want to add them in dash for easy access. To do so, i created two .desktop items in "/home/borche/.local/share/applications" with following content:

Code:


[Desktop Entry]Version= 1.0
Name=Game Mode Off
Comment=This is my comment
Exec=Documents/Copy/Linux/Ubuntu/\[script\]_kill_and_start_apps/startapps.sh
Icon=utilities-terminal
Terminal=false
Hidden=false
Type=Application
Categories=Utility;
Name[en_US]=GameModeOff


and


Code:


[Desktop Entry]Version= 1.0
Name=Game Mode On
Comment=This is my comment
Exec=Documents/Copy/Linux/Ubuntu/\[script\]_kill_and_start_apps/killpps.sh
Icon=utilities-terminal
Terminal=false
Hidden=false
Type=Application
Categories=Utility;
Name[en_US]=GameModeOn


- When I tried to double click from nautilus i got an error:

Code:


Untrusted application launcher
The application launcher “GameModeOff.desktop” has not been marked as trusted. If you do not know the source of this file, launching it may be unsafe.


- But if I made the .desktop files executable they work as desired, no errors, but I cant't find them by searching the dash.


I tried to validate both .desktop files for any kind of irregularity by typing:

Code:


desktop-file-validate .local/share/applications/*.desktop

and no errors, so I guess they are good.


Now I'm reading other similar threads but I can't find the right solution. Both .desktop files appear to work as desired if I access them via nautilus or gnome-terminal but they can't be found in dash by typing their names.


Thank you.






No comments:

Post a Comment