Subject: FVWM: Color map hassles

From: Paul Provost <[email-masked]>
Date: Thu, 25 Sep 1997 15:42:45 GMT

Hi guys,
    I'm currently using fvwm2 2.0.46 under Irix 6.2.  I'm having some
color map problems and some resources problems.  Once in a while,
programs will complain about not being able to allocate colors.  Now,
i'm a novice as far as color map management goes.  What could be wrong
here?

    I'm having some problems with individual apps as well.  xpaint,
for example,will not start and complains in the following manner:

X Error of failed request:  BadDrawable (invalid Pixmap or Window parameter)
  Major opcode of failed request:  14 (X_GetGeometry)
  Resource id in failed request:  0x0
  Serial number of failed request:  626
  Current serial number in output stream:  626

Whassup?  I _love_ the configurability in fvwm2, and I can always pop
back to 4Dwm, but I'd like to find out what's happening...

Confused...

Paul Provost
[email-masked]
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Martin Cartwright <[email-masked]>
Date: Thu, 25 Sep 1997 16:56:49 +0100 (BST)

On Thu, 25 Sep 1997, Paul Provost wrote:

->
->Hi guys,
->    I'm currently using fvwm2 2.0.46 under Irix 6.2.  I'm having some
->color map problems and some resources problems.  Once in a while,
->programs will complain about not being able to allocate colors.  Now,
->i'm a novice as far as color map management goes.  What could be wrong
->here?
->
->    I'm having some problems with individual apps as well.  xpaint,
->for example,will not start and complains in the following manner:
->
->X Error of failed request:  BadDrawable (invalid Pixmap or Window parameter)
->  Major opcode of failed request:  14 (X_GetGeometry)
->  Resource id in failed request:  0x0
->  Serial number of failed request:  626
->  Current serial number in output stream:  626
->
->Whassup?  I _love_ the configurability in fvwm2, and I can always pop
->back to 4Dwm, but I'd like to find out what's happening...

I guess you have a 256-colour display? 

Basically the problem is that you can only have 256 unique colours on
screen at any one time and you've reached that limit. You're starting
up programs that require additional colours. Because you've reached
the limit they complain and insome cases crash out with the above
message. (the invalid pixmap parameter being a particular colour
specification) 

The colour map is most likely being used up by all your icons and
decorations for your window manager, and netscape. The latter is
solved by running netscape with the -install option so that it uses a
separate private colour-map. The former is solved by cutting down on
the number of colours used by your icons and window decor. Sadly the
simple rule of thumb is that the cooler something looks, the more
colours it uses. 

my setup currently uses about half the available colour entries on
start-up but still looks pretty cool... ;)

Oh and try and find a utility called availcols which tells you how
many colours you have left. 

Cheers,

Martin

[email-masked] --- http://star.pst.qub.ac.uk/~imc/vom.htm
-/-------------------------------------------------------------\-
|    "Sponges grow in the ocean ... I wonder how much deeper    |
|          the ocean would be if that didn't happen."           |
-\-------------------------------------------------------------/-

---

From: Eric Brandwine <[email-masked]>
Date: Thu, 25 Sep 1997 12:09:48 -0400 (EDT)

> i'm a novice as far as color map management goes.  What could be wrong
What a can of worms to open.  SGI did a lot of nice(nasty) things to their
X server.  A lot of non-SGI apps just do not play well with it.

SGI allows multiple hardware colormaps.  That is, just like when you are
running on a Sun with 8 bit graphics, and the color map flashes when you
enter/leave a window, the SGI allows windows to have their own private
PseudoColor colormaps.  However, on an SGI, it is possible to have several
different color maps installed simultaneously on different windows.  It is
possible to run out of private hardware colormaps, and that might be what
you are doing.

A lot of X programs require read/write color cells, for which PseudoColor
visuals are bets.  However, many were written by folks who did not have
access to anything but PseudoColor, so that is what they use by default,
even though DirectColor of TrueColor are better suited for the
application.  xdpyinfo will tell you what visuals your server supports
(many in this case), and what the default visual is.  Perhaps some of your
applications are taking up a PseudoColor visual when they should be run
DirectColor.  Many have a -visual command line flag.  You may have to read
some man pages....

