Button too tall. How to locate error?

Hi all.
I use a slightly modified standard config with RightPanel. But In .xsession-errors appears errors which are listed below. How do I locate where are these errors? What does it mean Button=509520 num_rows=2158? I use Linux Mint Mate 20 with fvwm.

RightPanel: Button too tall. Giving up
Button=509520 num_rows=2158 bheight=40 h=2123
RightPanel: Button too tall. Giving up
Button=509760 num_rows=2158 bheight=35 h=2124
RightPanel: Button too tall. Giving up
Button=510000 num_rows=2158 bheight=34 h=2125
RightPanel: Button too tall. Giving up
Button=510240 num_rows=2158 bheight=33 h=2126
RightPanel: Button too tall. Giving up
Button=510480 num_rows=2158 bheight=32 h=2127
RightPanel: Button too tall. Giving up
Button=510720 num_rows=2158 bheight=31 h=2128
RightPanel: Button too tall. Giving up
Button=510720 num_rows=2158 bheight=40 h=2128
RightPanel: Button too tall. Giving up
Button=510800 num_rows=2158 bheight=40 h=2128

It might be easier if you just share your RightPanel configuration and maybe we can track down the error.

Here it is,

###########
SetEnv fvwm_icon   $[FVWM_USERDIR]/icons/32x32
SetEnv fvwm_icon24 $[FVWM_USERDIR]/icons/24x24
SetEnv fvwm_icon64 $[FVWM_USERDIR]/icons/64x64
SetEnv fvwm_size 38x40 
##########

