FreeBSD fvwm3 problems

The default fvwm3 configuration on FreeBSD has various bad issues.
Most notable is that PgDn pops up the FVWM menu, and arrow down creates a xterm.
So, the FVWM3 config “out of the box” gives a quite bad first impression.

When I transferred my old FVWM2 config, I noticed the EdgeScroll problem described here.

When trying to find out the FVWM version using fvwm3 -V, it only shows "fvwm3 1.0.2 (released)
with support for: ReadLine, PNG, Shape, XShm, SM, Bidi text, XRandR, XRender, XCursor, XFT, NLS
".
I am using FreeBSD 12.2 configured to use the “latest” repo.
So I guess the FVWM3 there is not the most recent one?
Or could there be other reasons for the EdgeScroll issue?

What do you think? Should I file a bug report in the FreeBSD bug tracker?

Latest fvwm3 release (stable): 1.0.3-66
git clone https://github.com/fvwmorg/fvwm3.git

Since I don’t know what this default config is, I can’t say whether what you’re describing is meant to be true or not.

Please try the latest fvwm3-1.0.3 release (or ideally the master branch in git for the main fvwm3 repo: GitHub - fvwmorg/fvwm3: FVWM version 3 -- the successor to fvwm2). Please open any issues there if you’re still having problems.

Sorry for this late reply which revives an old topic. However, since I just recently began using the default config I too ran into the strange “arrow down creates an xterm” issue. I cannot be sure precisely WHY this is true on FreeBSD but I can say that my keyboard is attached via ps2 port. What solved the odd binding was to disable the ‘Super’ key. Excerpt from .fvwm/config below.

# Super_R (windows key) will launch a terminal.
# Alt-Space to launch dmenu (Note: dmenu must be present in the system)
# 
# Silent suppresses any errors (such as keyboards with no Menu key).
Silent Key F1 A M Menu MenuFvwmRoot
Silent Key Menu A A Menu MenuFvwmRoot
Silent Key Tab A M WindowList Root c c NoDeskSort, NoGeometry, SelectOnRelease Meta_L
Silent Key F1 A C GotoDesk 0 0
Silent Key F2 A C GotoDesk 0 1
Silent Key F3 A C GotoDesk 0 2
Silent Key F4 A C GotoDesk 0 3
#Silent Key Super_R A A Exec exec $[infostore.terminal]
Silent Key Super_R A A

My solution was to remove the binding portion which succeeded, though possibly there is another way with more finesse. I almost never use the PgDn key, but in testing moments ago, yes it will bring up the FVWM menu. This menu is different than my custom root menu, so that seems odd but it is helpful to have access to both until I merge everything into the new config by one method or other.

My FVWM3 is built and reinstalled (not automatically) with each new source commit from fvwmorg/fvwm3/commits/master and I keep my own repo for this at https://github.com/tigersharke/fvwm3-dev

I’m a long time FVWM user, still learning how to enhance my use of it. Thank you!

What does the output of xev show when you press the keys which aren’t doing what you expect them to do? I suspect something else has grabbed them before fvwm can.

No idea whether keys are being grabbed.
After I replaced the default FreeBSD FVWM config with my own Meow+Purr config that I use since 2016, problems went away.

I made a .tar with the default fvwm config, but I see I cannot upload that for some reason.

Then it’s all rather moot, but that will have been the issue.

Not so sure…
I really think I should make a FreeBSD PR and link to @tigersharke 's post with the fixes he found.
Because, a FVWM configuration that ill-behaves that way will likely p!ss off potential FVWM-interested people.

