Documentation/Maemo PC Connectivity Tutorial/Remote Access

(categorize)
(wikify slightly)
Line 1: Line 1:
-
= Remote Access =
+
== Remote desktop ==
-
 
+
-
= Remote desktop =
+
Maemo PC Connectivity provides tools to access the desktop of a remote machine from a local machine over the network. That is, you can have the desktop GUI of your Maemo device displayed on your host PC and vice-versa. For that, you need to install Maemo PC Connectivity on the Maemo device and Host PC Connectivity on the host PC (Linux, Windows and Mac OS X). This chapter describes how to use these remote desktop tools. For simplicity, it is assumed that you already have a USB network working between the Maemo device and the host PC.
Maemo PC Connectivity provides tools to access the desktop of a remote machine from a local machine over the network. That is, you can have the desktop GUI of your Maemo device displayed on your host PC and vice-versa. For that, you need to install Maemo PC Connectivity on the Maemo device and Host PC Connectivity on the host PC (Linux, Windows and Mac OS X). This chapter describes how to use these remote desktop tools. For simplicity, it is assumed that you already have a USB network working between the Maemo device and the host PC.
-
== Using X11VNC ==
+
=== Using X11VNC ===
With the X11VNC server, it is possible to share the GUI (Graphical User Interface) of your Maemo device with your host PC. That is, you can access the desktop of your Maemo device remotely from the host PC as you are physically using it. Below is described how to configure your Maemo device and host PC for X11VNC access.
With the X11VNC server, it is possible to share the GUI (Graphical User Interface) of your Maemo device with your host PC. That is, you can access the desktop of your Maemo device remotely from the host PC as you are physically using it. Below is described how to configure your Maemo device and host PC for X11VNC access.
-
=== Configuring X11VNC for Maemo ===
+
==== Configuring X11VNC for Maemo ====
If you installed Maemo PC Connectivity, your Maemo device already has a X11VNC server installed.
If you installed Maemo PC Connectivity, your Maemo device already has a X11VNC server installed.
Line 20: Line 18:
* Now you can enable and disable the X11VNC server, change the UDP port and set the loop mode, figure [[#fig:pc_connectivity_mpc_maemo_nm_x11vnc|5.3]].
* Now you can enable and disable the X11VNC server, change the UDP port and set the loop mode, figure [[#fig:pc_connectivity_mpc_maemo_nm_x11vnc|5.3]].
* Click on the '''Apply''' button.
* Click on the '''Apply''' button.
-
 
-
 
{| summary="PC Connectivity Manager - X11VNC tool"
{| summary="PC Connectivity Manager - X11VNC tool"
Line 29: Line 25:
[[Image:mpc_maemo_nm_x11vnc.png|Image mpc_maemo_nm_x11vnc]]
[[Image:mpc_maemo_nm_x11vnc.png|Image mpc_maemo_nm_x11vnc]]
|}
|}
-
 
-
 
As the X11VNC server is not launched automatically when you turn the Maemo device on, you need to start it manually. You can use the PC Connectivity Manager wizard or start X11VNC as any third-party application from the installed application list.
As the X11VNC server is not launched automatically when you turn the Maemo device on, you need to start it manually. You can use the PC Connectivity Manager wizard or start X11VNC as any third-party application from the installed application list.
-
=== Configuring X11VNC for Linux ===
+
==== Configuring X11VNC for Linux ====
If you installed Host PC Connectivity, your Linux host PC already has a VNC client called TightVNC Viewer. Otherwise, you should install the VNC client manually from [http://www.tightvnc.com/download.php TightVNC download] page.
If you installed Host PC Connectivity, your Linux host PC already has a VNC client called TightVNC Viewer. Otherwise, you should install the VNC client manually from [http://www.tightvnc.com/download.php TightVNC download] page.
Line 44: Line 38:
  $ xtightvncviewer 192.168.2.15
  $ xtightvncviewer 192.168.2.15
-
=== Configuring X11VNC for Windows ===
+
==== Configuring X11VNC for Windows ====
If you installed Host PC Connectivity, your Windows host PC already has a VNC client called TightVNC Viewer. Otherwise, you can download and install TightVNC manually from [http://www.tightvnc.com/download.php TightVNC download] page.
If you installed Host PC Connectivity, your Windows host PC already has a VNC client called TightVNC Viewer. Otherwise, you can download and install TightVNC manually from [http://www.tightvnc.com/download.php TightVNC download] page.
Line 52: Line 46:
* Run '''Start - Programs - TightVNC - TigthtVNC Viewer''', figure [[#fig:pc_connectivity_mpc_win_vnc_ip|5.4]].
* Run '''Start - Programs - TightVNC - TigthtVNC Viewer''', figure [[#fig:pc_connectivity_mpc_win_vnc_ip|5.4]].
* Type the IP address of your Maemo device and press the '''Connect''' button.
* Type the IP address of your Maemo device and press the '''Connect''' button.
-
 
-
 
{| summary="TightVNC connection dialog"
{| summary="TightVNC connection dialog"
Line 61: Line 53:
[[Image:mpc_win_vnc_ip.png|Image mpc_win_vnc_ip]]
[[Image:mpc_win_vnc_ip.png|Image mpc_win_vnc_ip]]
|}
|}
-
 
-
 
Now you should see the desktop of your Maemo device on the host PC screen, figure [[#fig:pc_connectivity_mpc_win_vnc_desktop|5.5]].
Now you should see the desktop of your Maemo device on the host PC screen, figure [[#fig:pc_connectivity_mpc_win_vnc_desktop|5.5]].
-
 
-
 
{| summary="TightVNC remote desktop on Windows"
{| summary="TightVNC remote desktop on Windows"
Line 75: Line 63:
|}
|}
-
 
+
==== Configuring X11VNC for Mac OS X ====
-
 
+
-
=== Configuring X11VNC for Mac OS X ===
+
If you installed Host PC Connectivity, your Windows host PC already has a VNC client called TightVNC Viewer. Otherwise, you can download and install TightVNC Java version manually from [http://www.tightvnc.com/download.php TightVNC download] page.
If you installed Host PC Connectivity, your Windows host PC already has a VNC client called TightVNC Viewer. Otherwise, you can download and install TightVNC Java version manually from [http://www.tightvnc.com/download.php TightVNC download] page.
Line 94: Line 80:
Now, you should see the desktop of your Maemo device on the host PC screen, figure [[#fig:pc_connectivity_mpc_mac_vnc_desktop|5.6]].
Now, you should see the desktop of your Maemo device on the host PC screen, figure [[#fig:pc_connectivity_mpc_mac_vnc_desktop|5.6]].
-
 
-
 
{| summary="TightVNC remote desktop on Mac OS X"
{| summary="TightVNC remote desktop on Mac OS X"
Line 104: Line 88:
|}
|}
-
 
+
==== Troubleshooting X11VNC ====
-
 
+
-
=== Troubleshooting X11VNC ===
+
The current X11VNC server (0.9.3-maemo4) available for Maemo Diablo devices may crash if a key is pressed on the host PC keyboard and there is no mapping for that key on the Maemo device. A workaround is to manually add missing key mappings as described below.
The current X11VNC server (0.9.3-maemo4) available for Maemo Diablo devices may crash if a key is pressed on the host PC keyboard and there is no mapping for that key on the Maemo device. A workaround is to manually add missing key mappings as described below.
-
You should install the <span><font face="monospace">xev</font></span> application to the host PC to trace the key codes, which crash the Maemo device.
+
You should install the <code>xev</code> application to the host PC to trace the key codes, which crash the Maemo device.
-
Here is how to install <span><font face="monospace">xev</font></span> to the Linux host PC.
+
Here is how to install <code>xev</code> to the Linux host PC.
  $ sudo apt-get install x11-utils
  $ sudo apt-get install x11-utils
-
Execute the <span><font face="monospace">xev</font></span> application on the host PC.
+
Execute the <code>xev</code> application on the host PC.
  $ xev
  $ xev
-
Type the key on the host PC that crashes the Maemo device. You get something like this on <span><font face="monospace">xev</font></span> output.
+
Type the key on the host PC that crashes the Maemo device. You get something like this on <code>xev</code> output.
-
KeyPress event, serial 31, synthetic NO, window 0x2000001,
+
<pre>
-
root 0x3f, subw 0x0, time 2488134890, (-257,171), root:(294,445),
+
KeyPress event, serial 31, synthetic NO, window 0x2000001,
-
state 0x10, keycode 48 (keysym 0xfe51, dead_acute), same_screen YES,
+
root 0x3f, subw 0x0, time 2488134890, (-257,171), root:(294,445),
-
XLookupString gives 2 bytes: (c2 b4) "'"
+
state 0x10, keycode 48 (keysym 0xfe51, dead_acute), same_screen YES,
-
XmbLookupString gives 0 bytes:
+
XLookupString gives 2 bytes: (c2 b4) "'"
-
XFilterEvent returns: True
+
XmbLookupString gives 0 bytes:
 +
XFilterEvent returns: True
 +
</pre>
-
Get the key code name. In this example, it is <span><font face="monospace">dead_acute</font></span>. On the Maemo Diablo device, map this key to '''None''' in the <span><font face="monospace">/usr/share/applications/hildon/x11vnc.desktop</font></span> file. Add the key mapping for '''dead_acute-None''' as described below.
+
Get the key code name. In this example, it is <code>>dead_acute</code>. On the Maemo Diablo device, map this key to '''None''' in the <code>/usr/share/applications/hildon/x11vnc.desktop</code> file. Add the key mapping for '''dead_acute-None''' as described below.
-
  Exec=/usr/bin/x11vnc -display :0 -nowf -noxdamage -noscr -remap dead_acute-None,&lt;key_name_1&gt;-None,&lt;key_name_N&gt;-None
+
  Exec=/usr/bin/x11vnc -display :0 -nowf -noxdamage -noscr -remap dead_acute-None,<key_name_1>-None,<key_name_N>-None
On your Maemo Diablo device, restart X11VNC server and check if the problem got fixed.
On your Maemo Diablo device, restart X11VNC server and check if the problem got fixed.
-
== Using Rdesktop ==
+
=== Using Rdesktop ===
Rdesktop is a client to access remotely your Windows host PC from your Maemo device. Below are instructions on how to enable Rdesktop access for your Windows host PC and how to use the Rdesktop client on your Maemo device to access the desktop of your Windows host PC.
Rdesktop is a client to access remotely your Windows host PC from your Maemo device. Below are instructions on how to enable Rdesktop access for your Windows host PC and how to use the Rdesktop client on your Maemo device to access the desktop of your Windows host PC.
-
=== Configuring Rdesktop for Windows ===
+
==== Configuring Rdesktop for Windows ====
You must enable the '''Remote Desktop''' feature on your Windows host PC so that you can control it remotely from your Maemo device. For that, you must be logged on as an administrator or as a member of the Administrators group for your Windows PC to enable the Remote Desktop feature.
You must enable the '''Remote Desktop''' feature on your Windows host PC so that you can control it remotely from your Maemo device. For that, you must be logged on as an administrator or as a member of the Administrators group for your Windows PC to enable the Remote Desktop feature.
Line 150: Line 134:
* Click the '''OK''' button.
* Click the '''OK''' button.
* Leave your host PC running and connected to the network with Internet access.
* Leave your host PC running and connected to the network with Internet access.
-
 
-
 
{| summary="Windows Remote Access configuration"
{| summary="Windows Remote Access configuration"
Line 159: Line 141:
[[Image:mpc_win_rdesktop.png|Image mpc_win_rdesktop]]
[[Image:mpc_win_rdesktop.png|Image mpc_win_rdesktop]]
|}
|}
-
 
-
 
If you are running Windows XP Service Pack 2 and you enable Remote Desktop, Windows Firewall is automatically configured to allow Remote Desktop connections to your host PC. However, Remote Desktop does not work if you have Windows Firewall configured to allow no exceptions. To allow exceptions in Windows Firewall, open '''Security Center''' from the '''Control Panel''', click '''Windows Firewall''' and clear the check-box next to '''Don't allow exceptions'''.
If you are running Windows XP Service Pack 2 and you enable Remote Desktop, Windows Firewall is automatically configured to allow Remote Desktop connections to your host PC. However, Remote Desktop does not work if you have Windows Firewall configured to allow no exceptions. To allow exceptions in Windows Firewall, open '''Security Center''' from the '''Control Panel''', click '''Windows Firewall''' and clear the check-box next to '''Don't allow exceptions'''.
-
=== Configuring Rdesktop for Maemo device ===
+
==== Configuring Rdesktop for Maemo device ====
If you installed Maemo PC Connectivity, your Maemo device already has a Rdesktop client installed.
If you installed Maemo PC Connectivity, your Maemo device already has a Rdesktop client installed.
Line 170: Line 150:
Open '''Utilities - X Terminal''' and execute Rdesktop application.
Open '''Utilities - X Terminal''' and execute Rdesktop application.
-
$ rdesktop-cli -u &lt;windows_user&gt; -p &lt;windows_password&gt; &lt;windows_ip_address&gt;
+
<pre>
 +
$ rdesktop-cli -u <windows_user> -p <windows_password> <windows_ip_address>
 +
</pre>
You must pass your user name and password to access the given Windows host PC.
You must pass your user name and password to access the given Windows host PC.
Line 176: Line 158:
Now, you should see the desktop of your Windows host PC on your Maemo device screen.
Now, you should see the desktop of your Windows host PC on your Maemo device screen.
-
== Using X Tunneling ==
+
=== Using X Tunneling ===
With X Tunneling, it is possible to execute an application on your Maemo device and display its GUI on your host PC screen and vice versa using an SSH connection. Below are instructions on how to configure X11 tunneling between the Maemo device and Linux and Max OS X host PC.
With X Tunneling, it is possible to execute an application on your Maemo device and display its GUI on your host PC screen and vice versa using an SSH connection. Below are instructions on how to configure X11 tunneling between the Maemo device and Linux and Max OS X host PC.
Line 184: Line 166:
On Linux and Mac OS X host PCs:
On Linux and Mac OS X host PCs:
-
$ Xephyr :3 -ac -dpi 96 -screen 800x480x16 -host-cursor &amp;
+
<pre>
-
$ ssh -l &lt;maemo_device_user&gt; -R 6002:&lt;host_pc_ip&gt;:6003 &lt;maemo_device_ip&gt;
+
$ Xephyr :3 -ac -dpi 96 -screen 800x480x16 -host-cursor &
-
$ export DISPLAY=:2
+
$ ssh -l <maemo_device_user> -R 6002:<host_pc_ip>:6003 <maemo_device_ip>
-
$ /usr/lib/sapwood/sapwood-server &amp;
+
$ export DISPLAY=:2
-
$ &lt;run_application&gt;
+
$ /usr/lib/sapwood/sapwood-server &
 +
$ <run_application>
 +
</pre>
You should follow these steps to display the GUI of your Linux host PC on your Maemo device. These instructions work only with Linux host PCs.
You should follow these steps to display the GUI of your Linux host PC on your Maemo device. These instructions work only with Linux host PCs.
Line 194: Line 178:
On a Maemo device:
On a Maemo device:
-
$ ssh -l &lt;host_pc_user&gt; -R 6000:&lt;maemo_device_ip&gt;:6000 -X &lt;host_pc_ip&gt;
+
<pre>
-
$ &lt;run_application&gt;
+
$ ssh -l <host_pc_user> -R 6000:<maemo_device_ip>:6000 -X <host_pc_ip>
 +
$ <run_application>
 +
</pre>
[[Category:Documentation]]
[[Category:Documentation]]

Revision as of 12:59, 19 October 2010

Contents

Remote desktop

Maemo PC Connectivity provides tools to access the desktop of a remote machine from a local machine over the network. That is, you can have the desktop GUI of your Maemo device displayed on your host PC and vice-versa. For that, you need to install Maemo PC Connectivity on the Maemo device and Host PC Connectivity on the host PC (Linux, Windows and Mac OS X). This chapter describes how to use these remote desktop tools. For simplicity, it is assumed that you already have a USB network working between the Maemo device and the host PC.

Using X11VNC

With the X11VNC server, it is possible to share the GUI (Graphical User Interface) of your Maemo device with your host PC. That is, you can access the desktop of your Maemo device remotely from the host PC as you are physically using it. Below is described how to configure your Maemo device and host PC for X11VNC access.

Configuring X11VNC for Maemo

If you installed Maemo PC Connectivity, your Maemo device already has a X11VNC server installed.

You can configure the X11VNC server through the PC Connectivity Manager applet, as described below.

  • Run Settings - Control Panel - Connectivity - PC Connectivity Manager.
  • Click on the Advanced button.
  • Select the Tool Manager tab.
  • Now you can enable and disable the X11VNC server, change the UDP port and set the loop mode, figure 5.3.
  • Click on the Apply button.
Figure 5.3: PC Connectivity Manager - X11VNC tool

File:Mpc maemo nm x11vnc.png

As the X11VNC server is not launched automatically when you turn the Maemo device on, you need to start it manually. You can use the PC Connectivity Manager wizard or start X11VNC as any third-party application from the installed application list.

Configuring X11VNC for Linux

If you installed Host PC Connectivity, your Linux host PC already has a VNC client called TightVNC Viewer. Otherwise, you should install the VNC client manually from TightVNC download page.

$ sudo apt-get install xtightvncviewer

You can access your Maemo device through the TightVNC Viewer application by giving the Maemo device IP address.

$ xtightvncviewer 192.168.2.15

Configuring X11VNC for Windows

If you installed Host PC Connectivity, your Windows host PC already has a VNC client called TightVNC Viewer. Otherwise, you can download and install TightVNC manually from TightVNC download page.

You can access your Maemo device through the TightVNC Viewer application by giving the Maemo device IP address.

  • Run Start - Programs - TightVNC - TigthtVNC Viewer, figure 5.4.
  • Type the IP address of your Maemo device and press the Connect button.
Figure 5.4: TightVNC connection dialog

File:Mpc win vnc ip.png

Now you should see the desktop of your Maemo device on the host PC screen, figure 5.5.

Figure 5.5: TightVNC remote desktop on Windows

File:Mpc win vnc desktop.png

Configuring X11VNC for Mac OS X

If you installed Host PC Connectivity, your Windows host PC already has a VNC client called TightVNC Viewer. Otherwise, you can download and install TightVNC Java version manually from TightVNC download page.

  • Download the TightVNC Java version.
  • Create a new folder and uncompress the zip file.
$ mkdir ~/tightvnc
$ mv tightvnc-1.3.10_javabin.tar.gz ~/tightvnc
$ cd ~/tightvnc
$ tar -zxvf tightvnc-1.3.10_javabin.tar.gz

You can access your Maemo device through the TightVNC Viewer application by giving the Maemo device IP address.

$ java VncViewer HOST 192.168.2.15 PORT 5900

Now, you should see the desktop of your Maemo device on the host PC screen, figure 5.6.

Figure 5.6: TightVNC remote desktop on Mac OS X

File:Mpc mac vnc desktop.png

Troubleshooting X11VNC

The current X11VNC server (0.9.3-maemo4) available for Maemo Diablo devices may crash if a key is pressed on the host PC keyboard and there is no mapping for that key on the Maemo device. A workaround is to manually add missing key mappings as described below.

You should install the xev application to the host PC to trace the key codes, which crash the Maemo device.

Here is how to install xev to the Linux host PC.

$ sudo apt-get install x11-utils

Execute the xev application on the host PC.

$ xev

Type the key on the host PC that crashes the Maemo device. You get something like this on xev output.

KeyPress event, serial 31, synthetic NO, window 0x2000001,
root 0x3f, subw 0x0, time 2488134890, (-257,171), root:(294,445),
state 0x10, keycode 48 (keysym 0xfe51, dead_acute), same_screen YES,
XLookupString gives 2 bytes: (c2 b4) "'"
XmbLookupString gives 0 bytes:
XFilterEvent returns: True

Get the key code name. In this example, it is >dead_acute. On the Maemo Diablo device, map this key to None in the /usr/share/applications/hildon/x11vnc.desktop file. Add the key mapping for dead_acute-None as described below.

Exec=/usr/bin/x11vnc -display :0 -nowf -noxdamage -noscr -remap dead_acute-None,<key_name_1>-None,<key_name_N>-None

On your Maemo Diablo device, restart X11VNC server and check if the problem got fixed.

Using Rdesktop

Rdesktop is a client to access remotely your Windows host PC from your Maemo device. Below are instructions on how to enable Rdesktop access for your Windows host PC and how to use the Rdesktop client on your Maemo device to access the desktop of your Windows host PC.

Configuring Rdesktop for Windows

You must enable the Remote Desktop feature on your Windows host PC so that you can control it remotely from your Maemo device. For that, you must be logged on as an administrator or as a member of the Administrators group for your Windows PC to enable the Remote Desktop feature.

To set up your Windows host PC for Rdesktop access:

  • Click Start, point to Settings, click Control Panel, and then double-click the System icon.
  • On the Remote tab, select the Allow users to connect remotely to this computer check-box, figure 5.7.
  • Ensure that you have the proper permissions to connect to your host PC remotely. For that, click the Select Remote Users... button to give access to your user account.
  • Click the OK button.
  • Leave your host PC running and connected to the network with Internet access.
Figure 5.7: Windows Remote Access configuration

File:Mpc win rdesktop.png

If you are running Windows XP Service Pack 2 and you enable Remote Desktop, Windows Firewall is automatically configured to allow Remote Desktop connections to your host PC. However, Remote Desktop does not work if you have Windows Firewall configured to allow no exceptions. To allow exceptions in Windows Firewall, open Security Center from the Control Panel, click Windows Firewall and clear the check-box next to Don't allow exceptions.

Configuring Rdesktop for Maemo device

If you installed Maemo PC Connectivity, your Maemo device already has a Rdesktop client installed.

Open Utilities - X Terminal and execute Rdesktop application.

$ rdesktop-cli -u <windows_user> -p <windows_password> <windows_ip_address>

You must pass your user name and password to access the given Windows host PC.

Now, you should see the desktop of your Windows host PC on your Maemo device screen.

Using X Tunneling

With X Tunneling, it is possible to execute an application on your Maemo device and display its GUI on your host PC screen and vice versa using an SSH connection. Below are instructions on how to configure X11 tunneling between the Maemo device and Linux and Max OS X host PC.

You should follow these steps to display the GUI of your Maemo device on your host PC. These instructions work with Linux and Mac OS X host PCs.

On Linux and Mac OS X host PCs:

$ Xephyr :3 -ac -dpi 96 -screen 800x480x16 -host-cursor &
$ ssh -l <maemo_device_user> -R 6002:<host_pc_ip>:6003 <maemo_device_ip>
$ export DISPLAY=:2
$ /usr/lib/sapwood/sapwood-server &
$ <run_application>

You should follow these steps to display the GUI of your Linux host PC on your Maemo device. These instructions work only with Linux host PCs.

On a Maemo device:

$ ssh -l <host_pc_user> -R 6000:<maemo_device_ip>:6000 -X <host_pc_ip>
$ <run_application>