Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: HowTo: Forward and Backward Mouse Buttons in Nautilus (Easy way)

  1. #1
    Join Date
    Aug 2006
    Beans
    3
    Distro
    Ubuntu 6.10 Edgy

    HowTo: Forward and Backward Mouse Buttons in Nautilus (Easy way)

    Introduction

    I will start off this HowTo by stating that there are many other similar howtos but for me they always seemed overly complicated and hard to follow all for the simple task of getting ones forward and backward buttons to function in Nautilus as they already do in a web browser.

    Note:
    This howto article assumes that the reader has a semi understanding of how to edit files and install software in Ubuntu. Also this howto was tested and validated to work with a Logitech MX518 mouse.

    1. Install needed applications

    Code:
    sudo apt-get install xbindkeys xvkbd
    2. Edit Xorg.conf

    Make a backup of the xorg.conf file
    Code:
    sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak
    Open the xorg.conf file using whatever text editor you like to use. Here is a sample command that can be used to edit the xorg.conf file.

    Code:
    gksu gedit /etc/X11/xorg.conf
    Look for the "InputDevice" section that deals with the mouse. Edit that section to look something similar to the following.

    Code:
    Section "InputDevice"
        Identifier     "Configured Mouse"
        Driver         "mouse"
        Option         "CorePointer"
        Option         "Device" "/dev/input/mice"
        Option         "Protocol" "ExplorerPS/2"
        Option         "Emulate3Buttons" "true"
        Option	   "Buttons" "7"
        Option         "ZAxisMapping" "4 5"
        Option         "ButtonMapping" "1 2 3 6 7"
    EndSection
    Save the changes to the xorg.conf file.

    3. Setup button configuration file

    Edit the following file which is located in the root of your home directory. If the file is not there create the file.

    Code:
    gedit .xbindkeysrc
    Add the following lines to the file exactly as they are shown.

    Code:
    "/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[Left]"" 
    m:0x0 + b:6
     
    "/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[Right]"" 
    m:0x0 + b:7
    4. Restart X

    At this point you should be able to restart your X session and enjoy your new mouse button functionality.

  2. #2
    Join Date
    Jun 2005
    Location
    France
    Beans
    7,100
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HowTo: Forward and Backward Mouse Buttons in Nautilus (Easy way)

    In many cases only the step2 is needed and in this cases you don't need xbindkeys and xvkbd or any software, you may to have to change "ButtonMapping" "1 2 3 6 7" to "ButtonMapping" "1 2 3 8 9" in some cases to get it work.

    I would advice to try step 2 only and restart X then if it don't work do the other steps.

  3. #3
    Join Date
    Aug 2006
    Beans
    3
    Distro
    Ubuntu 6.10 Edgy

    Re: HowTo: Forward and Backward Mouse Buttons in Nautilus (Easy way)

    Quote Originally Posted by frodon View Post
    In many cases only the step2 is needed and in this cases you don't need xbindkeys and xvkbd or any software, you may to have to change "ButtonMapping" "1 2 3 6 7" to "ButtonMapping" "1 2 3 8 9" in some cases to get it work.

    I would advice to try step 2 only and restart X then if it don't work do the other steps.
    Thanks for the info...I wish I would have known that a few weeks ago. I personally did mess around with the button mappings like you stated and for me I just could not get them working properly (which doesn't mean much as I am still learning Linux). I thought I would try and help contribute something that may make someone elses life a little easier

    I guess for me then the next question is if only step two would be needed and it is that easy is it possible to have that functionality implemented by default?

    Thanks again for the added info!!

  4. #4
    Join Date
    Jun 2005
    Location
    France
    Beans
    7,100
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HowTo: Forward and Backward Mouse Buttons in Nautilus (Easy way)

    Quote Originally Posted by majunbu View Post
    I guess for me then the next question is if only step two would be needed and it is that easy is it possible to have that functionality implemented by default?
    Maybe but unfortunatly this is not true for all the mouses just some of them works when you do only the step 2, that's why for the moment guides like yours are useful

  5. #5
    Join Date
    Dec 2004
    Location
    Germany
    Beans
    155
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: HowTo: Forward and Backward Mouse Buttons in Nautilus (Easy way)

    Wow, thank you.
    How did you get the code (m:0x0 + b:6 in your example) for a special button on the mouse?
    I have an other mouse and also wanted to do this.

  6. #6
    Join Date
    Oct 2005
    Beans
    118
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HowTo: Forward and Backward Mouse Buttons in Nautilus (Easy way)

    start xev in a terminal.

  7. #7
    Join Date
    Dec 2004
    Location
    Germany
    Beans
    155
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: HowTo: Forward and Backward Mouse Buttons in Nautilus (Easy way)

    Thanks desperado666. (Germans everywhere )
    And: Which of these Numbers is the right code? root? state?

    The forward and backward buttons give the same code to me

  8. #8
    Join Date
    Apr 2007
    Beans
    Hidden!
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: HowTo: Forward and Backward Mouse Buttons in Nautilus (Easy way)

    Hello!

    I did step one and two and this worked like a charm! Thanks!

    Jason

  9. #9
    Join Date
    Jan 2005
    Beans
    27

    Re: HowTo: Forward and Backward Mouse Buttons in Nautilus (Easy way)

    Hi

    Let me quick add some comment on this.

    i have a Microsoft Intellimouse Explorer 4.0A USB/PS2 compatible mouse. The only thing i did was the following:

    Code:
    Section "InputDevice"
        Identifier     "Configured Mouse"
        Driver         "mouse"
        Option         "CorePointer"
        Option         "Device" "/dev/input/mice"
        Option         "Protocol" "ExplorerPS/2"
        Option         "Emulate3Buttons" "true"
        Option	   "Buttons" "7"
        Option         "ZAxisMapping" "4 5"
        Option         "ButtonMapping" "1 2 3 6 7"
    EndSection
    So it seems that only step 2 is needed. Thx for the help majunbu
    I draw my line in the sand,
    Cuz this is where I intend to stand.
    And that's my plan.
    You want to snatch what's mine?
    I'll thrash your hand!!

  10. #10
    Join Date
    Dec 2005
    Beans
    764
    Distro
    Ubuntu 6.06

    Re: HowTo: Forward and Backward Mouse Buttons in Nautilus (Easy way)

    This just doesn't work for me.
    I own an MS InteliMouse Optical.

    Here is XORG.CONF
    Code:
    Section "InputDevice"
    	Identifier	"Configured Mouse"
    	Driver		"mouse"
    	Option		"CorePointer"
    	Option		"Device"		"/dev/input/mice"
    	Option		"Protocol"		"ExplorerPS/2"
    	Option		"ZAxisMapping"		"4 5"
    #for IntelliMouse's 7 buttons
    	Option          "Buttons"               "7"
    	Option		"ButtonMapping"		"1 2 3 6 7"
    #a temporary workaround 4 'middle mouse button' scrool feature
    #	Option		"EmulateWheel"		"true"
    #	Option 		"EmulateWheelButton"	"2"
    	Option		"Emulate3Buttons"	"true"
    EndSection
    And the XEV output when I press the 2 sidebuttons:
    Code:
    ButtonPress event, serial 29, synthetic NO, window 0x3200001,
        root 0x4d, subw 0x0, time 4032701, (154,22), root:(168,68),
        state 0x10, button 6, same_screen YES
    
    ButtonRelease event, serial 29, synthetic NO, window 0x3200001,
        root 0x4d, subw 0x0, time 4032830, (154,22), root:(168,68),
        state 0x10, button 6, same_screen YES
    
    ButtonPress event, serial 29, synthetic NO, window 0x3200001,
        root 0x4d, subw 0x0, time 4033298, (154,22), root:(168,68),
        state 0x10, button 7, same_screen YES
    
    ButtonRelease event, serial 29, synthetic NO, window 0x3200001,
        root 0x4d, subw 0x0, time 4033398, (154,22), root:(168,68),
        state 0x10, button 7, same_screen YES
    .xbindkeysrc
    Code:
    "/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[left]"" 
    m:0x0 + b:6
     
    "/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[right]"" 
    m:0x0 + b:7
    In firefox BACK and Forth works great but in Nautilus its a no go. Anybody have any other advices?
    Last edited by ashrack; July 4th, 2007 at 02:45 PM.
    Kubuntu 15.10
    Intel Core i5, 8GB RAM, Amd Radeon 7870XT@fglrx
    http://folding.extremeoverclocking.c...shrack&t=37766

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •