Hi core.dump
I can't really find anything about using  xmodmap  with  Xfbdev .
If you want to try something, I put together a program to swap the buttons. It reads  /dev/input/mouse0 , swaps buttons if one is
pressed, and writes it to a FIFO called  /tmp/MouseSwap.  When  Xfbdev  is started, use the  -mouse  option to tell it the FIFO is
the mouse device.
If you want to try it, first verify your mouse is  /dev/input/mouse0:
sudo cat /dev/input/mouse0You should see garbage appear as you move the mouse. Hit  Ctrl-C  to stop it. If you got no response, we first need to figure
out which device is your mouse.
If your mouse is  /dev/input/mouse0  you can build the program:
mkdir Mouse
cd Mouse
# Download the attached file into this directory.
tce-load -w compiletc sstrip
tce-load -i compiletc sstrip
gcc -flto -mtune=generic -Os -pipe -Wall -fno-plt MouseSwap.c -o MouseSwap -Wl,-T/usr/local/lib/ldscripts/elf_x86_64.xbn
The first line in your  .xsession  file should look similar to this:
/usr/local/bin/Xfbdev -nolisten tcp &
Change it so it first starts  MouseSwap.  Add the  -mouse /tmp/MouseSwap,3  option to the  Xfbdev  command.
/home/tc/Mouse/MouseSwap &
/usr/local/bin/Xfbdev -mouse /tmp/MouseSwap,3 -nolisten tcp &
Now click the  Exit  icon (or select exit in the desktop menu) and select  Exit to Prompt.  Then  startx  and see if mouse works
and has its buttons swapped.