>   Current serial number in output stream:  626
I just ran xpaint under Fvwm-2.0.45 on an Irix 6.2 Indy, no problems.  It
did complain that the default visual was only 8 bits deep though.

On another note though, I find that ImageMagick and the GIMP work much
better than xpaint, with a better interface and more features.  If you
have a 6.2 box, then you definitely have a machine capable of running
them.

Hope this helps...

Eric Brandwine
[email-masked]

---

From: "R. N. Cross" <[email-masked]>
Date: Fri, 26 Sep 1997 12:34:22 +0100

> back to 4Dwm, but I'd like to find out what's happening...

I had similar problems but then applied the colorLimit patch which
worked very well - I have it set to a limit of 17 which leaves just
enough as long as I start up some applications in a certain order so
they don't grab all my remaining colours!!

Nick

---

From: Cliff Trapp <[email-masked]>
Date: Fri, 26 Sep 1997 07:16:33 -0700 (MST)

I recently set up fvwm2 on my Sparc 10 running Solaris 2.5.1.
(fvwm2.046)
First I compiled and installed xpm, and then fvwm2. I now have a fairly
crude desktop that I am trying to customize. I also installed 
TKGoodStuff and it looks good but most of the icons don't do 
anything. I think most of the .tkgrc was borrowed from someone who was
on a PC. At any rate, I am having the following issues:

When I exit fvwm, it kills the window manager, but does not exit me from
my session.

The background that I set manually with xpmroot needs to start up
automatically when I login.

I exit by finding all my processes and killing them.

How do I configure FvwmButtons?

How do I change the background colors for FvwmPager?

TIA for any pointers.

Cliff Trapp        * [email-masked]
****************************************************************

---

From: Bruce Stephens <[email-masked]>
Date: Fri, 26 Sep 1997 15:34:35 +0100

[email-masked] said:
> When I exit fvwm, it kills the window manager, but does not exit me 
> from my session. 

Your session should end when the xinit ends, which will be when the script 
~/.xinitrc or ~/.xsession finishes.  Generally, the script does some 
configuration (xrdb, etc.), perhaps launches some utilities in the background, 
and then executes a window manage in the foreground.  When that process 
finishes, the X server should shut down.  Some people run a window manager in 
the background and use some other process to terminate the session, like a 
console window or just an ordinary xterm.

> automatically when I login. 

You can do that in .xinitrc/.xsession, or in the initialisation functions in 
.fvwm2rc.

> I exit by finding all my processes and killing them. 

This shouldn't be necessary: there's something wrong.  Exiting one process 
(whichever is last launched from .xinitrc/.xsession) should be sufficient.

---

From: "Gerald John Lapeyre, Jr." <[email-masked]>
Date: Fri, 26 Sep 1997 11:15:01 -0700 (MST)

> When I exit fvwm, it kills the window manager, but does not exit me from
	Try making your own .xinitrc or .xsession file with no & after the
fvwm2 command

Other commands go in the file ~/.fvwm2rc

> automatically when I login.
	command :
	Exec xpmroot pic.xpm	

> How do I change the background colors for FvwmPager?
  Read  'man Fvwm(whatevermodule)' and put the appropriate lines in
.fvwm2rc
  Also 'man fvwm2' while you are at it.
  Good luck

G John Lapeyre <[email-masked]>
Tucson,AZ     http://www.physics.arizona.edu/~lapeyre

---

From: Cliff Trapp <[email-masked]>
Date: Fri, 26 Sep 1997 11:29:02 -0700 (MST)

> 	Try making your own .xinitrc or .xsession file with no & after the

Thanks everyone. Ordinarily I could edit either one of those, but I am
running CDE which is either misconfigured or configured NOT to use either
my own .xinitrc or my .xsession. I start up fvwm by the following entry
in my .Xdefaults file:

Dtsession*wmStartupCommand:   /usr/openwin/bin/xview/fvwm2

I ought to be able to reconfigure it work, I used to get along fairly well
before CDE came along. However, after poking around with sessionlogging in
my .dtprofile, and nosing around in /usr/dt/bin/Xsession, as well as in
/etc/dt/config, I am not much better off.

I moved my .dt directory out of the way, and it keeps coming back, another
blessing of running CDE I suppose.

Should I get out of the CDE environment, and install the X11R6, (I realize
CDE is based on X11R6) or ...?

TIA again.

---

From: Jim Searle <[email-masked]>
Date: Fri, 26 Sep 1997 11:51:52 -0700 (PDT)

>>>>> "Cliff" == Cliff Trapp <[email-masked]> writes:

    Cliff> Thanks everyone. Ordinarily I could edit either one of those, but I am
    Cliff> running CDE which is either misconfigured or configured NOT to use either
    Cliff> my own .xinitrc or my .xsession. I start up fvwm by the following entry
    Cliff> in my .Xdefaults file:

    Cliff> Dtsession*wmStartupCommand:   /usr/openwin/bin/xview/fvwm2

In that case you need to tell CDE to log out with the command.
/usr/dt/bin/dtaction ExitSession

At least that's how it works on HP-UX...

You'll probably want this to your .Xdefaults, which was suggested by
someone on this list:
*waitWmTimeout: 1

Also, to make it easier to debug fvwm I have one line script:
#!/bin/csh
exec /usr/local/X11/bin/fvwm2 >&$HOME/.fvwm2log

And I set the wmStartupCommand to that script, otherwise the std/err out is
lost from fvwm.

later,
jim

---

From: John Plocher <[email-masked]>
Date: Fri, 26 Sep 1997 14:51:27 -0700 (PDT)

>> CDE is based on X11R6) or ...?

In the CDE environment the following  user created files do the trick for me -
and allow me to use the sessions menu on the dtlogin screen to switch between
them as desired.  I'll show you the fvwm95 setup I use; the changes for
another window manager should be obvious :-)

You should also be able to create your own .xinitrc and .xsession files; try
selecting the openwindows session from the dtlogin screen and see if that
enables the system to see your $HOME/.* files...

And, no, I don't work in the CDE or windows groups...

   -John

	/etc/dt/config/C/Xresources.d/Xresources.fvwm95
	/etc/dt/appconfig/icons/C/fvwm2logo.pm
	/etc/dt/appconfig/icons/C/fvwm2logo.bm
	/etc/dt/config/Xinitrc.fvwm95
	/etc/dt/config/Xsession.fvwm95
	/etc/dt/config/Xsession.fvwm95-2

An explanation of each:
::::::::::::::
/etc/dt/config/C/Xresources.d/Xresources.fvwm95
::::::::::::::
	!!######################################################################
	!!   Xresources.fvwm95
	!!######################################################################
	!!  This file used by the Solaris Desktop Login manager
	
	Dtlogin*altDtsIncrement:        True
	Dtlogin*altDtName:     		fvwm95 Desktop
	Dtlogin*altDtKey:       	/opt/X11/bin/fvwm95
	Dtlogin*altDtStart:     	/etc/dt/config/Xsession.fvwm95
	Dtlogin*altDtLogo:      	fvwm2logo
	!! End of Xresources file

	For each new window manager session configuration you want, 
	create another template file in
		/etc/dt/config/C/Xresources.d/
	with a unique name of the form "Xresources.$unique_tag"  The unique_tag
	is arbitrary and is only to alphabetize/order the entries found there.

	The property names:

	Dtlogin*altDtsIncrement:	Always leave set to "True"
	Dtlogin*altDtName:		The title displayed on the session menus
					and startup splash screen
	Dtlogin*altDtKey:		The name of a file, that if it exists,
					enables this session to be shown as
					a choice to the user.  If this file
					is not found, the choice is not shown
					on the session menu.
					This lets you predefine many session
					types, even if the  software to support
					them isn't installed on a particular
					system.
	Dtlogin*altDtStart:		The startup script for this session.
					This script is shown below, and needs
					to be customized to start the right
					window manager ...
	Dtlogin*altDtLogo:		The name of a logo to display on the
					dtlogin screen when this session is
					chosen.

::::::::::::::
/etc/dt/appconfig/icons/C/fvwm2logo.pm
/etc/dt/appconfig/icons/C/fvwm2logo.bm
::::::::::::::
	The color and monochrome logo pictures used by Dtlogin*altDtLogo
	above...

