<div dir="ltr">Hi Ruis,<br>just wanted you to know i created a desktop icon in order to activate/desactivate auto rotate.<br><br>It works with 2008.9/FDOM, but should work with other distributions.<br>I extended the /etc/init.d/accel-rotate to add it a "switch" function, and used the tap/untap icon for the desktop entry.<br>
<br>Here you got it all.<br>Greetings<br><br>************ /etc/init.d/accel-rotate<br><br>#! /bin/sh<br>#<br># accel-rotate<br>#<br># description: this script starts accel-rotate daemon<br># processname: accel-rotate<br><br>
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin<br>NAME=accel-rotate<br>CMD=`which accel-rotate`<br><br>[ -f /etc/default/rcS ] && . /etc/default/rcS<br><br>case "$1" in<br> start)<br>
echo -n "Starting accel-rotate daemon: "<br> start-stop-daemon --start --pidfile /var/run/${NAME}.pid --make-pidfile --background -x ${CMD}<br> if [ $? = 0 ]; then<br> echo "(ok)"<br>
else<br> echo "(failed)"<br> fi<br> ;;<br> stop)<br> echo -n "Stopping accel-rotate daemon: "<br> start-stop-daemon --stop --pidfile /var/run/${NAME}.pid --oknodo<br>
rm -f /var/run/${NAME}.pid<br> echo "(done)"<br> ;;<br> switch)<br> echo "Switching state of accel-rotate daemon: "<br> if [ -e "/var/run/${NAME}.pid" ]; then<br>
/etc/init.d/accel-rotate stop<br> else<br> /etc/init.d/accel-rotate start<br> fi<br> ;;<br> restart|force-reload)<br> $0 stop<br> $0 start<br> ;;<br> *)<br>
echo "Usage: $0 {start|stop|restart|switch|force-reload}"<br> exit 1<br> ;;<br>esac<br><br>exit 0<br><br>
************ /usr/share/applications/rotate.desktop<br>[Desktop Entry]<br>Encoding=UTF-8<br>Name=.Rotate 0/1<br>Comment=Autorotate the screen <br>Exec=/etc/init.d/accel-rotate switch<br>Icon=tapuntap<br>Terminal=false<br>
Type=Application<br>Categories=Office;<br>MimeType=text/x-vcard;<br>SingleInstance=true<br>StartupNotify=false<br><br></div>