DestroyModuleConfig RightPanel:*
*RightPanel: Geometry 240x$[vp.height]-0+0
*RightPanel: Colorset 30
*RightPanel: Rows $[vp.height]
*RightPanel: Columns 240
*RightPanel: Frame 0
*RightPanel: Font "xft:Sans:Bold:size=12:antialias=True"
*RightPanel: ($[fvwm_size], Icon "$[fvwm_icon]/firefox.png", ActiveColorset 12, Action(Mouse 1) "Exec exec firefox")
*RightPanel: ($[fvwm_size], Icon "$[fvwm_icon]/chrome.png", ActiveColorset 12, Action(Mouse 1) "Exec exec google-chrome-stable")
*RightPanel: ($[fvwm_size], Icon "$[fvwm_icon]/rclone-browser.png", ActiveColorset 12, Action(Mouse 1) "Exec exec rclone-browser")
*RightPanel: ($[fvwm_size], Icon "$[fvwm_icon]/terminal.png", ActiveColorset 12, Action(Mouse 1) "Exec exec mate-terminal")
*RightPanel: ($[fvwm_size], Icon "$[fvwm_icon]/folder-documents-red.png", ActiveColorset 12, Action(Mouse 1) "Exec exec qsudo caja")
*RightPanel: ($[fvwm_size], Icon "$[fvwm_icon]/mathematica.png", ActiveColorset 12, Action(Mouse 1) "Exec exec /usr/local/Wolfram/Mathematica/12.2/Executables/mathematica")
*RightPanel: ($[fvwm_size], Icon "$[fvwm_icon]/double-commander.png", ActiveColorset 12, Action(Mouse 1) "Exec exec doublecmd")
*RightPanel: ($[fvwm_size], Icon "$[fvwm_icon]/inkscape-3.png", ActiveColorset 12, Action(Mouse 1) "Exec exec inkscape")
*RightPanel: ($[fvwm_size], Icon "$[fvwm_icon]/skype.png", ActiveColorset 12, Action(Mouse 1) "Exec exec skypeforlinux")
*RightPanel: ($[fvwm_size], Icon "$[fvwm_icon]/dropbox.png", ActiveColorset 12, Action(Mouse 1) "Exec exec $[FVWM_USERDIR]/scripts/dropbox.sh")
*RightPanel: ($[fvwm_size], Icon "$[fvwm_icon]/deadbeef.png", ActiveColorset 12, Action(Mouse 1) "Exec exec /opt/deadbeef/bin/deadbeef")
*RightPanel: ($[fvwm_size], Icon "$[fvwm_icon]/tux.png", ActiveColorset 12, Action(Mouse 1) "Exec exec xed /home/nail/MEGAsync/Linux/commands.txt")
*RightPanel: (240x15, Frame 0)  
*RightPanel: (240x60, Swallow Conky 'FvwmConky', Frame 0, Action(Mouse 1) "exec xkb-switch -n")
*RightPanel: (240x15, Frame 0)
*RightPanel: (240x120, Swallow FvwmPager 'Module FvwmPager *', Frame 0)  
*RightPanel: (240x140, Swallow(NoClose,UseOld) stalonetray 'Exec exec stalonetray', Frame 0)
Test  (x stalonetray) PipeRead 'echo "*RightPanel: (240x$(($[vp.height]-1112)), Top, Swallow FvwmIconMan \'Module FvwmIconMan\', Frame 0)"'
Test (!x stalonetray) PipeRead 'echo "*RightPanel: (240x$(($[vp.height]-1112+140)), Top, Swallow FvwmIconMan \'Module FvwmIconMan\', Frame 0)"'
*RightPanel: (240x250 Swallow(NoClose,UseOld) tzclock "Exec exec tzclock -q -s192", Frame 0)
*RightPanel: ($[fvwm_size], Icon "$[fvwm_icon]/goldendict.png", ActiveColorset 12, Action(Mouse 1) "Exec exec goldendict")
*RightPanel: ($[fvwm_size], Icon "$[fvwm_icon]/calibre.png", ActiveColorset 12, Action(Mouse 1) "Exec exec $[FVWM_USERDIR]/scripts/calibre.sh")
*RightPanel: ($[fvwm_size], Icon "$[fvwm_icon]/cb2bib.png", ActiveColorset 12, Action(Mouse 1) "Exec exec cb2bib")
*RightPanel: ($[fvwm_size], Icon "$[fvwm_icon]/geogebra.png", ActiveColorset 12, Action(Mouse 1) "Exec exec geogebra")
*RightPanel: ($[fvwm_size], Icon "$[fvwm_icon]/cherrytree.png", ActiveColorset 12, Action(Mouse 1) "Exec exec cherrytree")
*RightPanel: ($[fvwm_size], Icon "$[fvwm_icon]/tex.png", ActiveColorset 12, Action(Mouse 1) "Exec exec texdoctk")
*RightPanel: (240x185, Swallow Status 'FvwmStatus', Frame 0)
*RightPanel: (140x30, Swallow Temperature 'Module FvwmScript $[FVWM_USERDIR]/scripts/Temperature', Frame 0)
*RightPanel: (100x30, Swallow Upgrade 'Module FvwmScript $[FVWM_USERDIR]/scripts/Upgrade', Frame 0)
*RightPanel: ($[fvwm_size], Icon "$[fvwm_icon]/search.png", ActiveColorset 12, Action(Mouse 1) "Exec exec mate-search-tool")
*RightPanel: ($[fvwm_size], Icon "$[fvwm_icon]/scrcpy.png", ActiveColorset 12, Action(Mouse 1) "Exec exec /home/nail/Progi/Samsung/Scrcpy/scrcpy/build-auto/app/scrcpy -b 40M --max-fps 20")
*RightPanel: ($[fvwm_size], Icon "$[fvwm_icon]/books.png", ActiveColorset 12, Action(Mouse 1) "Exec exec evince /media/nail/Mate/Library/Books/Rest/Cimmerman.pdf")
*RightPanel: ($[fvwm_size], Icon "$[fvwm_icon]/monitor.png", ActiveColorset 12, Action(Mouse 1) "Exec exec mate-system-monitor")
*RightPanel: ($[fvwm_size], Icon "$[fvwm_icon]/kazam.png", ActiveColorset 12, Action(Mouse 1) "Exec exec kazam")
*RightPanel: ($[fvwm_size], Icon "$[fvwm_icon]/xournalpp.png", ActiveColorset 12, Action(Mouse 1) "Exec exec xournalpp")
*RightPanel: ($[fvwm_size], Icon "$[fvwm_icon]/jabref.png", ActiveColorset 12, Action(Mouse 1) "Exec exec /opt/jabref/bin/JabRef")
*RightPanel: ($[fvwm_size], Icon "$[fvwm_icon]/mendeley.png", ActiveColorset 12, Action(Mouse 1) "Exec exec mendeleydesktop")
*RightPanel: ($[fvwm_size], Icon "$[fvwm_icon]/geany.png", ActiveColorset 12, Action(Mouse 1) "Exec exec geany")
*RightPanel: ($[fvwm_size], Icon "$[fvwm_icon]/keepassx.png", ActiveColorset 12, Action(Mouse 1) "Exec exec keepassx")
*RightPanel: ($[fvwm_size], Icon "$[fvwm_icon]/calender.png", ActiveColorset 12, Action(Mouse 1) "Exec exec gsimplecal")
*RightPanel: ($[fvwm_size], Icon "$[fvwm_icon]/Global-Network.png", ActiveColorset 12, Action(Mouse 1) "Exec exec xterm -e sudo service network-manager restart"
*RightPanel: (240x20, Swallow DateTime 'FvwmDateTime', Frame 0)
*RightPanel: (80x40, Swallow EMail1 'FvwmEMail1', Frame 0)
*RightPanel: (80x40, Swallow EMail2 'FvwmEMail2', Frame 0)
*RightPanel: (80x40, Swallow EMail3 'FvwmEMail3', Frame 0)
*RightPanel: (240x5, Frame 0)
*RightPanel: (80x40, Icon "$[FVWM_USERDIR]/icons/fvwm-80.png", ActiveColorset 12, Action(Mouse 1) "Exec exec bash $HOME/.fvwm/scripts/GMail/seen1.sh")
*RightPanel: (80x40, Icon "$[FVWM_USERDIR]/icons/fvwm-80.png", ActiveColorset 12, Action(Mouse 1) "Exec exec bash $HOME/.fvwm/scripts/GMail/seen2.sh")
*RightPanel: (80x40, Icon "$[FVWM_USERDIR]/icons/fvwm-80.png", ActiveColorset 12, Action(Mouse 1) "Exec exec bash $HOME/.fvwm/scripts/GMail/seen3.sh")

The form of right panel is here https://drive.google.com/file/d/1Wm6gcGP80rc-UlR1G0mNetKZAdelqvIM/view?usp=sharing

Yea, your sizes don’t match, the sizes of all your buttons must match the number of columns/rows you have.

I would stop using variables, because this will require you to ensure all the math works out, instead turn all your variables into fixed sizes, and ensure that all the sizes add up.

https://www.fvwm.org/Wiki/Panels/RightPanel/

That explains how to compute the sizes of things to make everything work out, adjust to your setup.

I understand that sizes do not match. I thought that you understand what does it mean “Button=510480 num_rows=2158 bheight=32 h=2127”. I recalculated all sizes and located errors. The first is icon size 38x40 → 40x40 and the second is the place for FvwmIconMan was greater on 8 pixels: 1112 → 1120. The error now disappeared. Thank you. BTW, I changed monitor 4k, 3840x2160, and lost a lot of time to recalculate RightPanel. Do you know how do I automize this point? There are two parameters of screen $[vp.height] and $[vp.width]. The width of the right panel is 1/16 part of the screen’s width. Maybe you see an axample of this kind of config?

FvwmButtons cannot recalculate on the fly, so if you change monitors and want the panel to update, the best thing to do is to KillModule then start the module again. How you do this can depend on your use case.

You could check out fvwm3’s default-config which now uses $[monitor.$[monitor.primary].height] to get the height of the monitor (vs the viewport – but this requires fvwm3). And then just kill/launch the module when you change monitors.

Another option is to have two different RightPanel configurations, maybe RightPanel1 and RightPanel2 (this way you don’t have to have a script do all the math to recompute the size from variables) and just launch the appropriate one for each monitor.

You can also use FvwmEvent or RandRFunc to trigger any scripts to change the panel when the monitors change.