I am maintaining a Jekyll-powered blog and on my local machine its git repository is located at /home/fusion809/GitHub/fusion809.github.io to edit it in Atom I have created this application launcher (which is saved at /home/fusion809/.local/share/applications/edblog.desktop):

[Desktop Entry]
Exec=atom ~/GitHub/fusion809.github.io
TryExec=/usr/bin/atom ~/GitHub/fusion809.github.io

For a reason that escapes me whenever I run edblog.desktop by double-clicking it I get an error message:

Failed to execute file "edblog":
Invalid desktop file

I have tried substituting ~ with $HOME and /home/fusion809 to no effect.

  • I recommend using Exec=atom /home/fusion809/GitHub/fusion809.github.io. By the way is command atom /home/fusion809/GitHub/fusion809.github.io working fine from Terminal? Also make sure that your .desktop file has execution permission. – Pandya Jan 9 '16 at 4:53
  • Just tried that (resetting Exec) and it didn't work. As for the permissions it is set to be executable (which I did by running sudo chmod +x edblog.desktop). The command atom /home/fusion809/GitHub/fusion809.github.io works fine from terminal, in fact, I have been executing it without a problem for months now as I defined it as a function that is also called edblog in my ~/.bashrc file. – BH2017 Jan 9 '16 at 5:01
  • What is odd though is that running the edblog launcher from my application menu goes without a hitch but when I open my file browser (atm Thunar) and click on my edblog.desktop file in ~/.local/share/applications it returns that error message. Running other launchers in this directory goes without a hitch, however. – BH2017 Jan 9 '16 at 5:02
  • So, is .desktop file executing fine from command-line? (ex: exo-open /path/to/.desktop)? then problem seems with thunar file manager. – Pandya Jan 9 '16 at 5:20
  • Well I'll be, you're right, it is to do with my file manager, although it seems to affect all my file managers, not just Thunar. Well you right up this answer and I will accept it. – BH2017 Jan 9 '16 at 5:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.