[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#617236: marked as done (olwm&olvwm: DISPLAY environment variable corrupted)

Your message dated Sun, 24 Jul 2011 21:05:16 +0000
with message-id <E1Ql5rQ-0000AV-4T@franck.debian.org>
and subject line Bug#617236: fixed in xview 3.2p1.4-26
has caused the Debian Bug report #617236,
regarding olwm&olvwm: DISPLAY environment variable corrupted
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org

617236: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=617236
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: olwm
Version: 3.2p1.4-25.1
Severity: grave
Tags: patch
Justification: renders package unusable


OK, I know that xview, olwm, olvwm are DEAD... but

I was very happy to see that they now compile on amd64.
(I had earlier lamely tried compiling them myself on this architecture
without much success, nor putting much effort, either.)

However, I loved olvwm and xview, and ALL current GUI developers
should read the Open Look Style Guide, as it clearly explains how a window
manager and GUI system should behave. Lessons that have NOT been learnt.

Even though I loved olvwm, I will probably not use it again much,
or for long, as we have all become dependent on more modern windowing
systems. But perhaps in a spate of some sort of mid-life crisis
I will nostalgically go back to it, and find efficiency and happiness.


olwm and olvwm corrupt the environment variable DISPLAY.
If it is set to ":0" as by default on my system,
the window manager resets it to ".0", breaking everything.
If it is set to ":0.0", then everything goes fine.

The problem is in olwm/environ.c and olvwm-4.1/environ.c
My rusty programming experience (that dates from the period when xview
was developed, and before) sees nothing wrong, except:

< 	(void)sprintf(value,"%.*s.%d",len,display,screen);
> 	(void)sprintf(value,"%*s.%d",len,display,screen);

I do not understand what "%.*s" means, and I believe that this is a typo.
Removing the "." produces working olwm and olvwm.

Thanks again for getting this to compile under amd64
(the problem was probably in a dependency that was fixed).
Please fix the package before anyone else notices.

Thank you.


-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.37 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages olwm depends on:
ii  libc6                       2.11.2-13    Embedded GNU C Library: Shared lib
ii  libx11-6                    2:1.4.1-5    X11 client-side library
ii  libxext6                    2:1.2.0-2    X11 miscellaneous extension librar
ii  xviewg                      3.2p1.4-25.1 XView shared libraries

olwm recommends no packages.

Versions of packages olwm suggests:
ii  menu                        2.1.44       generates programs menu for all me
ii  xview-clients               3.2p1.4-25.1 XView client programs

-- no debconf information
#ident	"@(#)environ.c	1.9	93/06/28 SMI"

 *      (c) Copyright 1989 Sun Microsystems, Inc.

 *      Sun design patents pending in the U.S. and foreign countries. See
 *      LEGAL_NOTICE file for terms of the license.

#include <stdio.h>
#ifdef SYSV
#include <string.h>
#include <strings.h>
extern char *strrchr();
extern char *strchr();
#include <X11/Xos.h>
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include "mem.h"

extern	char **environ;

/* -----------------------------------------------------------------------
 *	Local Data Structures
 * -----------------------------------------------------------------------*/

 * 	Env - environment object
typedef struct _env {
	char	**environ;	/* array of environment strings */
	int	length;		/* length of environ array */
	int	used;		/* number of entries actually used */
} Env;

/* -----------------------------------------------------------------------
 *	Local Functions
 * -----------------------------------------------------------------------*/

 *	createEnv - Creates a new environment array that is the length of
 *		    of the current environment plus the number of additions.
static void
	Env	*env;
	int	nadditions;
	int	i = 0;

	/* find the number of items in the current environ */
	while (environ[i] != (char *)NULL) {

	/* create space for the environ strings */
	env->used = i;
	env->length = env->used + nadditions + 1;
	env->environ = MemAlloc(env->length*sizeof(char *));

	/* copy the current environ into the new one */
	for (i=0; i<env->used; i++) {
		env->environ[i] = MemNewString(environ[i]);
	env->environ[i] = (char *)NULL;

 *	putEnv - Puts the name,value pair into the specified environment
 *	         replacing any existing values.
 *		 Assumes there is space for the new setting.
static void
	Env	*env;
	char	*name;
	char	*value;
	int	nameLen = strlen(name);
	char	*envVar;
	int	count;

	/* create new env string with space for '=' and null */
	envVar = (char *)MemAlloc(nameLen + strlen(value) +2);


	/* search through, checking for variable in question */
	for (count=0 ; count<env->used; count++) {
		if (!strncmp(env->environ[count],name,nameLen))

	if (count == env->used)		/* finished loop without match */
		env->used++;		/* added 1 more var to the env */
		MemFree(env->environ[count]);	/* don't need */

	env->environ[count] = envVar;

	/* make sure the last entry in the vector is NULL */
	env->environ[env->used] = (char *)NULL;


 *	putDisplayEnv - sets the DISPLAY env to the appropriate screen
static void
	Env	*env;
	Display	*dpy;
	int	screen;
	char	*display = DisplayString(dpy);
	char	*colon,*dot;
	char	value[128];
	int	len;

	if ((colon = strrchr(display,':')) == (char *)NULL) {
	if ((dot = strchr(colon,'.')) != (char *)NULL) {
		len = dot - display;
	} else {
		len = colon - display;



#ifndef NOSVENV
 *	putSunViewEnv - sets the various SV environment variables
static void
	Env	*env;
	Display *dpy;
	int	screen;
	static char	*svEnv[] = { "WINDOW_PARENT", 
				     "WINDOW_TTYPARMS" };
	int		i, svEnvLen = sizeof(svEnv)/sizeof(char *);
	char		*result,*curpos;
	unsigned long	nitems,remainder;
	extern void	*GetWindowProperty();
	extern Atom	AtomSunViewEnv;

	result = (char *)GetWindowProperty(dpy,RootWindow(dpy,screen),

	if (result == NULL)

	curpos = result;
	for (i=0; i<svEnvLen; i++) {
		curpos += strlen(curpos) + 1;
	XFree((char *)result);
#endif /* NOSVENV */

/* -----------------------------------------------------------------------
 *	Global Functions
 * -----------------------------------------------------------------------*/

 *	MakeEnviron - returns a new environment array that contains the
 *		      current environ plus a modified DISPLAY and
 *		      SunView environment variables.
char **
	Display	*dpy;
	int	screen;
	Env	newEnv;
	int	nadditions;

	nadditions = 1;		/* for DISPLAY */

#ifndef NOSVENV
	nadditions += 3;	/* for SV environment */
#endif /* NOSVENV */



#ifndef NOSVENV
#endif /* NOSVENV */

	return newEnv.environ;

--- End Message ---
--- Begin Message ---
Source: xview
Source-Version: 3.2p1.4-26

We believe that the bug you reported is fixed in the latest version of
xview, which is due to be installed in the Debian FTP archive:

  to main/x/xview/olvwm_4.4.3.2p1.4-26_amd64.deb
  to main/x/xview/olwm_3.2p1.4-26_amd64.deb
  to main/x/xview/xview-clients_3.2p1.4-26_amd64.deb
  to main/x/xview/xview-examples_3.2p1.4-26_amd64.deb
  to main/x/xview/xview_3.2p1.4-26.debian.tar.gz
  to main/x/xview/xview_3.2p1.4-26.dsc
  to main/x/xview/xviewg-dev_3.2p1.4-26_amd64.deb
  to main/x/xview/xviewg_3.2p1.4-26_amd64.deb

A summary of the changes between this version and the previous one is

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 617236@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
Ralf Treinen <treinen@debian.org> (supplier of updated xview package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)

Hash: SHA1

Format: 1.8
Date: Sun, 24 Jul 2011 20:58:09 +0200
Source: xview
Binary: xviewg xviewg-dev xview-clients xview-examples olwm olvwm
Architecture: source amd64
Version: 3.2p1.4-26
Distribution: unstable
Urgency: low
Maintainer: Debian QA Group <packages@qa.debian.org>
Changed-By: Ralf Treinen <treinen@debian.org>
 olvwm      - OpenLook virtual window manager
 olwm       - Open Look Window Manager
 xview-clients - XView client programs
 xview-examples - XView contrib programs
 xviewg     - XView shared libraries
 xviewg-dev - XView development tools
Closes: 411131 617211 617236 635154
 xview (3.2p1.4-26) unstable; urgency=low
   * QA upload
   * source format 3.0 (quilt):
     - add debian/source/format
   * Patch display_setting: fix setting of the DISPLAY variable in case
     the original value did not contain a screen number. Thanks a lot to
     Alan Braslau for submitting the patch! (closes:  #617236, #635154)
   * debian/ol[v]wm.postinst: replace /usr/X11R6/man -> /usr/share/man,
     /usr/bin/x11 -> /usr/bin (closes: #411131,  #617211)
   * debian/control: added ${misc:Depends} to Depends field of all packages
 962742d6cc9799afa56c2821d25297312e4998c0 1268 xview_3.2p1.4-26.dsc
 b49e8e5e3f329fb893968a0b7037f253d22162f5 96470 xview_3.2p1.4-26.debian.tar.gz
 129d2c90a0e0d0a209a1f9a25baaeb10b4692d95 788370 xviewg_3.2p1.4-26_amd64.deb
 eed149f455ffad83fa21b8c70e988010cce84ca7 1158664 xviewg-dev_3.2p1.4-26_amd64.deb
 b69d8716f02491e890101fc36fac43b29f7423c2 74790 xview-clients_3.2p1.4-26_amd64.deb
 33d5300c8ed1e9063729b72884ba08c32d08c811 263978 xview-examples_3.2p1.4-26_amd64.deb
 6125d984f4e0348eaddf81ac2878e44731003674 161862 olwm_3.2p1.4-26_amd64.deb
 d8721f8f85c6d494c8cc1f0c19d9627bdac299fb 231334 olvwm_4.4.3.2p1.4-26_amd64.deb
 41b72d87489ba224f0937b1345d3b590e1639dd018260655d70eb2def3019d6a 1268 xview_3.2p1.4-26.dsc
 b9e0c518f6ab0cdff9cb0acb4b11df878fd9e9ea24255e6846e77a8531e86b71 96470 xview_3.2p1.4-26.debian.tar.gz
 e6df09fc42f46c7f81576c46d5363b181726be522f99286f6a8d7ac87ec5368d 788370 xviewg_3.2p1.4-26_amd64.deb
 a05ad72f9a5b135e669422a7c544bfff9d0970471290734ec84c3ab868f2e7eb 1158664 xviewg-dev_3.2p1.4-26_amd64.deb
 87e15903d2afd69dba724d9a6fca46eeb74b38988be74933a1441380384739b1 74790 xview-clients_3.2p1.4-26_amd64.deb
 0cecadd022f58a81aced138611dac991b8aa8a0998892339212cf7add2da90cb 263978 xview-examples_3.2p1.4-26_amd64.deb
 bf82b8666a4084f215046a6a388a5871daee36c0aafa6ee2374ed4fb7b7c80b9 161862 olwm_3.2p1.4-26_amd64.deb
 782310ddb62dfe3521ac9ecf0b6df2f6c29ad46de796303657b257f743a49728 231334 olvwm_4.4.3.2p1.4-26_amd64.deb
 337eb798766bfe25a85935454a17c6e6 1268 x11 optional xview_3.2p1.4-26.dsc
 d11a245a95d677265f252ddf10a4461e 96470 x11 optional xview_3.2p1.4-26.debian.tar.gz
 a18c3b967f73044bf3b546098f5a7d90 788370 x11 optional xviewg_3.2p1.4-26_amd64.deb
 35730cd803d98bff14f85f8fa0e52f8e 1158664 devel optional xviewg-dev_3.2p1.4-26_amd64.deb
 67829548f9dfdc1b97c7f87663b711d0 74790 x11 optional xview-clients_3.2p1.4-26_amd64.deb
 23f76d4ec3e497d0aef26de8c3c4346d 263978 x11 optional xview-examples_3.2p1.4-26_amd64.deb
 14bbfb10d8bddef994e84fdd83a3c615 161862 x11 optional olwm_3.2p1.4-26_amd64.deb
 3e93fca1d8f8ad6b4c465562a85e30cc 231334 x11 optional olvwm_4.4.3.2p1.4-26_amd64.deb

Version: GnuPG v1.4.11 (GNU/Linux)


--- End Message ---

Reply to: