Sample Header Ad - 728x90

Design .desktop File to Launch the Default Terminal Emulator with Arguments

1 vote
0 answers
169 views
I'd like to be able to open text and source code files in neovim (or any other terminal-based text editor) when an XDG-compatible GUI application asks with which application to open that file. For now, I'd be targetting xfce and cinnamon as DE/session provider. For that, I'd write a neovim-in-default-terminal-emulator.desktop file, and start the configured default terminal emulator with the appropriate editor command. What do I need to do to launch the DE-configured default terminal emulator from a application .desktop file with arguments of my choosing? - It doesn't seem update-alternatives on modern non-debian systems (fedora38, and others) provides x-terminal-emulator (anymore?) - gsettings-based aproaches: not my go-to, since DE-dependent, which technically is a no-go for a .desktop file which is supposed to be DE-agnostic - I was first hoping for default-url-scheme-handler and then DEs registering their preferred terminal emulator for some console:// or similar URL, but xdg-settings get default-url-scheme-handler is all xdg-settings: default-url-scheme-handler not implemented for xfce on me (does that mean I can't open, say, skype:// URLs from a browser when operating under XFCE?!) - :-(
Asked by Marcus Müller (47292 rep)
Sep 3, 2023, 04:47 PM