Mouse forward and back buttons configuration

I am new to ubuntu and after tested out many distros, I picked budgie. I like it so far but not having page forward and backward buttons is quite inconvenient.
Few pages suggested adding few lines in the xorg.conf file or install xautomation/xbindings to map he buttons but I cannot even have a xorg.cong file in etc/X11.
I cannot create a new file there, maybe need special permissions.

Please help. thanks a lot.

1 Like

Hi and welcome

I am not familiar with the functionality you are describing.

Is this the forward and back buttons in your browser? Which browser?

Sorry for my poor description. English is not my mother tongue.

I have a 5 buttons mouse, left right scroll and 2 extra ones on the side.
In windows, when i press the these 2 buttons with my thumb, I can go back to previous pages with just one click.

this is one of the sites that I mentioned before.

Setting Forward And Back Buttons

I hope yo can understand what I mean.

thanks for your reply!

You can try with xbindkeys

sudo apt install xbindkeys xbindkeys-config

xbindkeys-config is actually a GTK+ Configure program for xbindkeys so you should find it in your Budgie menu.

thank you, I just installed xbindkeys and xbindkeys-config, but I am not able to find it in my menu. Do i have to activate it first?

I hope budgie team can include similar functions in future builds. It would make things for other linux newbies to convert from other OS systems.

Try this tutorial

PS You can launch xbindkeys-config from terminal but I just realized it is the ugliest thing I’ve ever seen on Linux :scream:

I have seen this tutorial before I came here.

my problem.
1) yaourt is for Arch Linux, I installed xbindkeys using sudo apt-get install… command.
2) I ran xev before, unfortunately it didn’t recognize back and forward buttons as button 8 and 9 as shown in the tutorial… I always try to google the answers and figure things out by myself before i go to forums to ask for answers, i am stuck that’s why I came here to ask… :smile:

When I press left mouse button, it shows this.
ButtonRelease event, serial 34, synthetic NO, window 0x4400001,
root 0x18c, subw 0x0, time 2588878, (155,8), root:(205,128),
state 0x100, button 1, same_screen YES

when I press BACK button on the side of the mouse, it shows this.
EnterNotify event, serial 34, synthetic NO, window 0x4400001,
root 0x18c, subw 0x0, time 2590416, (155,8), root:(205,128),
mode NotifyUngrab, detail NotifyAncestor, same_screen YES,
focus YES, state 0

KeymapNotify event, serial 34, synthetic NO, window 0x0,
keys: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

It was it’s been deprecated :grinning:

The truth is that I’m stuck just like you. I only have 2 mice and they’re both 3 buttons so I can’t test any further. Let’s hope someone else find a solution… there must be one :wink:

yaourt: command not found

I saw someone mentioned about xbindkeys_config-gtk2 is the one for GUI-frontend configuration.
is gtk2 a different version? it causes crashes in some peope’s system and it hasn’t been updated for a while, that’s why i haven’t try it yet.

maybe using xmodmap instead?

That’s xbindkeys-config in Ubuntu. As I said you can install it and launch it from terminal but looks like a very old app and is probably not going to help.

guys, Please IGNORE this reply, there is something wrong with it.

xev didn’t work for my mouse, I used xinput to find out the device ID of my mouse first, and then use "xinput test 12 (mouse ID) to find out that the side buttons are actually button 8 and 9.

I have previously installed imwheel to adjust mouse scrolling speed already, I found the script in other forum and added it to startup application.

i simply added these 2 lines to the script.

None, Button8, Alt_L|KP_Left
None, Button9, Alt_L|KP_Right

it took me a while to figure out the Alt_L|KP_left/right bits, though. Most of the examples in imwheel file are not applicable in this case, surprisingly these buttons now work in other programs as well!

i hope it is helpful for you guys as well.

1 Like

The correct way to do it is this. The script I found in other forum didn’t mention the fact that start up imwheel without this command "imwheel --kill --buttons “4 5” will kill the side buttons. no wonder why.