Go Back   TechArena Community > Software > Operating Systems
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



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

Operating Systems


Reply
 
Thread Tools Search this Thread
  #1  
Old 31-03-2012
Member
 
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.

Reply With Quote
  #2  
Old 31-03-2012
Member
 
Join Date: Aug 2011
Posts: 401
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]
Reply With Quote
  #3  
Old 31-03-2012
Member
 
Join Date: Aug 2011
Posts: 299
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.
Quote:
synclient Xrandr=0
xrandr --orientation normal

synclient Xrandr=1
xrandr --orientation right

synclient Xrandr=2
xrandr --orientation left

synclient Xrandr=3
xrandr --orientation inverted
Reply With Quote
  #4  
Old 31-03-2012
Member
 
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/
Reply With Quote
  #5  
Old 31-03-2012
Member
 
Join Date: Aug 2011
Posts: 357
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"
Reply With Quote
  #6  
Old 31-03-2012
Member
 
Join Date: Aug 2011
Posts: 288
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.
Reply With Quote
  #7  
Old 31-03-2012
Member
 
Join Date: Jul 2011
Posts: 211
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;
Reply With Quote
  #8  
Old 31-03-2012
Member
 
Join Date: Nov 2010
Posts: 361
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
Reply With Quote
  #9  
Old 03-04-2012
Member
 
Join Date: Jun 2011
Posts: 361
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.
Reply With Quote
Reply

  TechArena Community > Software > Operating Systems
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to rotate mouse or cursor axes on Asus S5n running with ubuntu?"
Thread Thread Starter Forum Replies Last Post
Lenovo Ideapad S10-3T - How to rotate the screen on running Ubuntu 11.10 Zev Portable Devices 4 17-11-2011 01:24 PM
Apple Magic Mouse: after Lion update, Mouse Cursor Jumping to Corners. Acardi !! Hardware Peripherals 10 01-10-2011 04:08 PM
Corrupt Mouse Cursor Icon Wilbur Operating Systems 3 05-12-2009 11:01 AM
Move Cursor without using a Mouse Itronix Tips & Tweaks 2 14-03-2009 01:38 PM
Mouse Cursor freezes? Help? akbar Windows XP Support 3 01-03-2007 07:43 PM


All times are GMT +5.5. The time now is 02:56 PM.