Re: Default editor/pager
>>>>> "Thomas" == Thomas Koenig <ig25@mvmap66.ciw.uni-karlsruhe.de> 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;
then
echo X is running.;
else
echo X is not running.;
fi
if xlsclients | grep -q "x*emacs";
then
echo x*emacs is running;
if ps -waxu | grep -q "^$(whoami).*gnuserv";
then
echo gnuserv is running;
export $VISUAL='gnuserv';
else
echo but not gnuserv;
echo "Please add (gnuserv-start) to your ~/.emacs";
export $VISUAL='ae';
fi;
else
echo xemacs is not running;
export $VISUAL='ae';
fi
--
Karl M. Hegbloom <karlheg@inetarena.com>
http://www.inetarena.com/~karlheg
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
debian-devel-request@lists.debian.org .
Trouble? e-mail to templin@bucknell.edu .
Reply to: