Results 1 to 9 of 9

Thread: How to rotate mouse or cursor axes on Asus S5n running with ubuntu?

  1. #1
    Join Date
    Jan 2012
    Posts
    50

    How to rotate mouse or cursor axes on Asus S5n running with ubuntu?

    Well I using Asus S5n and it powered by ubuntu. I wanted to rotate my touchpad settings on my laptop. Without restarting xorg so that I will be able to use make use of rotate-screen command with rotate-cursor. Any help to resolve the matter will be appreciated. Thanks a lot in advance.

  2. #2
    Join Date
    Aug 2011
    Posts
    418

    Re: How to rotate mouse or cursor axes on Asus S5n running with ubuntu?

    I got below mentioned solution and hope it will be useful to you.
    You have to enable xrandr on your system. if you have not installed xrandr then run below mentioned command to install the same.
    Code:
    sudo apt-get install x11-xserver-utils
    now you have to add below mentioned lines to xorg.conf file

    Code:
    Section "Device"
    	Identifier	"Configured Video Device"
    	...		...
    	Option		"RandRRotation" "true"
    EndSection
    After that you have to rotate the screen by using below mentioned command.
    Code:
    xrandr -o [right,left,inverted,normal]

  3. #3
    Join Date
    Aug 2011
    Posts
    322

    Re: How to rotate mouse or cursor axes on Asus S5n running with ubuntu?

    in order to enable touchpad XY flip you will need to do below mentioned thing.

    you have to modify xorg.conf by using below mentioned code
    Code:
    Section "InputDevice"
            Identifier      "Synaptics Touchpad"
            Driver          "synaptics"
            Option          "SendCoreEvents"        "true"
            Option          "Device"                "/dev/psaux"
            Option          "Protocol"              "auto-dev"
            Option          "SHMConfig"             "true"
    EndSection
    Now install below mentioned packages.
    Code:
    sudo apt-get build-dep xserver-xorg-input-synaptics
    apt-get source xserver-xorg-input-synaptics
    after doing that you have to patch as well as compile the new drivers.

    Now you have to backup the original drivers
    Code:
    mkdir original_drivers
    cp -p /usr/lib/xorg/modules/input/synaptics_drv.so original_drivers/
    cp -p /usr/bin/synclient original_drivers/ 
     and install the latest version of drivers.
    sudo cp synclient /usr/bin/
    sudo cp synaptics_drv.so /usr/lib/xorg/modules/input/
    it can be used in below mentioned manner.
    synclient Xrandr=0
    xrandr --orientation normal

    synclient Xrandr=1
    xrandr --orientation right

    synclient Xrandr=2
    xrandr --orientation left

    synclient Xrandr=3
    xrandr --orientation inverted

  4. #4
    Join Date
    Aug 2011
    Posts
    308

    Re: How to rotate mouse or cursor axes on Asus S5n running with ubuntu?

    Even you can also create a simple script which will allow you to rotate screen as well as mouse/touchpad. You should create a file names rotation and copy paste the same as follow
    Code:
    #!/bin/sh
    if   [ $1 = "normal" ] ; then
        synclient Xrandr=0
        xrandr --orientation normal
    elif [ $1 = "right" ] ; then
        synclient Xrandr=1
        xrandr --orientation right
    elif [ $1 = "left" ] ; then
            synclient Xrandr=2
        xrandr --orientation left
    elif [ $1 = "inverted" ] ; then
        synclient Xrandr=3
        xrandr --orientation inverted
    else
        echo "rotation [normal,righ,left,inverted]"
    fi
    after that you have to execute
    Code:
    chmod +x rotation
    sudo cp -p rotation /usr/local/bin/

  5. #5
    Join Date
    Aug 2011
    Posts
    379

    Re: How to rotate mouse or cursor axes on Asus S5n running with ubuntu?

    Well after going through the problem of yours I am suggesting to use below mentioned line in xorg.conf.
    Code:
    Option          "SHMConfig"             "on"

  6. #6
    Join Date
    Aug 2011
    Posts
    308

    Re: How to rotate mouse or cursor axes on Asus S5n running with ubuntu?

    If you check file /usr/lib/xorg/modules/input/synaptics_drv.so and $OWN_COMPILED/src/.libs/synaptics_drv.so. you will find out 'stripped' / 'not stripped'.
    Hence you have to use
    Code:
    strip $OWN_COMPILED/src/.libs/synaptics_drv.so
    as far as synclient is concerned you have to use synclient and driver.
    Code:
    cp $OWN_COMPILED/tools/synclient  /usr/bin/synclient
    another option is to use full path.

  7. #7
    Join Date
    Jul 2011
    Posts
    229

    Re: How to rotate mouse or cursor axes on Asus S5n running with ubuntu?

    Well I am posting below a script file which help you to get the requirement of yours.
    Code:
    #!/bin/bash
    rotate=`cat ~/.screen-orientation`
    echo $rotate
    	if [ "$rotate" = "normal" ];
    	then
    	rotate="left"
    	wacom="CCW"
    	synaptics="1"
    	else
    		if [ "$rotate" = "left" ];
    		then
    		rotate="inverted";
    		wacom="HALF";
    		synaptics="2"
    		else
    			if [ "$rotate" = "inverted" ];
    			then
    			rotate="right";
    			wacom="CW";
    			synaptics="3"
    			else
    				if [ "$rotate" = "right" ];
    				then
    				rotate="normal";
    				wacom="NONE";
    				synaptics="0"
    				fi
    			fi
    		fi
    	fi
    echo "rotate = "$rotate
    echo "wacom = "$wacom
    xrandr -o "$rotate";
    xsetwacom set "12" Rotate "$wacom";
    xsetwacom set "13" Rotate "$wacom";
    xsetwacom set "11" Rotate "$wacom";
    synclient orientation="$synaptics"
    echo $rotate > ~/.screen-orientation;

  8. #8
    Join Date
    Nov 2010
    Posts
    363

    Re: How to rotate mouse or cursor axes on Asus S5n running with ubuntu?

    • You can use below mentioned bash script which you will be able to call from the keyboard shortcuts.
      Code:
      #!/bin/bash
      
      # this script changes screen orientation, and also the touchpad orientation. uses xrandr and synclient commands.
      # also used xserver-xorg-input-synptics patch from https://launchpad.net/~aapo-rantalai...aporantalainen
      
      case $1 in
      0)
        xrandr -o normal
        synclient Orientation=0 
        ;;
      1)
        xrandr -o left
        synclient Orientation=1 
        ;;
      2)
       xrandr -o inverted
        synclient Orientation=2 
        ;;
      3)
        xrandr -o right
      synclient Orientation=3 
        ;;
      
       echo "pass parameter 0-3"
        ;;
      esac
    • you should save the above mentioned file at the home folder.
    • Now give an executable privileges by running below mentioned command
    • Code:
      chmod +x orientscreen.sh
    • now you have to add custom shortcut in Keyboard Shortcuts
    • 'normal orientation' by using below mentioned command
    • Code:
      /home/...[other folders]/orientscreen.sh 0
    • Finally you should set keyboard shortcut with SUPER key + UpArrow

  9. #9
    Join Date
    Jun 2011
    Posts
    383

    Re: How to rotate mouse or cursor axes on Asus S5n running with ubuntu?

    After going through the requirement of yours run,
    Code:
    xrandr-align monitor --input="My touchpad device"
    the touchpad of yours would rotate as per the screen rotations. It would remain in foreground and it would listen to RandR events. In order to get the name of the input device you should run
    Code:
    xrandr-align list-input
    the latest version is having support for the screen rotation which has been reported by gravisensor as an input device.

Similar Threads

  1. Replies: 4
    Last Post: 17-11-2011, 02:24 PM
  2. Replies: 10
    Last Post: 01-10-2011, 04:08 PM
  3. Corrupt Mouse Cursor Icon
    By Wilbur in forum Operating Systems
    Replies: 3
    Last Post: 05-12-2009, 12:01 PM
  4. Move Cursor without using a Mouse
    By Itronix in forum Tips & Tweaks
    Replies: 2
    Last Post: 14-03-2009, 01:38 PM
  5. Mouse Cursor freezes? Help?
    By akbar in forum Windows XP Support
    Replies: 3
    Last Post: 01-03-2007, 08:43 PM

Tags for this Thread

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
  •  
Page generated in 1,711,645,047.95426 seconds with 17 queries