::::::::::::::
/etc/dt/config/Xinitrc.fvwm95
::::::::::::::
	#####################################################################
	###  File:              Xinitrc.fvwm95
	###  Default Location:  /etc/dt/config/Xinitrc.fvwm95
	###  Purpose:           fvwm95 session start script
	###  Invoked by:        /usr/dt/config/Xsession.fvwm95-2
	#####################################################################
	
	if [ -f $HOME/.Xdefaults ]; then
	    xrdb -merge $HOME/.Xdefaults        # Load Users X11
						# resource database
	fi
	
	$OPENWINHOME/lib/openwin-sys            # OpenWindows system
						# initialization
	
	eval `locale_env -env`                  # Set Locale Environment
		
	/opt/X11/bin/fvwm95 & wmpid=$!          # Start your favorite
						# Window Manager here
	dsdm &                                  # OpenLook Drop Site Database
	
	wait $wmpid                             # Wait for wm to exit
	
::::::::::::::
/etc/dt/config/Xsession.fvwm95
::::::::::::::
	#!/bin/ksh 
	#####################################################################
	###  File:              Xsession.fvwm95
	###  Default Location:  /etc/dt/config/Xsession.fvwm95
	###  Purpose:           fvwm95 session start script
	###  Invoked by:        Solaris Desktop Login Manager (dtlogin)
	#####################################################################
	
	DTDSPMSG=/usr/dt/bin/dtdspmsg
	
	if [ -z "$SESSIONTYPE" ]; then
	        export SESSIONTYPE="altDt"
	fi
	
	if [ -z "$DTSTARTIMS" ]; then
	        export DTSTARTIMS="False"
	fi
	
	if [ -z "$SDT_ALT_SESSION" ]; then
	        export SDT_ALT_SESSION="/etc/dt/config/Xsession.fvwm95-2"
	fi
	
	if [ -z "$SDT_ALT_HELLO" ]; then
	     export SDT_ALT_HELLO
	     SDT_ALT_HELLO="/usr/dt/bin/dthello -bground turquoise4 \
		-string 'Starting the fvwm95 Desktop' &"
	  fi
	fi
	
	export SDT_NO_DSDM=""
	
	/usr/dt/bin/Xsession
	
::::::::::::::
/etc/dt/config/Xsession.fvwm95-2
::::::::::::::
	#!/bin/ksh 
	#####################################################################
	###  File:              Xsession.fvwm95-2
	###  Default Location:  /etc/dt/config/Xsession.fvwm95-2
	###  Purpose:           FVWM-95 Desktop start script
	###  Invoked by:        /usr/dt/bin/Xsession
	#####################################################################
	
	# First a little namespace cleanup of vars associated with this
	# (and /etc/dt/bin/Xsession.fvwm95) scripts.
	unset SDT_ALT_SESSION
	unset SDT_ALT_HELLO
	unset SDT_NO_DSDM
	#
	# Find "xinitrc" file by standard precedence rules and start 
	# the user's OpenWindows Desktop.
	#
	DEFAULT_XINITRC="/etc/dt/config/Xinitrc.fvwm95"
	HOME_XINITRC="$HOME/.xinitrc"
	PATH=/usr/dt/bin:$PATH:/usr/openwin/bin:/opt/X11/bin
	
	if [ -z "$XINITRC" ]; then
	    if [ -f $HOME_XINITRC ]; then
	        XINITRC=$HOME_XINITRC
	    else
	        XINITRC=$DEFAULT_XINITRC
	    fi
	fi
	
	echo "fvwm95 Desktop Login"
	
	if [ -f $XINITRC ]; then
	    echo "using xinitrc file: $XINITRC"
	    /bin/ksh $XINITRC
	else
	    echo "xinitrc file: $XINITRC not found"
	    if [ -f $DEFAULT_XINITRC ]; then
	        echo "using xinitrc: $DEFAULT_XINITRC"
	        /bin/ksh $DEFAULT_XINITRC 
	    fi
	fi

---

From: Wesley Hart <[email-masked]>
Date: Fri, 26 Sep 1997 16:57:56 -0500

And Cliff Trapp spake, saying:
> my own .xinitrc or my .xsession. 

I missed what OS you're running on, but I know that under the HPUX
CDE you can create a two-line file called ~/.dtprofile containing:

<blank line>
SESSIONTYPE=xdm

And it will pass control to your .xsession after you log in.  Give it
a try, perhaps it will work on your system.

-- 
Wesley Hart
		"The skill of accurate perception is called
		 cynicism by those who don't possess it."
					-- Alan Millar
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].