Re: XDG Default Applications specification proposal

Bruno Haible <[email protected]>
Newsgroups gmane.linux.xdg.devel
Message-ID <2175711.S52yyiYEMC@omega>
Thayne wrote:
> In particular, this specifies which terminal application should be
> used to launch applications from desktop entries with Terminal=true.

Indeed, there is a need to make this easier. I wrote this code the other day:

;; Returns the terminal emulator program for a given desktop environment.
(defun terminal-program (&optional (desktop (desktop-environment)))
  (case desktop
    ((:GNOME-2 :GNOME-3) "gnome-terminal")
    (:KDE "konsole")
    (:LXDE "lxterminal")
    (:XFCE4 "xfce4-terminal")
    (:MATE "mate-terminal")
    (:PANTHEON "io.elementary.terminal")
    (:LUMINA "qterminal")
    (:MACOS "/Applications/Utilities/Terminal.app")
    (:HAIKU "Terminal")
    (:CYGWIN "mintty")
    (:WINDOWS "cmd")
    (t (if (getenv "DISPLAY") "xterm" nil))
) )

It's pretty ugly to have to enumerate the desktop environments in this way.

Bruno
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.