0

I am making .desktop for teamspeak as their programmers didn't.

It ought to work for everyone and to do so I need to target home folder universaly with EXEC.

So let's pretend program X is in ~/.local

  • /home/username/.local/X this way works only for me

EDIT: This solved it for EXEC but doesn't apply to the ICON thus I placed it to /usr/share/icons which is workaround.

  • why did you accept an answer that does not even possibly work?? Relative paths like $HOME do not work in a .desktop file. – Jacob Vlijm Feb 20 '16 at 22:21
  • " That's not enough. See askubuntu.com/a/139198/158442 – muru Feb 19 at 19:37 " as you can see it was posted before you did comment here and I have had also already included in my EDIT.. so congratulations for writing before reading. – Tichun Feb 24 '16 at 21:20
  • I mentioned you accepted an answer before the edit was made on the answer (an edit after my comments on the answer). You should accept an answer, not including a comment in your own question. As said, you accepted a non working answer. – Jacob Vlijm Feb 24 '16 at 21:25
0

You can use the environment variable HOME. It stores the absolute path to the current user's home folder.

Here's how you can use it:

Exec=sh -c "$HOME/.local/X"

It's very important putting the $ before HOME so it's read as a variable. Also do not forget write HOME in capital letters only.

  • That's not enough. See askubuntu.com/a/139198/158442 – muru Feb 19 '16 at 19:37
  • @EduardoCola Please explain. – Jacob Vlijm Feb 20 '16 at 22:55
  • @EduardoCola I'd appreciate if you don't take it as-, -nor make it- a personal thing. When using sh -c or /bin/bash -c anything can be done, since either sh or bash is running the command then. When using your construction directly in the Exec= line, it simply doesn't possibly work, and the answer is a non- working one. You shouldn't want that. Accepted or not. – Jacob Vlijm Feb 20 '16 at 23:41
  • How unfortunate! May your desire be an order, mister. – Eduardo Cola Feb 20 '16 at 23:45
  • Lets keep our language polite please. – Seth Feb 21 '16 at 4:08

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.