I tried xev two ways, from within an xterm, and that didn’t seem as helpful, but “^[[6~” without the quotes is what I saw if I pressed the Page Down key in that xterm window. However, if I told xev to generate a window of its own, and I put the mouse over it, then pressed the Page Down key, I saw the following:

KeyPress event, serial 36, synthetic NO, window 0x2200001,
    root 0x50f, subw 0x2200002, time 540747539, (46,46), root:(3148,510),
    state 0x0, keycode 117 (keysym 0xff56, Next), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 36, synthetic NO, window 0x2200001,
    root 0x50f, subw 0x2200002, time 540747658, (46,46), root:(3148,510),
    state 0x0, keycode 117 (keysym 0xff56, Next), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

I hope this is helpful. Once more, this unusual effect was for me due to choosing to use the config installed as /usr/local/share/fvwm3/default-config/config which I copied to my user’s ~/.fvwm directory.

I’m able to reproduce this with a fresh install of FreeBSD 13.2-RELEASE-p3. No configuration in ~/.fvwm/ , only the default config from the freebsd package. Pressing down-arrow spawns an xterm, while PageDown shows the FVWM menu (“MenuFvwmRoot” in the config, apparently).

So this is still an issue and something, somewhere needs to be fixed. However, it’s a bit hard to debug because simply restarting fvwm without restarting the X server (left-click on the desktop → “Restart”) removes this behaviour – until the next X session, that is.

My hardware is a thinkpad T430, which is different from the PS/2 keyboard reported above. The OS keymap is set to “US English with accent keys”.

Running fvwm3 with fvwm-crystal with freebsd 14.1 in virtualbox, I get hit by that issue too. At the root console, the keyboard works fine, but after startx, some keys are not mapped correctly. And sometimes, after a few fvwm Restart, the keyboard begun to works as wanted.

Running xev in both the gentoo host and the freebsd guest, the screwed keys shows different outputs. See Other - Wrong keyboard map in X | The FreeBSD Forums

I just made a try with fvwm-2.6.9 from the ports and get the same issue, which imply that’s not specific to fvwm3. But I suspect the real cause is outside fvwm, into freebsd or maybe virtualbox. But if the other users facing this issue are not running freebsd inside virtualbox, we can be sure it is into freebsd.

I was maybe wrong about the cause and found a way to reproduce it. After reinstalling fvwm3 from the ports, and over it its last git, I just run fvwm3 with its default config (no ~/.fvwm folder).

After its startup, that issue was here. Opening an xterm, the history works with the up array, but with the down array, that open a new xterm window.

In startx:
exec fvwm3 2>.errors.fvwm

In that file:

loaded [7]: /usr/local/share/fvwm3/default-config/config
Warning: locale not supported by C library, locale unchanged
Warning: locale not supported by C library, locale unchanged

New line after a restart:
loaded [7]: /usr/local/share/fvwm3/default-config/config

The locale warning lines appear when running a new xterm.
And after the restart, that bad keys issue is gone.

Another misbehaviour to mention is that, after start, if I open the FvwmConsole and call Setenv TESTVAR Testvar, after opening a new term echo $TESTVAR return Testvar, but after a restart, in both the old or a new FvwmConsole, echo $MYNEWVAR return nothing.

Edit: I get hit by that Setenv issue only with fvwm3.
Edit: typos.
Edit: I am not able to reproduce that Setenv issue after restart, but the wrong keys issue after Init is still here and gone after a restart.

So where are you setting the keyboard mapping from?

Usually you’d do this in ~/.xinitrc or ~/.xsession with:

setxkbmap -layout gb

Which mappings aren’t working?

The keyboard is defined into /etc/rc.conf as:

keymap="ch-fr.acc.kbd"

and it works fine.
For X, I followed the freebsd handbook that look like to be both outdated and incomplete - in /usr/local/etc/X11/xorg.conf.d/30-kbd.conf:

Section "InputClass"
    Identifier "Keyboard0"
    MatchIsKeyboard "on"
    Option "XkbLayout" "ch"
    Option "XkbModel" "pc105"
    Option "XkbVariant" "fr"
EndSection

The same X setup in gentoo work just fine. In freebsd, I get no accented keys in X, they are just dead, but works fine into the tty before I run startx. For the special keys, after fvwm init, it is a mess that is not the same when fvwm read its default config or fvwm-crystal.

With an open xterm window and the fvwm default config:

  • Page Up go back into the shell history
  • Page Down open the same fvwm menu than a click on the root window
  • Array Down open a new xterm window
  • Array Up go back into the shell history, but not in the same way than Page Up

With fvwm-crystal:

  • Page Up key minimize the focused window into its title bar
  • Page Down works.
  • Array Down key work
  • Array Up do nothing

After a fvwm Restart, these keys are fixed and works fine, but I still have no accented keys (éà…).

Edit: with firefox, the accented keys are working, which imply it must be a missing font issue in xterm. But the mess with the special keys remain, Array Down in firefox launch a new xterm.

Edit2: I followed the handbook, chapter 25, and get the accented keys to work with xterm. But that changed nothing for the issue with the special keys mapping.

I saw another issue on freebsd, that with fvwm-crystal. After fvwm init, all the Setenv are into the environment and the associated functions are working fine, but after a Restart, at least one of them (I didn’t checked the others) is missing into the environment, and it makes the associated FvwmScript to fail to do its function, load a file for editing.

I don’t know if it is related or not to that key mapping issue, but maybe as fvwm don’t behave the same after init and restart.

I find something more about that missing SetEnv variable. It is used by a FvwmScript that is launched by

DestroyFunc LaunchFileWithHelp
AddToFunc LaunchFileWithHelp
+ I SetEnv FileEditWithHelp $0
+ I Include scripts/FileEditors/$0-Help
+ I Script scripts/FileEditors/FileEditWithHelp

where $0 is the name of a file into $[FVWM_USERDIR]/preferences

Into the FvwmScript FileEditWithHelp:

QuitFunc
Begin
  Do {UnsetEnv FileEditWithHelp}
End

On freebsd, that works fine only after init, but after restart, the script start, but doesn’t open the file for editing and doesn’t find its $0-Help file. If I comment the Do {UnsetEnv FileEditWithHelp} line, it works fine in any cases.

The script: fvwm-crystal/fvwm/scripts/FileEditors/FileEditWithHelp at freebsd · fvwm-crystal/fvwm-crystal · GitHub

I found a workaround for the keyboard mapping issue. If I install and run lightdm to start fvwm, the keyboard work fine after Init and Restart. But that doesn’t tell me why it work fine with startx only after a Restart. And it doesn’t fix the Setenv issue after Restart.

It’s because they’re not related.

It’s also what I think. As I was not able to reproduce the Setenv issue with fvwm, I think that’s an issue with fvwm-crystal config. But the weird keybard issue should be an issue with freebsd or fvwm.