|
|
ViewsNetworking:How access a linux pc desktop from an Internet Tablet using VNC and SSHFrom Internet Tablet TalkThis page is no longer maintained. Please move to this page Using an internet tablet you can connect to your pc and control your desktop as if you were sitting in front of it. This could be via your local network or via the internet. You can also connect to a pc running Windows or OSX, but this example only covers how to connect a n800/n810 running OS2008 to a pc running Ubuntu linux. The are many ways to achieve this. The way explained here is one that is fairly straightforward and secure. By "tunneling" over SSH the connection is encrypted. Although it isn't exactly hard you need to be comfortable using the commandline and editing configuration files. First you need software on the pc. You could set it up in such a way that you log into an existing session, so that you see the same screen as the pc. Or that you create a new session each time you log in. For the first option you could install x11vnc on the pc, and for the second option tightvncserver. In this example the second option is shown. You also need the openssh-server package. Here is explained how to set both up on the pc: https://help.ubuntu.com/community/VNC, and https://help.ubuntu.com/community/VNCOverSSH. Once you have configured tightvncserver start a connection on the pc with the command: vncserver :20 -depth 16 -geometry 800x480 To keep it running even if you close the terminal window you could put a space and a '&' behind the command. Make sure that automatic login on the pc is turned off for the useraccount that you want to use. On the internet tablet you need vncviewer and openssh. You can download the latest version of vncviewer at https://garage.maemo.org/frs/?group_id=119. The package openssh is in the Maemo repositories and can be installed via the Application Manager. To prevent the connection to drop during inactivity go to "settings =>control panel =>connectivity => idle times" and set the idle times to "Unlimited". Then check if the wifi (or bluetooth) connection is active, open Xterm on the internet tablet and enter the following command: ssh -fCNT <username>@<host> -L 5902:127.0.0.1:5920 You will be asked for the password of the pc user. To connect within your local network replace '<username>' with a username on the pc. Replace <host> with the ip address of the pc on your local network. Again you could optionally use a space and a '&' and then close the xterm window. If you only need to connect within your local network you can also use the hostname of your pc, instead of the ip address. The hostname, for example "rick-notebook" can be seen in the network settings on the pc. To connect via the internet replace <host> with the external ip address of your pc. In this case your router must be configured to give a fixed local ip address to the pc, and the external port 22 to be forwarded to port 22 on the pc. Read the manual of your router for details on port forwarding. Next start vncviewer on the Internet Tablet. Select "file => connect to a VNC server". Choose "localhost:2". Enter the vnc password you created during the setup of tightvnc on the pc, not the user password you normally use to login to the pc. If all went well you will see the pc desktop. If you happen to use XFCE on the pc you might not see your desktop background. In that case in select "settings => desktop settings => allow XFCE to manage the desktop". To do a 'right-click' in vncviewer press the "zoom" hardware button while tapping on the screen. To enter text click on a textfield and then use the middle button of the d-pad. Instead of typing the commands shown above each time you could make a .sh script for each of them. Also to prevent having to enter your password each time, you could generate keys. This way your connection is still secure. |