maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   reverse VNC doesn't work (https://talk.maemo.org/showthread.php?t=60049)

narcisgarcia 2010-08-09 19:16

reverse VNC doesn't work
 
I've tried this command:
Code:

vncviewer -listen
And doesn't return any response and no error.

Does not allow vncviewer command line parameters?

TorstenT 2010-08-10 19:49

Re: reverse VNC doesn't work
 
Quote:

Originally Posted by narcisgarcia (Post 780698)
I've tried this command:
Code:

vncviewer -listen
And doesn't return any response and no error.

Does not allow vncviewer command line parameters?

What do you want to do ? Send the N900 desktop to a PC ?

Then you can use x11vnc on the N900 and xtightvncviewer on a Linux Computer.

narcisgarcia 2010-08-10 21:12

Re: reverse VNC doesn't work
 
I want to give remote support with my N900, receiving other desktops when other people run:
Code:

x11vnc -connect myphone

TorstenT 2010-08-11 22:58

Re: reverse VNC doesn't work
 
Quote:

Originally Posted by narcisgarcia (Post 782109)
I want to give remote support with my N900, receiving other desktops when other people run:
Code:

x11vnc -connect myphone

http://vncviewer.garage.maemo.org/
Quote:

The VNC viewer provides a client that can connect to a VNC server running on a different system and display its desktop.
I haven't found the listen option on the N900 when I type:
vncviewer --help

Therefore, I think that vncviewer has no server mode.

But I don't see a difference which computer starts the connection (client/server role). It's only important that the computers can connect.

fatalsaint 2010-08-11 23:01

Re: reverse VNC doesn't work
 
If you want to see the N900's screen on a computer:

x11vnc on the N900, vncviewer on the computer

If you want to see the computer's screen on the N900:

vncviewer or rdesktop on the N900, x11vnc or RDP on the Computer

If you want to see the N900's screen on the computer and the computers screen on the N900..

x11vnc and vncviewer on the N900.. x11vnc and vncviewer on the computer....

Which scenario are you trying to do?

narcisgarcia 2010-08-12 05:45

Re: reverse VNC doesn't work
 
I want to see any PC's screen on the N900, but also when computer is behind a firewall and not my N900.
This is the main utility of the reverse VNC (server behind any firewall).

Replacing N900 by a notebook, I actually run this in my notebook (which has a public IP or open firewall):
Code:

vncviewer -listen
And people who wants to receive remote support runs this in the PC:
Code:

x11vnc -connect [myaddress]
The x11vnc and vncviewer ported to Maemo/ARM are modified from the standard packages, and don't seem to support command line parameters.

TorstenT 2010-08-12 21:49

Re: reverse VNC doesn't work
 
Quote:

Originally Posted by narcisgarcia (Post 783771)
I want to see any PC's screen on the N900, but also when computer is behind a firewall and not my N900.

It seems that you have a problem with the firewall and not VNC.

You can define a firewall rule for that on your PC.

Another option is to tunnel VNC port 5900 through ssh.

That means the PC connects to your N900 via ssh:

Code:

ssh -R 5900:localhost:5900 user@n900
Then the PC starts x11vnc on port 5900.

On your N900 you connect vncviewer to 127.0.0.1 (port 5900).

If you want to read more, check:
http://magazine.redhat.com/2007/11/0...rt-forwarding/


By the way, it might not be a good idea, that your N900 does not have a firewall.

narcisgarcia 2010-08-13 09:44

Re: reverse VNC doesn't work
 
(with open firewall I meant open port in the firewall)

Ok, the VNC connection with the SSH tunnel works for me (I still miss command line way to call vncviewer with destination)

narcisgarcia 2010-08-13 09:48

Re: reverse VNC doesn't work
 
Oops!
I cannot give my user&password to other people to stablish SSH tunnel! This would be a big security hole!

TorstenT 2010-08-13 18:57

Re: reverse VNC doesn't work
 
Quote:

Originally Posted by narcisgarcia (Post 785104)
Oops!
I cannot give my user&password to other people to stablish SSH tunnel! This would be a big security hole!

You've heard about user management, right ?

1. Add a new user on your N900 as root.

Code:

sudo gainroot
adduser friend

2. Change the login shell for your friend to false on your N900:

Code:

vi /etc/passwd
friend:xxxxxxxxxxxxx:1000:1000:,,,:/home/friend:/bin/false

3. Use the port forwarding with -N (don't log in) on the PC.

Code:

ssh -R 5900:localhost:5900 -N friend@n900
4. Change your friends password on your N900 when finished (if you think that your friend is no friend).

Code:

passwd friend
Additional use a firewall on your N900. Here is an example configuration where 192.168.1.1 is the remote computer connected over wlan0:

Code:

iptables -F INPUT
iptables -A INPUT -i wlan0 -p tcp --source 192.168.1.1 --dport 22 -j ACCEPT
iptables -A INPUT -i wlan0 -p tcp --syn -j DROP
iptables -A INPUT -i wlan0 -p tcp --source 192.168.1.1 -j ACCEPT

iptables -A INPUT -i wlan0 -p icmp -j ACCEPT
iptables -A INPUT -i wlan0 -p udp --source 192.168.1.1 -j ACCEPT

iptables -A INPUT -i usb0 -p all -j ACCEPT
iptables -A INPUT -i lo -p all -j ACCEPT

iptables -A INPUT -j DROP

Read the manual of iptables for more information.

Start the firewall automatically on the N900:

Code:

vi /etc/event.d/iptables
# iptables at start
start on startup
exec /path/to/iptablesConfig



All times are GMT. The time now is 00:46.

vBulletin® Version 3.8.8