AutoRotate 0.3 Released
One missing piece in Linux tablet support is an easy way to automatically rotate the screen, based on either the orientation of the laptop or other parameters. I’ve tried to fix this by writing a simple daemon that uses the hdaps driver to check the orientation of the tablet and calculates the rotation. This new version contains a lot of improvements over the previous hack-job, in that it:
- Can be controlled via dbus
- Directly determines laptop vs tablet mode from hardware, and no longer depends on ACPI events
- Much easier to install (using a deb from my PPA or a setup.py script)
The new version, 0.3, can be downloaded from here with installation instruction here (Ubuntu) and here. More up-to-date details can be found on the AutoRotate project page.
I’ve only tested it on my laptop, which is a ThinkPad X61T running Ubuntu Karmic Koala. But there is no reason why it shouldn’t work on other hardware that uses hdaps and other distributions.
Hey thanks a lot for this script!
But i got a problem. When I try to start it this error occurs:
Traceback (most recent call last):
File “/usr/local/bin/auto-rotate.py”, line 50, in
main()
File “/usr/local/bin/auto-rotate.py”, line 40, in main
busname = dbus.service.BusName(“net.krizka.autorotate”,system_bus);
File “/usr/lib/pymodules/python2.6/dbus/service.py”, line 129, in __new__
retval = bus.request_name(name, name_flags)
File “/usr/lib/pymodules/python2.6/dbus/bus.py”, line 306, in request_name
‘su’, (name, flags))
File “/usr/lib/pymodules/python2.6/dbus/connection.py”, line 620, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied: Connection “:1.148” is not allowed to own the service “net.krizka.autorotate” due to security policies in the configuration file
Do u have an idea why?
Thanks!
Jonas
Ack, that one is my fault. I’ve forgot to include a file that would allow autorotate to start a system bus.
I will release a new version with it tonight.
In the meantime, you need a file /etc/dbus-1/system.d/net.krizka.autorotate.conf with the contents:
http://pastebin.com/f57e5ff31