maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2008 / Maemo 4 / Chinook - Diablo (https://talk.maemo.org/forumdisplay.php?f=29)
-   -   How to rotate screen on os2008 (https://talk.maemo.org/showthread.php?t=17842)

qwerty12 2008-03-13 22:06

Re: How to rotate screen on os2008
 
I removed my powerlaunch. Back to good old mce...

Thanks :)

Benson 2008-03-13 22:28

Re: How to rotate screen on os2008
 
Here it is, new and improved:
Code:

#!/bin/sh
if [ "x$1" == x ] ; then
  direction=normal
else
  direction=$1
fi

case $direction in
  [Cc][Ww])
    direction=`xrandr --verbose|awk '/connected/ {print $5}'`
    case $direction in
      normal)
        direction=left;
        ;;
      left)
        direction=inverted;
        ;;
      inverted)
        direction=right;
        ;;
      right)
        direction=normal;
      ;;
    ;;
  [Cc][Cc][Ww])
    direction=`xrandr --verbose|awk '/connected/ {print $5}'`
    case $direction in
      normal)
        direction=right;
        ;;
      left)
        direction=normal;
        ;;
      inverted)
        direction=left;
        ;;
      right)
        direction=inverted;
      ;;
    ;;
esac

case $direction in
  [Nn]ormal)
    xmodmap -e "keycode 114 = Right" -e "keycode 111 = Up" -e "keycode 113 = Left" -e "keycode 116 = Down";
    ;;
  [Ll]eft)
    xmodmap -e "keycode 114 = Down" -e "keycode 111 = Right" -e "keycode 113 = Up" -e "keycode 116 = Left";
    ;;
  [Ii]nverted)
    xmodmap -e "keycode 114 = Left" -e "keycode 111 = Down" -e "keycode 113 = Right" -e "keycode 116 = Up";
    ;;
  [Rr]ight)
    xmodmap -e "keycode 114 = Up" -e "keycode 111 = Left" -e "keycode 113 = Down" -e "keycode 116 = Right";
    ;;
  *)
    echo "Usage: $0 [ cw | ccw | normal | inverted | left | right ]";
    exit 1;
    ;;
esac

xrandr -o $direction

EDIT: Curious why you ditched it? I think there's nothing greater. (With some modifications, of course. The default config doesn't do the fine software justice.)

EDIT: Now integrated into zip in my post above.

qwerty12 2008-03-13 22:42

Re: How to rotate screen on os2008
 
Thanks :)

My alarms would not run with it, the device wouldn't code lock upon boot, when I edited the config files to run switchonbt for example, it would never accept my change, if I used select connection from connection applet, it wouldn't realise the device was in normal mode. Also, I am not a developer so the glade files went over my head. I liked the calendar function but tbh, that was it.

@fanoush

I just saw, jott placed his patch on his site.

Benson 2008-03-13 22:51

Re: How to rotate screen on os2008
 
One or two of those bothered me, but not enough to get up and fix it yet. (codelock, and on/offline). I love it because it lets me play music using hardware keys in my pocket, it lets me swap windows (to ones that don't show up in the list), and control brightness, and now orientation as well. I haven't really got xkbd set up "right" yet, but I use it to throw that up, too. And I really had no use for the calendar function. Heh. To each his own, and all that, but if you've ever a mind to try it again, PM me, and I'll help you get a decent config set up.

That aside, I just discovered one wierdness with my script; xmodmapping the d-pad also affects the cursor keys on my BT keyboard. :( Not sure if there really is anything to be done on that or not; if anyone has a clue, I'd be happy to integrate that. I'll poke at it some more, but meantime, if the BT keyboard is more important than the dpad to anyone, just don't use the script (call xrandr -o < normal | left | inverted | right >) or modify it to not xmodmap things.

fanoush 2008-03-13 23:10

Re: How to rotate screen on os2008
 
Quote:

Originally Posted by qwerty12 (Post 154676)
@fanoush

I just saw, jott placed his patch on his site.

Yes, I have asked him earlier today, got his mail few minutes ago, did similar fix in my code and re-uploaded. Seems to suspend and restore fine now.

JonnyBruha 2008-03-14 04:59

Re: How to rotate screen on os2008
 
I'll try my best to not be a newb, despite my post count.

I thought I had installed this application correctly, but apparently, I didn't do something vital. I successfully installed all of the packages and I'm only fairly certain I updated the kernel correctly. I was able to get the rotation icon in the statusbar, but when I use it to rotate the screen, only the sensitivity of the screen rotates. The screen appears to still be in landscape orientation, but I have to tap the screen as if the rotation was done successfully.

I'm going to reload the backup I made before trying this again, but has anyone else any idea what I might have done wrong the first time?

mooler 2008-03-14 05:06

Re: How to rotate screen on os2008
 
Is there a step by step guide on how to do this?

I am confused about flashing the kernel. I know i can do this from the tablet itself. But, how do I do it? I've downloaded the files (http://sse2.net/rotate/) to my tablet along with the fanoush flasher for the n800 (to flash directly on the tablet) but I just dont get it.

I do not have linux installed natively. But I am using VMware with DSL (Dam Small Linux and Ubuntu Gutsy)

qwerty12 2008-03-14 06:46

Re: How to rotate screen on os2008
 
Quote:

Originally Posted by mooler (Post 154841)
Is there a step by step guide on how to do this?

I am confused about flashing the kernel. I know i can do this from the tablet itself. But, how do I do it? I've downloaded the files (http://sse2.net/rotate/) to my tablet along with the fanoush flasher for the n800 (to flash directly on the tablet) but I just dont get it.

I do not have linux installed natively. But I am using VMware with DSL (Dam Small Linux and Ubuntu Gutsy)

Ok flashing the kernel.

You need to become root. Install easyroot or becomeroot. That is up to you.

In your Terminal, type "sudo gainroot"

Then type "cd MyDocs/"

Now, type "apt-get install wget" (if this fails, use the web browser to download files TO your "device name folder")

wget http://fanoush.wz.cz/maemo/kernel-2.2007.50-2-rotation.tar.gz

wget http://fanoush.wz.cz/maemo/kernel_flasher.tgz

tar zxvf kernel_flasher.tgz
tar zxvf kernel-2.2007.50-2-rotation.tar.gz

mv zImage kernel_flasher/
cd kernel_flasher/
./kernel_flash zImage

As for the deb files, the page in the first post tells you how to do it. Although, I must admit, I didn't use it.

arjun-giri 2008-03-14 06:47

Re: How to rotate screen on os2008
 
both flasher-3.0 and kernel_flash saying - permission denied (in both root and user modes ) chmod +x or chmod a+x not working

and what to do with the code posted by Benson

please help

qwerty12 2008-03-14 06:51

Re: How to rotate screen on os2008
 
flasher-3.0 runs on computer. You DON'T extract kernel_flasher to memory card.


All times are GMT. The time now is 19:34.

vBulletin® Version 3.8.8