Ask Ubuntu Asked by Cobweb on November 6, 2021
I decided to use a midi controller for certain tasks, so I’ve used midi2input for this.
The application compiled with no errors however, when I click on the icon I get:
Invalid desktop entry file: '~/.local/share/applications/m2i.desktop
These are the contents of the desktop entry:
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=true
Exec=/usr/local/bin/
Name=Midi2Input
Icon=/home/emm/midi2input/build/res/icons/hicolor/512x512/apps/m2i-light.png
Any ideas?
The png exists. I’ve also just altered the Exec line as you suggested and I’ve also re-built it and it’s still giving the same error.
Current desktop entry:
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=false
Exec=/usr/local/bin/m2i
Name=midi2input
DBusActivatable=false
Icon=/home/emm/midi2input/build/res/icons/hicolor/512x512/apps/m2i-light.png
StartupNotify=true
emm@i3:~$ ls -al /usr/local/bin/m2i
-rwxr-xr-x 1 root root 606864 Jul 21 12:28 /usr/local/bin/m2i
emm@i3:~$ ls -al /home/emm/midi2input/build/res/icons/hicolor/512x512/apps/m2i-light.png
-rw-rw-r-- 1 emm emm 10010 Jul 22 08:05 /home/emm/midi2input/build/res/icons/hicolor/512x512/apps/m2i-light.png
emm@i3:~$
Try making sure you are launching the .desktop
file you think.
Use locate m2i.desktop
(1) to see if there is more than one such file in your system (I am assuming you have an updated mlocate
database).
Then if you are sure the Exec
file pointed at is correct, comment lines in the .desktop
files and try launching m2i
, until you identify the culprit.
You could use gtk-launch m2i
(2), see this.
You could comment one by one, comment them in bunches (sort of a bisection method), or comment all except for the Exec
and only one more.
This last form is probably the best.
Please post feedback on commands (1) and (2a), (2b), etc. (one for each line that was left uncommented), and the output of
ls -al /usr/local/bin/m2i
ls -al /home/emm/midi2input/build/res/icons/hicolor/512x512/apps/m2i-light.png
type m2i
Answered by sancho.s ReinstateMonicaCellio on November 6, 2021
You have not specified the full path of the executable.
You have only put:
Exec=/usr/local/bin/
See the documentation on Desktop Entry Specification - GNOME Developer
Exec
Program to execute, possibly with arguments. See the
Exec
key for details on how this key works. TheExec
key is required ifDBusActivatable
is not set totrue
. Even ifDBusActivatable
istrue
,Exec
should be specified for compatibility with implementations that do not understandDBusActivatable
.
Not to be confused with:
Name
Specific name of the application, for example "Mozilla".
Answered by Geoff on November 6, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP