Subject: FVWM: Help with Xinerama support

From: [email-masked]
Date: Thu, 25 Apr 2002 21:56:39 -0700 (PDT)

I have just started using a dual head setup, and I clearly don't grok how to
take advantage of xinerama support in fvwm2.  I'm hoping for some help from
you kind folk.

Attached below are my .xinitrc, .Xresources, .fvwm2rc and some other fvwm2
config files.  My setup is a striped down and lightly modified version of the
sample provided in the fvwm2 setup.  I am using fvwm2 version 2.4.6.

So far the only effect of using Xinerama on vs. Xinerama off that I can see is
the Buttons and Mini-buttons are on screen 2 with Xinerama on and on screen 1
with Xinerama off.  I have not been able to avoid the problem of windows
poping up split between the two screens, nor have I been able to affect the
placement of windows using the geometry@screen construct mentioned in the man
page.  In particular I have not been able to use this successfully to specify
where either the Buttons or MiniButtons should be placed.  Another example -
on the root window menu I have the entry

+ "Emacs %mini-edit.xpm%"               Exec exec emacs  -geometry 85x60@p

but that @p or any variation I try has no apparent effect.

Another Xinerama issue that may have nothing to do with fvwm: right now I
display a picture of the earth from space as the backdrop on my root window
using xloadimage, and at the moment it is just split across the two screens.
I would really like to have two different images on the two screens, but don't
see any easy way to do that.

Thank you for any help.

-- Bob

## .xinitrc
#!/bin/sh

if [ -f $HOME/.Xresources ]
then
	/usr/bin/X11/xrdb $HOME/.Xresources
fi

xset bc
xset fp rehash
xloadimage -center -onroot /usr/local/X11/images/earth2.gif &
emacs -geometry 80x60+15+15 &
xterm -geometry 85x32+15+1030 &
exec fvwm2

===============================================================================

! emacs, xemacs

Emacs*background:                       Gray80
Emacs*borderColor:                      SteelBlue
Emacs*cursorColor:                      DarkRed
Emacs*font: -b&h-lucidatypewriter-bold-r-normal-sans-*-140-75-75-m-90-iso8859-15
Emacs*foreground:                       DarkRed
Emacs*height:                           60
Emacs*menu-bar-lines:                   0
Emacs*mouseColor:                       Blue
Emacs*pointerColor:                     Red
Emacs*region.attributeBackground:       Blue
Emacs*region.attributeForeground:       Yellow
Emacs*width:                            85

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! xterm (and friends)

XTerm*highlightSelection:  true
! Uncomment this to use color for the bold attribute
XTerm*VT100*colorBDMode:  on
XTerm*VT100*colorBD:  blue
! Uncomment this to use color for underline attribute
XTerm.VT100*colorULMode:  on
XTerm.VT100*underLine:  off
XTerm*VT100*colorUL:  magenta
! Uncomment this to display the scrollbar 
XTerm*scrollBar:  true

! This resource specifies whether or not to ignore the 'alternate screen'
! of applications such as vi.  When it is on, these applications will restore
! the contents of the screen when they are exited to what they were before
! they were started.  When it is off, the contents of vi will remain on the
! screen after the program is quit.
XTerm.VT100.titeInhibit:  true

! Uncomment this to turn off color mode in your xterms
!XTerm.VT100*colorMode:  off
XTerm.VT100*dynamicColors:  on

! Number of lines of scrollback to save
XTerm*saveLines:	1500

xterm*reverseWrap:	true

*visualBell:		true
*scrollTtyOutput:	False
*scrollKey:		True
Scrollbar.JumpCursor:	True

! Suppr support.
*VT100.Translations: #override \
<Key>BackSpace: string(0x7F)\n\
<Key>Delete: string("\033[3~")\n\
<Key>Home: string("\033[1~")\n\
<Key>End: string("\033[4~")

==============================================================================

# .fvwm2rc
# Robert L. Knighten
# 4 April 2002
#
######################  SET UP THE MAJOR OPERATING MODES  #####################
Style "*" NoIcon
Style "*" MWMFunctions
Style "*" HintOverride
Style "*" MWMDecor

# XineramaPrimaryScreen 1
# Xinerama off

#########################  BEHAVIOR AT EDGE OF PANES  #########################
OpaqueMoveSize 100
EdgeResistance 250 10
EdgeScroll 0 0
ClickTime 750

#############################  VIRTUAL DESK TOP  ##############################
DeskTopSize 2x2

ColorMapFocus FollowsMouse

Xinerama

#######  IMAGE PATH - A COLON-SEPARATED LIST FOR ICONS, PIXMAPS, ETC.  #######
ImagePath /usr/local/X11/pixmaps:/usr/X11R6/include/X11/pixmaps/:\
          :/usr/share/pixmaps/:

###############################  DEFAULT STYLES  ##############################
Style "*" Font -adobe-helvetica-bold-r-*-*-12-*-*-*-*-*-*-*
Style "*" IconFont fixed
Style "*" HilightFore white, HilightBack lightgrey
Style "*" BorderWidth 5, HandleWidth 5
Style "*" MWMFunctions, MWMDecor, HintOverride
Style "*" DecorateTransient, NoPPosition
Style "*" IconBox 0 -10 -280 -1
Style "*" FocusFollowsMouse
Style "*" TileCascadePlacement

# Styles for various Fvwm modules:
Style "Fvwm*"       NoTitle, Sticky, WindowListSkip
Style "Fvwm*"       BorderWidth 2, CirculateSkipIcon, CirculateSkip
Style "FvwmPager"   StaysOnTop, NoHandles
Style "FvwmBanner"  StaysOnTop
Style "FvwmButtons" NoTitle, NoHandles, Sticky, WindowListSkip, BorderWidth 5

#
# Some simple default key bindings
#
Key Next         A       SCM     Next [*] Focus
Key Prior        A       SCM     Prev [*] Focus

# Some simple default mouse bindings
#
#   For the root window
Mouse 1 R       A       Menu MenuFvwmRoot Nop
Mouse 2 R       A       Menu MenuFvwmWindowOps Nop
Mouse 3 R       A       WindowList
#
#   For the title bar buttons
Mouse 0 1       A       Menu MenuFvwmWindowOps2 Close
Mouse 0 2       A       FuncFvwmMaximize
Mouse 0 4       A       Iconify
#
#   For other parts of the window/borders/icons
Mouse 1 F       A       FuncFvwmResizeOrRaise
Mouse 1 TS      A       FuncFvwmMoveOrRaise
Mouse 1 I       A       FuncFvwmMoveOrIconify
Mouse 2 I       A       Iconify
Mouse 2 FST     A       Menu MenuFvwmWindowOps2 Nop
Mouse 3 TSIF    A       RaiseLower

######################## Initialization Functions ############################
AddToFunc StartFunction
+ I Module FvwmAnimate
+ I Module FvwmButtons

AddToFunc InitFunction
+ "I" Module FvwmButtons MiniButtons

AddToFunc "RestartFunction"
+ "I" Module FvwmButtons MiniButtons

# For some SM-s (like gnome-session) there is an internal background setter.
AddToFunc SessionInitFunction
+ I Nop

###################################  Menus  ##################################

#>>> ROOT MENU <<<<#
DestroyMenu MenuFvwmRoot
AddToMenu MenuFvwmRoot  "Root Menu"             Title
+ "Emacs %mini-edit.xpm%"               Exec exec emacs  -geometry 85x60@p
+ "Xterm %mini-term.xpm%" 	        Exec exec xterm -sb  -sl 500 -rw 
+ "Large Font Xterm %mini-term.xpm%" 	Exec exec xterm -sb -sl 500 -j -ls
+ ""					    	Nop
+ "Applications"      Popup Applications
+ "Accessories"       Popup Accessories
+ "Other Login"       Popup MenuFvwmLogins
+ "Fvwm Window Ops"   Popup MenuFvwmWindowOps
+ "Fvwm Utilities"    Popup FvwmUtilities
+ ""                        Nop
+ "Refresh Screen %mini-ray.xpm%"       Refresh
+ "Restart Fvwm %mini-turn.xpm%"	Restart
+ "Quit  fvwm? %mini-stop.xpm%" Popup   Quit-Verify

#>>>> APPLICATIONS <<<<#
DestroyMenu MenuFvwmApplications
AddToMenu Applications     "Applications" Title
+ "Acrobat"                       Exec exec acroread
+ "GhostView %mini-gv.xpm%"       Exec exec gv
+ "NcFTP %mini-ftp.xpm%"          Exec xterm -name NcFtp -T FTP -ls -fn 7x14 -e ncftp
+ "Netscape %mini-nscape.xpm%"    Exec exec netscape
+ "Opera %opera.xpm%"             Exec exec opera
+ "XTerm"                         Exec exec xterm
+ "Xfractint %mini-fractal.xpm%"  Exec exec xterm -font 7x14 -e xfractint map=chroma
+ "Xpdf %mini-pdf.xpm%"           Exec exec xpdf
+ "Xv %mini-xv.xpm%"              Exec exec xv

#>>>> ACCESSORIES <<<<#
DestroyMenu "Accessories"
AddToMenu "Accessories"
+ "Font viewer (xfontsel) %mini-font.xpm%"  Exec exec xfontsel
+ "Color viewer (gcolorsel)"                Exec exec gcolorsel

#>>>> WINDOW OPERATIONS <<<<#

# There are 2 versions of the WindowOps Menu, meant to be bound to different
# things.  The common part, used in the two menus below, is:
DestroyFunc FuncFvwmWindowCommon
AddToFunc FuncFvwmWindowCommon
+ I AddToMenu $0 "&Move %mini-move.xpm%"     Move
+ I AddToMenu $0 "&Resize %mini-resize.xpm%"  Resize
+ I AddToMenu $0 "R&aise %mini-raise.xpm%"    Raise
+ I AddToMenu $0 "&Lower %mini-lower.xpm%"    Lower
+ I AddToMenu $0 "(De)&Iconify"               Iconify
+ I AddToMenu $0 "(Un)&Stick"                 Stick
+ I AddToMenu $0 "(Un)Ma&ximize %mini-max1.xpm%" Maximize
+ I AddToMenu $0 ""                 Nop
+ I AddToMenu $0 "&Delete %mini-cross.xpm%"   Delete
+ I AddToMenu $0 "&Close"                     Close
+ I AddToMenu $0 "Destroy %mini-bomb.xpm%"    Destroy
+ I AddToMenu $0 ""                 Nop

# First windowops menu, bound to mouse 2 on root

DestroyMenu MenuFvwmWindowOps
AddToMenu MenuFvwmWindowOps     "Window Operations"    Title
+ "Switch to..."                WindowList
FuncFvwmWindowCommon MenuFvwmWindowOps
+ "Refresh Screen %mini-ray.xpm%" Refresh
+ "Re&fresh Window" RefreshWindow

# Second windowops menu, bound to:
# any mouse on titlebar button 1
# mouse 2 on frame, side or titlebar
DestroyMenu MenuFvwmWindowOps2
AddToMenu MenuFvwmWindowOps2
FuncFvwmWindowCommon MenuFvwmWindowOps2
+ Scroll&Bar       Module FvwmScroll 2 2

#
# A trimmed down version of "Window Ops", good for binding to decorations
#
AddToMenu "Window-Ops2" "&Restore"        Iconify -1
+                       "&Move"           Move-or-Raise
+                       "&Size"           Resize-or-Raise
+                       "Mi&nimize"       Iconify 1
+                       "Ma&ximize"       Maximize 100 100
+                       ""                Nop
+                       "&Kill"           Destroy
+                       "&Close	Alt+F4"   Delete

#                         >>>>> FVWM UTILITIES <<<<<
DestroyMenu FvwmUtilies
AddToMenu FvwmUtilities "FVWM Utilities" Title
+ "Load my  Xresources"  Exec exec xrdb -load $HOME/.Xresources

##################################################################

#
# This menu is invoked as a sub-menu - it allows you to quit,
# restart, or switch to another WM.
#
DestroyMenu "Quit-Verify"
AddToMenu "Quit-Verify" "Really Quit Fvwm?" Title
+ "Yes, really quit!" Quit
+ "No, just restart an Xterm"    Restart xterm -n '"X Console"' -T '"X Console"'
+ "No, don't quit"   Nop

###########################  FUNCTION DEFINITIONS  ###########################
DestroyFunc FuncFvwmMoveOrRaise
AddToFunc FuncFvwmMoveOrRaise
+ I Raise
+ M Move
+ D Lower

DestroyFunc FuncFvwmMaximize
AddToFunc FuncFvwmMaximize
+ M Maximize   0 100
+ H Maximize   0 100
+ C Maximize   0  80
+ D Maximize 100 100

DestroyFunc FuncFvwmMoveOrIconify
AddToFunc FuncFvwmMoveOrIconify
+ I Raise
+ M Move
+ D Iconify

DestroyFunc FuncFvwmResizeOrRaise
AddToFunc FuncFvwmResizeOrRaise
+ I Raise
+ M Resize
+ D Lower

DestroyFunc FuncFvwmFocusPolicyChange
AddToFunc FuncFvwmFocusPolicyChange
+ I Style * $0
+ I Recapture

######################  READ CONFIG FILES FOR MODULES  ######################
read ConfigFvwmIconMan
read ConfigFvwmButtons
read ConfigFvwmMiniButtons
read ConfigFvwmPager
read ConfigFvwmWinList

##############################  End of .fvwm2rc  ##############################

==============================================================================

########################## Icon Manager ####################################
# this FvwmIconMan setup is for swallowing in button bar example
DestroyModuleConfig FvwmIconMan: *
*FvwmIconMan: *numManagers 1
*FvwmIconMan: *Resolution  page
*FvwmIconMan: *background  bisque3
*FvwmIconMan: *foreground  black
*FvwmIconMan: *font        7x13bold
*FvwmIconMan: *format      "%t"
*FvwmIconMan: *action      Mouse   1 N sendcommand Focus, sendcommand "Iconify"
*FvwmIconMan: *action      Mouse   2 N sendcommand "Iconify 1"
*FvwmIconMan: *action      Mouse   3 N sendcommand "FvwmIdent"
*FvwmIconMan: *followfocus true
*FvwmIconMan: *sort        none
*FvwmIconMan: *iconbutton          up black white
*FvwmIconMan: *plainbutton          up black bisque3
*FvwmIconMan: *selectbutton         down black bisque3
*FvwmIconMan: *focusbutton          up yellow firebrick
*FvwmIconMan: *focusandselectButton down yellow firebrick
*FvwmIconMan: *dontshow icon=Untitled resource=Untitled
#*FvwmIconMan: *drawicons true
*FvwmIconMan: *buttongeometry  300x0
*FvwmIconMan: *managergeometry 1x5

==============================================================================

################## FvwmButtons button-bar ##############################
*----------------*---------*-----------*
*                *         *           *
*  FvwmIconMan   *  xload  *   Pager   *
*                *         *           *
*----------------*---------*-----------*

KillModule FvwmButtons
DestroyModuleConfig FvwmButtons: *
*FvwmButtons: Geometry 470x100-1-1@2
*FvwmButtons: Back bisque3
*FvwmButtons: (Frame 2, Padding 2 2, Container(Rows 2 Columns 9 Frame 1 Padding 10 0))
*FvwmButtons: (4x2, Frame 2, Swallow "FvwmIconMan" "Module FvwmIconMan")
*FvwmButtons: (3x2, Frame 0, Container(Rows 2 Columns 2 Frame 0))
*FvwmButtons: (3x2, Frame 2, Swallow(UseOld,NoHints,Respawn) "xload" `Exec exec xload -bg bisque3 -fg black -update 5 -nolabel`)
*FvwmButtons: (End)
*FvwmButtons: (2x2, Frame 2, Swallow(UseOld) "Inline" "Module FvwmPager Inline 0 0")
*FvwmButtons: (End)

DestroyModuleConfig Inline: *
*Inline: Rows 1
*Inline: Columns 1
DestroyModuleConfig FvwmPagerSubPanel: *
*FvwmPagerSubPanel: Rows 5
*FvwmPagerSubPanel: Columns 1

==============================================================================

###############################  MiniButtons  ###############################
Style "MiniButtons"  NoTitle,NoHandles,Sticky,WindowListSkip,BorderWidth 0

*MiniButtonsFore Black
*MiniButtonsBack #c0c0c0
*MiniButtonsFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
*MiniButtonsGeometry -5-115@p
*MiniButtonsRows 1
*MiniButtonsPadding 1 1

*MiniButtons -   opera.xpm            Exec exec opera
*MiniButtons -   mini-nscape.xpm      Exec exec netscape -geometry 790x543+0+0
*MiniButtons -   mini-term.xpm        Exec exec xterm -ls -sb -fn lucidasanstypewriter-bold-14 -bg peachpuff -title "XTerm"
*MiniButtons -   mini-edit.xpm        Exec exec emacs
*MiniButtons -   mini-gv.xpm          Exec exec gv
*MiniButtons -   mini-xv.xpm          Exec exec xv
*MiniButtons -   mini-bomb.xpm        Destroy

==============================================================================

########################### Pager #########################################
DestroyModuleConfig FvwmPager: *
*FvwmPager: Back #908090
*FvwmPager: Fore #484048
#*FvwmPager: Font -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
# turn off desktop names for swallowing in above button bar example:
*FvwmPager: Font none
*FvwmPager: Hilight #cab3ca
*FvwmPager: Geometry -1-1
*FvwmPager: Label 0 Misc
*FvwmPager: SmallFont 5x8
*FvwmPager: Balloons            All
*FvwmPager: BalloonBack         Yellow
*FvwmPager: BalloonFore         Black
*FvwmPager: BalloonFont         lucidasanstypewriter-12
*FvwmPager: BalloonYOffset      +2
*FvwmPager: BalloonBorderWidth  1
*FvwmPager: BalloonBorderColor  Black

==============================================================================

##########################FvwmWinList##################################
DestroyModuleConfig FvwmWinList: *
*FvwmWinList: Back #908090
*FvwmWinList: Fore Black
*FvwmWinList: Font -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
*FvwmWinList: Action Click1 Iconify false, Focus
*FvwmWinList: Action Click2 Iconify toggle
*FvwmWinList: Action Click3 Module FvwmIdent
*FvwmWinList: UseSkipList
*FvwmWinList: Geometry +0-1

==============================================================================

--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
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].