Questions tagged [.desktop]

A .desktop file describes how a particular program is to be launched, how it appears in menus, etc. It is used by Freedesktop-compliant environments such as Gnome, KDE and Xfce.

Filter by
Sorted by
Tagged with
9
votes
1answer
4k views

How to validate/verify .desktop files?

I have a couple of .desktop files that aren't working as expected or not at all. I can't see any error anywhere and asking for help on each one seems unproductive. Is there a way I can verify that I'm ...
6
votes
3answers
7k views

Getting the current path in .desktop EXEC command

Im trying to make a .desktop file run a .sh which is stored in the same directory as the .desktop. The whole directory needs to be portable and moved from machine to machine. my run script is run.sh ...
2
votes
1answer
686 views

Add another sub-level to KDE-Submenu in Dolphin actions/services?

Is it possible to create lower levels of sub-menus in Dolphin context menu than the one created by the line X-KDE-Submenu= under [Desktop Entry]? Example: I have created an action called "Subtitles"...
6
votes
1answer
986 views

Spotify controls (next, previous etc) via context menu in gnome favorites

I've added Spotify launcher to Gnome Shell Dash so it's now a favorite app. How do I add next / prev / play-pause / stop commands to Spotify context menu ? For those who still find this unclear, the ...
2
votes
1answer
6k views

How do I create an Xfce application menu containing only the contents of one category?

I want to create an application menu in Xfce that contains no submenus, rather just contains application launchers for all .desktop files in the virtualization category. If you are uncertain as to ...
6
votes
1answer
941 views

Should “#!/usr/bin/env xdg-open” be included in .desktop files?

Some people add the following line to a .desktop file: #!/usr/bin/env xdg-open But when I checked files under the /usr/share/applications/ in my debian sid, there's no such file that would include ...
15
votes
1answer
5k views

What is the TryExec field in .desktop files?

I have searched a great deal and have been unable to find an answer to this. What does the TryExec field do in .desktop files? How does it differ from the Exec field?
4
votes
1answer
194 views

determine (in script) if command runs in terminal (from desktop file?)

Simplified down, I want to write a shell function which runs a program in a new window. For applications like … emacs, firefox, gitk that can look like this: myopen() { $@ } But I want to open ...
3
votes
2answers
1k views

How do I write a command for the Exec key in a .desktop file containing a reserved character correctly?

I'm trying to make a .desktop file for Minecraft. Nothing appears to happen upon executing the file. I've tried assigning the Exec key as follows: Exec= java -jar "~/.minecraft/Minecraft.jar" Exec= ...
2
votes
1answer
402 views

.desktop file. Correct exec path

I use Fedora. There are a number of programmes packaged in a security spin. Included desktop files work but open the programmes with root priviliges. How can I edit the desktop file shown here to ...
1
vote
1answer
1k views

How to fix the intermittent double click behavior of my Ubuntu 16.04 Unity desktop files

I tried and tested @terdon's .desktop file yesterday. Here it is: "A cleaner way would be to write a .desktop file that launches your script and then double click that. Something like: [Desktop ...
1
vote
3answers
3k views

How to automatically “Run in Terminal” for script in CentOS linux

I have a simple script that basically does "tail -1000f /public/XERlog" I created a file called log.desktop on the desktop which contains: Exec= tail -1000f /public/XERlog Name= XERlog Path=/tmp/ ...
1
vote
1answer
2k views

Getting Current path in .desktop entry for ICON command

Im trying to make a .desktop file run a .sh which is stored in the same directory as the .desktop. The whole directory needs to be portable and moved from machine to machine. Now I can get the ...
0
votes
0answers
626 views

Linux Mint - Just created launcher does not show on MATE desktop but is in ls listing

I created a launcher by right-clicking on my Desktop, filled in the fields and saved it. But it didn't appear on my Desktop. So I opened Caja and it did not show there either. So I opened a terminal ...