Active Topics

 


Reply
Thread Tools
Posts: 669 | Thanked: 433 times | Joined on May 2010
#1
I thought of sharing this very useful way I am using to connect and control the n900 with VNC client on single shortcut click from windows. This way will execute X11 on the N900 and then run VNC client - all from the windows machine.

What you'll need to have installed:

WinSCP SSH (for windows) client application (freeware can be downloaded from here - http://winscp.net/eng/index.php)
VNC client (for windows) - I use Tight VNC from (can be downloaded from here - http://www.tightvnc.com/)
open SSH server (for N900)
Dbus scripts (for N900)
X11 - vnc server (for N900)

You will need to customize the scripts with your paths, addresses and n900 profile name in case they won't fit.

Create a profile in WinSCP (mine is called N900 and is used in the "vnc.bat" script - replace with your profile name) and make sure it connects (save the password in the profile)

Create a folder with write permissions on N900 "/home/user/smart/flags"
Create a folder with execution permissions on N900 "/home/user/smart/scripts" and copy "keepawake" and "vncmode" into it

Run the vnc.bat from the windows machine and vnc client will be opened and connected to N900.
The device will stay awake as long as you are connected - disconnect to return to normal behavior.

Using similar way for executing remote commands using WinSCP definitely opens up a range of new possibilities, and i am using it myself for a few things already.
Attached Files
File Type: zip VncControl.zip (741 Bytes, 203 views)

Last edited by impeham; 2011-11-19 at 01:06.
 

The Following 4 Users Say Thank You to impeham For This Useful Post:
bingomion's Avatar
Posts: 528 | Thanked: 345 times | Joined on Aug 2010 @ MLB.AU
#2
looks good..
what starts up the scripts in: /home/user/smart/scripts
 
bingomion's Avatar
Posts: 528 | Thanked: 345 times | Joined on Aug 2010 @ MLB.AU
#3
X11-vnc package installed to?
 
Posts: 669 | Thanked: 433 times | Joined on May 2010
#4
Originally Posted by bingomion View Post
X11-vnc package installed to?
yes - sorry i forgot
 
Posts: 1,048 | Thanked: 1,127 times | Joined on Jan 2010 @ Amsterdam
#5
I don't use Win at the moment, but thanks for the dbus-line!

Code:
dbus-send --print-reply --system --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_tklock_mode_change string:unlocked
 
ekze's Avatar
Posts: 115 | Thanked: 95 times | Joined on Oct 2011 @ Sankt-Peterburg, Russia
#6
Hey!
Having problems running this script.

Command '/home/user/smart/scripts/vncmode'
failed with return code 0 and error message
/home/user/smart/scripts/vncmode: line 3:
/home/user/smart/scripts/keepawake: not found

Seems to be something wrong with this part:
while [ -f /home/user/smart/flags/keepawake ]

Apart from keepawake, everything is working great, as it should.


And yeah, the file is present and the permissions are set right, I triple checked. All mentioned packages are also installed.

Can you help me with this?

Last edited by ekze; 2013-05-09 at 06:49.
 
Posts: 669 | Thanked: 433 times | Joined on May 2010
#7
Originally Posted by ekze View Post
Hey!
Having problems running this script.

Command '/home/user/smart/scripts/vncmode'
failed with return code 0 and error message
/home/user/smart/scripts/vncmode: line 3:
/home/user/smart/scripts/keepawake: not found

Seems to be something wrong with this part:
while [ -f /home/user/smart/flags/keepawake ]

Apart from keepawake, everything is working great, as it should.


And yeah, the file is present and the permissions are set right, I triple checked. All mentioned packages are also installed.

Can you help me with this?
Attached. You also need to create "/home/user/smart/flags" folder with write permissions/modify the script to another folder.

Good luck.
Attached Files
File Type: zip keepawake.zip (325 Bytes, 84 views)
 

The Following User Says Thank You to impeham For This Useful Post:
ekze's Avatar
Posts: 115 | Thanked: 95 times | Joined on Oct 2011 @ Sankt-Peterburg, Russia
#8
Thanks, but still no luck...
I am even trying with root and 777 access to both flags and scripts folder.


Command '/home/user/smart/scripts/vncmode'
failed with return code 0 and error message
/home/user/smart/scripts/keepawake:
line 3: Lock: not found
/home/user/smart/scripts/keepawake: line 13: Lock: not found

According to log, it connects without a problem to both WinSCP and TightVNC, but the script just won't work.
If I enter dbus-send from WinSCP terminal the screen wakes up fine.


What am I missing?

Last edited by ekze; 2013-05-11 at 00:06.
 
Posts: 669 | Thanked: 433 times | Joined on May 2010
#9
Originally Posted by ekze View Post
Thanks, but still no luck...
I am even trying with root and 777 access to both flags and scripts folder.


Command '/home/user/smart/scripts/vncmode'
failed with return code 0 and error message
/home/user/smart/scripts/keepawake:
line 3: Lock: not found
/home/user/smart/scripts/keepawake: line 13: Lock: not found

According to log, it connects without a problem to both WinSCP and TightVNC, but the script just won't work.
If I enter dbus-send from WinSCP terminal the screen wakes up fine.


What am I missing?
you can remove both lock lines - this is for my own usage.
 
ekze's Avatar
Posts: 115 | Thanked: 95 times | Joined on Oct 2011 @ Sankt-Peterburg, Russia
#10
Oh, my bad, thanks.
The error message is gone, but the screen won't wake up when i use .bat.
And now there are no any messages to anyhow troubleshoot this.. =\

It seems that the script won't execute, even though it has to.

my vnc.bat:
Code:
@echo off

call "C:\Program Files (x86)\WinSCP\WinSCP.com" N900 /command "option confirm off" "call /home/user/smart/scripts/vncmode" "exit"
call "C:\Program Files\TightVNC\tvnviewer.exe" 192.168.1.90
call "C:\Program Files (x86)\WinSCP\WinSCP.com" N900 /command "option confirm off" "call rm /home/user/smart/flags/keepawake" "exit"
directories:
Code:
/home/user/smart$ ls -l
drwxrwxrwx    2 root     root          4096 May  9 09:54 flags
drwxrwxrwx    2 root     root          4096 May  9 08:56 scripts

/home/user/smart/scripts$ ls -l
-rwxrwxrwx    1 root     root           289 May 11 09:15 keepawake
-rwxrwxrwx    1 root     root            72 May  9 08:55 vncmode

Last edited by ekze; 2013-05-11 at 05:29.
 
Reply


 
Forum Jump


All times are GMT. The time now is 16:39.