icewm icon indicating copy to clipboard operation
icewm copied to clipboard

How to replace xterm with another terminal emulator?

Open tim77 opened this issue 5 years ago • 6 comments

In Fedora there is not such thing as Debian upgrade-alternative. If xterm not installed on system then apps like htop with Terminal=true in the desktop file wont run even if there alternative terminal emulators installed on system.

tim77 avatar Aug 31 '19 10:08 tim77

It is not precisely stated in your description in which sense IceWM is lacking. Is there a freedesktop standard not implemented? What is your proposed solution exactly? Which features of IceWM are involved and in what order?

gijsbers avatar Aug 31 '19 15:08 gijsbers

+1. Who is supposed to solve it? Either Integrator (Fedora) or the user (maybe by creating a script which looks for the correct executable or so. You can inject the name of the script with XTERMCMD define in the compiler flags, e.g. via CXXFLAGS environment).

Code7R avatar Sep 01 '19 05:09 Code7R

The issue here actually is the menu generator. @tim77 since we intend to use xde-menu, there's no way to avoid that as it translates 'Terminal=true' in the .desktop file to an xterm command. See: https://github.com/bbidulock/xde-menu/blob/master/src/xde-menu.c#L1180

What you could do for the Fedora package is maybe the same way you made a font settings optional package for icewm, one day you may make a xterm tweak package for it too (I think xterm can look modern if properly tweaked).

Regarding icewm code, actually icewm-menu-fdo uses XTERMCMD variable that is set to 'xterm' in appnames.h. See: https://github.com/bbidulock/icewm/blob/icewm-1-4-BRANCH/src/fdomenu.cc#L430 https://github.com/bbidulock/icewm/blob/icewm-1-4-BRANCH/src/appnames.h#L44

So yes, maybe some day icewm could check other terminal emulators like GNOME does in https://gitlab.gnome.org/GNOME/glib/blob/master/gio/gdesktopappinfo.c#L2520 but then that may or may not be bloat and we're all against bloat ;-)

But this could be a valuable improvement to xde-menu, so I suggest we open an enhancement request there.

Thyname avatar Sep 01 '19 20:09 Thyname

There is xdg-terminal. I see some use update-alternatives --config x-terminal-emulator. And gnome has:

gsettings set org.gnome.desktop.default-applications.terminal exec /usr/bin/terminator
gsettings set org.gnome.desktop.default-applications.terminal exec-arg "-x"

Here is some ordering of terminals:

    1 /usr/bin/xterm
    2 /usr/bin/uxterm
    3 /usr/bin/koi8rxterm
    4 /usr/bin/lxterm
    5 /usr/bin/gnome-terminal
    6 /usr/bin/konsole
    7 /usr/bin/xfce4-terminal.wrapper

I added --with-xterm= and -DXTERMCMD= to the build process for you. You could set it to /usr/bin/x-terminal-emulator or define your own xterm script?

The default IceWM preferences also use xterm in several places. These may need to become definable at build time as well.

gijsbers avatar Sep 02 '19 09:09 gijsbers

@gijsbers that https://github.com/bbidulock/icewm/commit/dd021701f73c76b539fd334edebec3c218daa30a could be consider as solution indeed, thank you. But it would be much better if we made possible to change default terminal dynamically, maybe write a script for this as you already mentioned.

  1. I could close this issue since it mostly fixed and open new one about dynamic terminal replacement.
  2. Or we can continue discuss this there.

tim77 avatar Sep 12 '19 09:09 tim77

You can always decide to close an issue if you want. It is okay to continue a discussion on a closed issue. A closed issue can also be reopened later. A new feature request deserves a new issue.

gijsbers avatar Sep 12 '19 10:09 gijsbers