I want to run .desktop
files from the terminal and dmenu. From the terminal, it should ideally be run with ./app.desktop
or /path/to/app.desktop
, and app.desktop
would be put in a $PATH
directory. I'd rather not have to use an external command like gtk-launch app.desktop
.
Additionally, I've found that gtk-launch
doesn't always work to launch the application with gtk-launch app.desktop
, and even when it does work, putting #!/path/to/gtk-launch
at the top of the .desktop
returns the error gtk-launch: no such application ./app.desktop
when I run ./app.desktop
with it executable.
I'm using bspwm and generally prefer launching things from the terminal or with dmenu_run
so I don't have a desktop from which I can click on the .desktop
files to launch them.
How can I make the .desktop
files executable?
xdg-open app.desktop
, it doesn't run theExec=
line but instead runs$EDITOR app.desktop
which opens the.desktop
file for editing in nvim for me withoutperl-file-mimeinfo
installed (I'm on Manjaro). Withperl-file-mimeinfo
, it opens thepath/to/app,desktop
in my browser, which then prompts me to download the file. How should I configurexdg-open
to correctly open the application? – ChocolateOverflow Dec 30 '20 at 02:15content-type: application/x-desktop
but tries to edit them. For confirmation I tested with the example from this answer. – village Jun 15 '23 at 09:01