Re: Default editor/pager
>>>>> "Thomas" == Thomas Koenig <firstname.lastname@example.org> writes:
Thomas> Ian Jackson wrote:
>> 1.1. Users of programs like man and trn and so forth should get
>> the best editor or pager available by default.
Thomas> The choice of "best" editor may depend on wether a user is
Thomas> using X or not. Any proposed solution has to take this
Thomas> into account.
Isn't `xlsclients` the way to discover both whether X is running, and
whether an editor is already running on it?
if xlsclients 2>/dev/null >/dev/null;
echo X is running.;
echo X is not running.;
if xlsclients | grep -q "x*emacs";
echo x*emacs is running;
if ps -waxu | grep -q "^$(whoami).*gnuserv";
echo gnuserv is running;
echo but not gnuserv;
echo "Please add (gnuserv-start) to your ~/.emacs";
echo xemacs is not running;
Karl M. Hegbloom <email@example.com>
Portland, OR USA
Debian GNU 1.2 Linux 2.1.36 AMD K5 PR-133
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
Trouble? e-mail to firstname.lastname@example.org .