[Pkg-gpm-devel] Bug#289165: gpm: Unnecessary question about X

Peter Samuelson Peter Samuelson <peter@p12n.org>, 289165@bugs.debian.org
Fri, 7 Jan 2005 11:20:06 -0600


--vkEkAx9hr54EJ73W
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable


[Helge Kreutzmann]
> I was updating, and I was asked:
> Usually, GPM should be started or restarted when it is installed or
> upgraded.  But when X is running and trying to use the same mouse
[...]
> But there is *no* X running on this machine currently! (I do not
> start X every time, just when I need it). Also I always run apt-get
> on the console anyways.

It's difficult to reliably detect the case where X is running when gpm
is being upgraded.  The package used to attempt this, but the check was
error-prone, so we chose to remove it and display the warning
unconditionally.

As it happens, if gpm and X are correctly configured, the restart is
quite safe.  However, forcing incorrect but working configurations to
break arbitrarily is not a good thing.  Especially since, historically,
a lot of bad advice about configuring gpm and X has floated around.

> Would this be possible to turn this into a note in NEWS? (i.e., is it
> sufficient if restarting while in X fails, that the user jumps to a
> terminal and restarts again?).

Nobody reads NEWS.  Nobody reads FAQs.  Nobody reads changelogs.  For
something which will potentially freeze the user's mouse cursor (and
this will happen during a potentially long 'apt-get upgrade' process,
so the user may not even have the terminal window *visible* to
determine what happened), I think I'd just as soon force the user to
see the warning.

> If the answer is no (which I doubt) then please include some scheme to
> detect if X is actually running (not installed, really running) before
> asking this question. Preferably, if TERM=3Dxterm or something similar,
> so if the user is already on the console, it can be skipped as well.

It's not as simple as checking TERM=3Dxterm.  (For one thing, there are
lots of terminal emulators out there and they use different
identifiers; for another thing, running inside 'screen' masks all trace
=66rom the process environment that it was invoked inside X.)  There is a
way to tell if we're in X, which gpm used to use at upgrade time.  I'll
see if I can find out exactly why the previous maintainers felt the
need to stop relying on this check, but IIRC, it was because it was
unreliable.

          *          *          *

> The next question is completely unnesessary. Of course remember the
> setting, otherwise I can run dpkg-reconfigure on it!

I've never been comfortable with this second question either.  I'll
have to reread the bug report(s) that caused us to put it in.

Thanks for the report,
Peter

--vkEkAx9hr54EJ73W
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFB3sTGXk7sIRPQRh0RAiCbAKDM6+LgqPYsefAwPDidM/IpfGSTpACdGUjl
+wtx64FqCSGQqa/v2QrrTRM=
=kFIX
-----END PGP SIGNATURE-----

--vkEkAx9hr54EJ73W--