Reply
Thread Tools
Posts: 393 | Thanked: 67 times | Joined on Feb 2010
#1
For those who use the VNC Server, you know that turning the screen off blanks out the VNC session on your remote computer (x11 session).

So if the N900's screen is off (but the phone is on, in standby) you can SSH to it, but cannot have a working VNC session to it. Does anyone know how to enable the VNC even if the screen is off?

ANSWER

This can be resolved by connecting via SSH and typing

dbus-send --print-reply --system --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_tklock_mode_change string:unlocked

The above will turn on the N900 screen, the below will turn the screen off...

dbus-send --print-reply --system --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_tklock_mode_change string:locked

Last edited by mail_e36; 2010-09-10 at 15:36.
 
Posts: 393 | Thanked: 67 times | Joined on Feb 2010
#2
I'm sure someone out there uses a VNC server on the N900...
 
SubCore's Avatar
Posts: 850 | Thanked: 626 times | Joined on Sep 2009 @ Vienna, Austria
#3
the first thing i do when using x11vnc is to disable the screensaver.

the fact that x11vnc cannot reactivate the screen on user input (through the vnc session) can probably be considered as a bug (and it has been reported already, see here).

it is beta quality, after all
and it didn't get pass the QA for extras because of this.
__________________
"What we perceive is not nature itself, but nature exposed to our method of questioning."
-- Werner Karl Heisenberg
 
Posts: 89 | Thanked: 48 times | Joined on Dec 2009 @ Glasgow
#4
Would love if tapping the VNC window prompted the N900 to wake up in the same way tapping the screen (when the keyboard is open) does.

I can hear the N900 vibrate when I click the VNC viewer on my laptop, so I know it's receiving the touch/click events. But it doesn't wake up
 
Posts: 203 | Thanked: 152 times | Joined on May 2009 @ Austria
#5
dbus-send --print-reply --system --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_tklock_mode_change string:unlocked
See this thread: http://talk.maemo.org/showthread.php?p=595359
 

The Following 2 Users Say Thank You to AndiThebest For This Useful Post:
Posts: 89 | Thanked: 48 times | Joined on Dec 2009 @ Glasgow
#6
Ah, thanks! Also, this post in the same thread mentions the screen brightness app, which seems to work as well.
 
Posts: 1,425 | Thanked: 983 times | Joined on May 2010 @ Hong Kong
#7
Originally Posted by AndiThebest View Post
See this thread: http://talk.maemo.org/showthread.php?p=595359
Thank you for the nice script made. I've learn a lot.

For x11vnc server, vanadium (http://talk.maemo.org/member.php?u=37697) has given another solution which utilize an option in x11vnc to make the screen stays on:

Code:
#!/bin/bash
dbus-send --print-reply --system --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_tklock_mode_change string:unlocked

x11vnc -timeout 20 -bg -grabkbd -cursor X
(Save it as, say startvnc.sh in N900 and make it executable)

line 2 (dbus-send) unlocks the phone as AndiThebest recommended
line 3 starts x11vnc
Options:
- times out in 20 seconds if vnc connection hasnt begun
- bg will start the vnc in the background
- grabkbd will lock the keyboard (will also not let the phone blank out!!!)
- cursor X will show a cursor
By vanadium, SOURCE REF: http://talk.maemo.org/showpost.php?p...0&postcount=14

One more thing I'd like to note is that you might want to lock the screen immediate after closing vnc. So you'd like to make the following script to close the screen immediately via ssh:

Code:
#!/bin/bash
dbus-send --print-reply --system --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_tklock_mode_change string:locked
(Save it as, say lock.sh and make it executable)

Thanks AndiThebest and vanadium. I'd have to do it the hard way had they not given these wonderful advices. Now I can put the N900 somewhere and control it remotely over wifi without even get near to it.

Note from mine: Remember to close the vnc afterward. One day I left the office in haste without closing the vnc and the keyboard stay locked by the vnc server which I must hard reboot to get it back. That was silly of me. XD

Last edited by 9000; 2010-05-28 at 02:34.
 

The Following 3 Users Say Thank You to 9000 For This Useful Post:
Magik's Avatar
Posts: 271 | Thanked: 65 times | Joined on May 2010 @ Poland, Białystok
#8
Hello.
First of all: thanks for useful posts

Ok so I made a file named "vnc". Then I pasted first script to it. Next I put that file into /user/bin(to launch it from any folder?) . I made it executable by this command:
Code:
chmod u+x vnc
When i type "vnc" it says "Permission Denied".
When i type"sudo vnc" it prints "sh: vnc: not found"

I don't know much about shell scripts so help would be nice

Last edited by Magik; 2010-07-05 at 12:34.
 
Posts: 56 | Thanked: 31 times | Joined on Jul 2008 @ Austria
#9
Originally Posted by Magik View Post
Code:
chmod u+x vnc
When i type "vnc" it says "Permission Denied".
When i type"sudo vnc" it prints "sh: vnc: not found"
Make sure you don't store it in ~/MyDocs since usually that is a FAT partition which doesn't have UNIX permission bits (not being a UNIX filesystem). Try for example ~ directly.

When calling, do
./vnc
to make it find it in the current working directory. Usually, the current working directory is NOT searched for executables automatically because people would inadvertenly start stuff when they do seemingly harmless commands like "ls", "cp", ...

If in doubt, try the full path:
/home/user/vnc
 
Posts: 81 | Thanked: 9 times | Joined on Nov 2007
#10
My approach is a bit low tech but works fine: When I press the F8 key the VNC client (vncviewer on Fedora) show a popup menu where I can "Send F8". Doing this wakes up the N900 and brings up the volume control, just as if I had pressed the volume control keys on the device itself.
 
Reply


 
Forum Jump


All times are GMT. The time now is 02:23.