Actually, this would be better, because it passes arguments as-is, including white space (so it would work with file names containing spaces and other special characters): xterm -e joe "$@"
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I wouldn't pollute joe's official distribution with such a wrapper.
There's hundreds of terminal-based apps on one's system, others don't have such wrapper scripts either. There's no xnano, xvim, xtop, xalsamixer, xmc, xirssi etc.
There are a bunch of terminal emulators out there (xterm probably being the most complete as far as rarely used emulation features go, but has a really last century look and refuses some new additions like truecolors), and there's no generic way to invoke the user's preferred choice.
Distributions might also face a dilemma whether their joe package should begin to require xterm, or ship a potentially broken script, or remove that script.
A user could easily create such an alias or wrapper for himself/herself, maybe even a more generic one called "x" which launches the app in a terminal, and then type "x joe foo.txt" or "x mc" or whatever.
This is exactly the kind of story that asks for a generic (not joe-specific) solution that should probably be raised at popular distributions' forums.
What joe could (should?) do instead is ship a /usr/share/applications/joe.desktop (and perpahs for jmacs etc. too), with Terminal=true (the desktop environment then launches the user's default terminal) and Exec=joe %F which I guess somehow allows drag-n-dropping files on the menu entry (not sure, I just see %F in my emacs25-term.desktop and vim.desktop).
Last edit: Egmont Koblinger 2017-12-16
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It's tempting to ship a terminal emulator along with JOE :-)
I wonder if there is precedent for the .desktop file in other configure scripts. This is the better solution since it achieves the result of making the windowing system aware of the editor without outside intervention.
Actually, this would be better, because it passes arguments as-is, including white space (so it would work with file names containing spaces and other special characters):
xterm -e joe "$@"I wouldn't pollute joe's official distribution with such a wrapper.
There's hundreds of terminal-based apps on one's system, others don't have such wrapper scripts either. There's no xnano, xvim, xtop, xalsamixer, xmc, xirssi etc.
There are a bunch of terminal emulators out there (xterm probably being the most complete as far as rarely used emulation features go, but has a really last century look and refuses some new additions like truecolors), and there's no generic way to invoke the user's preferred choice.
Distributions might also face a dilemma whether their joe package should begin to require xterm, or ship a potentially broken script, or remove that script.
A user could easily create such an alias or wrapper for himself/herself, maybe even a more generic one called "x" which launches the app in a terminal, and then type "x joe foo.txt" or "x mc" or whatever.
This is exactly the kind of story that asks for a generic (not joe-specific) solution that should probably be raised at popular distributions' forums.
What joe could (should?) do instead is ship a /usr/share/applications/joe.desktop (and perpahs for jmacs etc. too), with Terminal=true (the desktop environment then launches the user's default terminal) and Exec=joe %F which I guess somehow allows drag-n-dropping files on the menu entry (not sure, I just see %F in my emacs25-term.desktop and vim.desktop).
Last edit: Egmont Koblinger 2017-12-16
It's tempting to ship a terminal emulator along with JOE :-)
I wonder if there is precedent for the .desktop file in other configure scripts. This is the better solution since it achieves the result of making the windowing system aware of the editor without outside intervention.
... Well there is a way: dist_desktop_DATA, see here:
http://ptomato.name/advanced-gtk-techniques/html/desktop-file.html
Last edit: Joe Allen 2017-12-17
I've added the desktop files.