Thread
:
Introduction to Opera Mobile Labs for N9
View Single Post
asdfghjkl
2013-01-12 , 00:19
Posts: 4 | Thanked: 1 time | Joined on Jan 2013
#
97
I posted this in another thread, but it's probably worth putting here too - you can lock the screen orientation by temporarily disabling the accelerometer. For some reason initctl doesn't work when called from a shell script, but you can add an alias to shorten the command.
Add the following to ~/.profile:
alias om='devel-su -c "/sbin/initctl stop sensord && devel-su -c \"/opt/operamobile-labs/bin/operamobile-labs > /dev/null 2>&1\" - user && /sbin/initctl start sensord"'
Save, restart the terminal, and type "om". Enter the root password, and opera will launch locked in that orientation. When you exit, it'll unlock again. It's a hacky solution (note the nested devel-su
), but it'll do for now!
edit: a small change so it'll still work even if sensord isn't running to begin with:
alias om='devel-su -c "/sbin/initctl stop sensord > /dev/null 2>&1 || true && devel-su -c \"/opt/operamobile-labs/bin/operamobile-labs > /dev/null 2>&1\" - user && /sbin/initctl start sensord" && exit'
The path to opera might need changing depending on the version - I've stuck with 12.00.8 as it seems to be less buggy, which has the path /opt/operamobile-labs/operamobile.
Last edited by asdfghjkl; 2013-01-12 at
08:49
.
Quote & Reply
|
The Following User Says Thank You to asdfghjkl For This Useful Post:
Mikkosssss
asdfghjkl
View Public Profile
Find all posts by asdfghjkl