Documentation/Maemo PC Connectivity Tutorial/File Sharing

m (1 revision)
(reformat images, add anchor divs, wikify slightly, add links)
 
(2 intermediate revisions not shown)
Line 1: Line 1:
-
 
+
== Disk mounting ==
-
= File Sharing =
+
-
 
+
-
= Disk mounting =
+
Maemo PC Connectivity provides some tools for easily sharing files between a Maemo device and a host PC. You can can mount the file system of a Maemo device to the host PC over a network and interact with it as it is a local disk. Also, it is possible to mount a file system of a host PC to the Maemo device. For that, you have to install Maemo PC Connectivity on the Maemo device and Host PC Connectivity on the host PC (Linux, Windows and Mac OS X).
Maemo PC Connectivity provides some tools for easily sharing files between a Maemo device and a host PC. You can can mount the file system of a Maemo device to the host PC over a network and interact with it as it is a local disk. Also, it is possible to mount a file system of a host PC to the Maemo device. For that, you have to install Maemo PC Connectivity on the Maemo device and Host PC Connectivity on the host PC (Linux, Windows and Mac OS X).
Line 10: Line 7:
The recommended tools and methods to mount the file system of a Maemo device to a host PC are listed in table 6.1.
The recommended tools and methods to mount the file system of a Maemo device to a host PC are listed in table 6.1.
-
 
+
{| class="wikitable"
-
 
+
-
 
+
-
 
+
-
{| border="1" cellpadding="3"
+
|+ '''Table 6.1:''' Recommended mount tools for PC
|+ '''Table 6.1:''' Recommended mount tools for PC
|-
|-
-
| align="CENTER" |
+
|
-
| align="CENTER" | Linux
+
! Linux
-
| align="CENTER" | Windows
+
! Windows
-
| align="CENTER" | Mac OS
+
! Mac OS
|-
|-
-
| align="CENTER" | SSHFS
+
! SSHFS
-
| align="CENTER" | X
+
| X
-
| align="CENTER" |
+
|
-
| align="CENTER" | X
+
| X
|-
|-
-
| align="CENTER" | NFS
+
! NFS
-
| align="CENTER" | X
+
| X
-
| align="CENTER" |
+
|
-
| align="CENTER" | X
+
| X
|-
|-
-
| align="CENTER" | SAMBA
+
! SAMBA
-
| align="CENTER" | X
+
| X
-
| align="CENTER" | X
+
| X
-
| align="CENTER" | X
+
| X
|}
|}
-
 
-
 
The recommended tools and methods to mount the file system of a host PC to a Maemo device are listed in table 6.2.
The recommended tools and methods to mount the file system of a host PC to a Maemo device are listed in table 6.2.
-
 
+
{| class="wikitable"
-
 
+
-
 
+
-
 
+
-
{| border="1" cellpadding="3"
+
|+ '''Table 6.2:''' Recommended mount tools for Maemo device
|+ '''Table 6.2:''' Recommended mount tools for Maemo device
|-
|-
-
| align="CENTER" |
+
|
-
| align="CENTER" | Linux
+
! Linux
-
| align="CENTER" | Windows
+
! Windows
-
| align="CENTER" | Mac OS
+
! Mac OS
|-
|-
-
| align="CENTER" | SSHFS
+
! SSHFS
-
| align="CENTER" | X
+
| X
-
| align="CENTER" |
+
|
-
| align="CENTER" | X
+
| X
|-
|-
-
| align="CENTER" | NFS
+
! NFS
-
| align="CENTER" | X
+
| X
-
| align="CENTER" |
+
|
-
| align="CENTER" |
+
|
|-
|-
-
| align="CENTER" | SAMBA
+
! SAMBA
-
| align="CENTER" | X
+
| X
-
| align="CENTER" | X
+
| X
-
| align="CENTER" | X
+
| X
|}
|}
-
 
-
 
On the host PC, you must type the commands below in the terminal on Linux and Mac OS X and in the Cygwin command shell on Windows.
On the host PC, you must type the commands below in the terminal on Linux and Mac OS X and in the Cygwin command shell on Windows.
-
== Using SSHFS mounts ==
+
=== Using SSHFS mounts ===
-
SSHFS (SSH File System) is a file system client based on the SSH protocol. It allows users to mount locally a remote file system via SSH. With SSHFS, you can remotely access the Maemo device file system from the host PC and vice versa.
+
SSHFS (SSH File System) is a file system client based on the SSH protocol. It allows users to mount locally a remote file system via [[SSH]]. With SSHFS, you can remotely access the Maemo device file system from the host PC and vice versa.
-
{|
+
{{ambox|text=SSHFS mounts do not work on Windows host PC.}}
-
|-
+
-
| [[Image:dialog-information.png]]
+
-
| '''Note:'''  SSHFS mounts do not work on Windows host PC.
+
-
|}
+
If you want to mount the Maemo device file system to your host PC, you can execute the following commands.
If you want to mount the Maemo device file system to your host PC, you can execute the following commands.
-
$ mkdir ~/maemo
+
<pre>
-
$ sshfs user@192.168.2.15:/ ~/maemo -o rw,nonempty
+
$ mkdir ~/maemo
-
user@192.168.2.15's password: &lt;type user password here&gt;
+
$ sshfs user@192.168.2.15:/ ~/maemo -o rw,nonempty
 +
user@192.168.2.15's password: <type user password here>
 +
</pre>
If you did not set the SSH password for <span><font face="monospace">user</font></span> yet, you can use the <span><font face="monospace">root</font></span> account. You should set up the password for the <span><font face="monospace">user</font></span> account by following these steps:
If you did not set the SSH password for <span><font face="monospace">user</font></span> yet, you can use the <span><font face="monospace">root</font></span> account. You should set up the password for the <span><font face="monospace">user</font></span> account by following these steps:
-
$ ssh root@192.168.2.15
+
<pre>
-
root@192.168.2.15's password: &lt;type root password here&gt;
+
$ ssh root@192.168.2.15
-
Nokia-810:~# passwd user
+
root@192.168.2.15's password: <type root password here>
-
Changing password for user
+
Nokia-810:~# passwd user
-
Enter the new password (minimum of 5, maximum of 8 characters)
+
Changing password for user
-
Please use a combination of upper and lower case letters and numbers.
+
Enter the new password (minimum of 5, maximum of 8 characters)
-
New password: &lt;type new user password here&gt;
+
Please use a combination of upper and lower case letters and numbers.
-
Re-enter new password: &lt;retype user password&gt;
+
New password: <type new user password here>
-
Password changed
+
Re-enter new password: <retype user password>
 +
Password changed
 +
</pre>
If you want to mount the host PC file system to your Maemo device, you can execute the following commands:
If you want to mount the host PC file system to your Maemo device, you can execute the following commands:
-
$ mkdir ~/hostpc
+
<pre>
-
$ sshfs &lt;host_pc_user&gt;@&lt;host_pc_ip&gt;:/ ~/hostpc -o rw,nonempty
+
$ mkdir ~/hostpc
-
  &lt;host_pc_user&gt;@&lt;host_pc_ip&gt;'s password: &lt;type user password here&gt;
+
$ sshfs <host_pc_user>@<host_pc_ip>:/ ~/hostpc -o rw,nonempty
 +
  <host_pc_user>@<host_pc_ip>'s password: <type user password here>
 +
</pre>
-
As SSHFS is a user mode file system, you cannot use the standard Linux <span><font face="monospace">mount</font></span> command directly. For example, you should execute the following command to unmount the Maemo device file system from the host PC.
+
As SSHFS is a user mode file system, you cannot use the standard Linux <code>mount</code> command directly. For example, you should execute the following command to unmount the Maemo device file system from the host PC.
  $ fusermount -u ~/maemo
  $ fusermount -u ~/maemo
Line 114: Line 101:
You can configure SSH to use keys and not to ask for a password every time by exchanging the SSH keys as described in the SSH installation chapter.
You can configure SSH to use keys and not to ask for a password every time by exchanging the SSH keys as described in the SSH installation chapter.
-
== Using NFS mounts ==
+
=== Using NFS mounts ===
With NFS (Network File System), you can share folders from your Maemo device or host PC over a network. Below are instructions on how to share a folder from a Maemo device using NFS.
With NFS (Network File System), you can share folders from your Maemo device or host PC over a network. Below are instructions on how to share a folder from a Maemo device using NFS.
-
=== Configuring NFS for Maemo device ===
+
==== Configuring NFS for Maemo device ====
You should follow these steps to share a folder from your Maemo device through NFS using Maemo PC Connectivity configuration widget:
You should follow these steps to share a folder from your Maemo device through NFS using Maemo PC Connectivity configuration widget:
Line 125: Line 112:
* Click on the '''Advanced''' button.
* Click on the '''Advanced''' button.
* Go to the '''Tool Manager''' tab.
* Go to the '''Tool Manager''' tab.
-
* Select the '''NFS''' option. After that, change the options according to your needs, figure [[#fig:pc_connectivity_mpc_maemo_nm_nfs|6.1]].
+
* Select the '''NFS''' option. After that, change the options according to your needs, figure [[#figure-pc_connectivity_mpc_maemo_nm_nfs|6.1]].
-
* Click on the '''Exported Paths''' button. Then add the folders to be shared, figure [[#fig:pc_connectivity_mpc_maemo_nm_nfs_folders|6.2]].
+
* Click on the '''Exported Paths''' button. Then add the folders to be shared, figure [[#figure-pc_connectivity_mpc_maemo_nm_nfs_folders|6.2]].
-
* Click on the '''Allowed IPs''' button. Then add the host PC's IP addresses that are allowed to access the shared folders, figure [[#fig:pc_connectivity_mpc_maemo_nm_nfs_ips|6.3]].
+
* Click on the '''Allowed IPs''' button. Then add the host PC's IP addresses that are allowed to access the shared folders, figure [[#figure-pc_connectivity_mpc_maemo_nm_nfs_ips|6.3]].
 +
<div id="figure-pc_connectivity_mpc_maemo_nm_nfs">
 +
[[Image:mpc_maemo_nm_nfs.png|frame|center|alt=Screenshot of NFS options in connectivity manager|Figure 6.1: PC Connectivity Manager - NFS option]]
 +
</div>
 +
<div id="figure-pc_connectivity_mpc_maemo_nm_nfs_folders">
 +
[[Image:mpc_maemo_nm_nfs_folders.png|frame|center|alt=Screenshot of shared folders list in PC connctivity manager|Figure 6.2: PC Connectivity Manager - Shared folders list]]
 +
</div>
-
{| summary="PC Connectivity Manager - NFS option"
+
<div id="figure-pc_connectivity_mpc_maemo_nm_nfs_ips">
-
|+ align="BOTTOM" |'''Figure 6.1:''' PC Connectivity Manager - NFS option
+
[[Image:mpc_maemo_nm_nfs_ips.png|frame|center|alt=Screenshot of allowed IP list in PC connectivity manager|Figure 6.3: PC Connectivity Manager - Allowed IPs list]]
-
|-
+
</div>
-
|
+
-
[[Image:mpc_maemo_nm_nfs.png|Image mpc_maemo_nm_nfs]]
+
-
|}
+
 +
If you want, you can share a folder from your Maemo device manually. The following steps describe how to share the folder (<code>/home/user/MyDocs</code>) from a Maemo device over a network by giving access to the host PC IP address (<code>192.168.2.14</code>).
-
 
+
Connect to the Maemo device via <code>ssh</code>. Edit the file <code>/etc/exports</code> and add the folder you want to share and set the permissions of your shares (IP addresses).
-
 
+
-
 
+
-
{| summary="PC Connectivity Manager - Shared folders list"
+
-
|+ align="BOTTOM" |'''Figure 6.2:''' PC Connectivity Manager - Shared folders list
+
-
|-
+
-
|
+
-
[[Image:mpc_maemo_nm_nfs_folders.png|Image mpc_maemo_nm_nfs_folders]]
+
-
|}
+
-
 
+
-
 
+
-
 
+
-
 
+
-
 
+
-
{| summary="PC Connectivity Manager - Allowed IPs list"
+
-
|+ align="BOTTOM" |'''Figure 6.3:''' PC Connectivity Manager - Allowed IPs list
+
-
|-
+
-
|
+
-
[[Image:mpc_maemo_nm_nfs_ips.png|Image mpc_maemo_nm_nfs_ips]]
+
-
|}
+
-
 
+
-
 
+
-
 
+
-
If you want, you can share a folder from your Maemo device manually. The following steps describe how to share the folder (<span><font face="monospace">/home/user/MyDocs</font></span>) from a Maemo device over a network by giving access to the host PC IP address (<span><font face="monospace">192.168.2.14</font></span>).
+
-
 
+
-
Connect to the Maemo device via <span><font face="monospace">SSH</font></span>. Edit the file <span><font face="monospace">/etc/exports</font></span> and add the folder you want to share and set the permissions of your shares (IP addresses).
+
  /home/user/MyDocs 192.168.2.14(rw,no_root_squash,async,no_subtree_check)
  /home/user/MyDocs 192.168.2.14(rw,no_root_squash,async,no_subtree_check)
Line 172: Line 138:
  $ /etc/init.d/unfs3 restart
  $ /etc/init.d/unfs3 restart
-
=== Configuring NFS for host PC ===
+
==== Configuring NFS for host PC ====
-
You must follows these steps to share a folder from a host PC over a network and giving access to it for Maemo device's IP address (<span><font face="monospace">192.168.2.15</font></span>):
+
You must follows these steps to share a folder from a host PC over a network and giving access to it for Maemo device's IP address (<code>192.168.2.15</code>):
-
{|
+
{{ambox|text=NFS mounts do not work on Windows host PC.}}
-
|-
+
-
| [[Image:dialog-information.png]]
+
-
| '''Note:'''  NFS mounts do not work on Windows host PC.
+
-
|}
+
-
Edit the file <span><font face="monospace">/etc/exports</font></span> and add the folder you want to share and set the permissions for your shares (IP addresses).
+
Edit the file <code>/etc/exports</code> and add the folder you want to share and set the permissions for your shares (IP addresses).
  /home/&lt;host_pc_user&gt; 192.168.2.15(rw,no_root_squash,async,no_subtree_check)
  /home/&lt;host_pc_user&gt; 192.168.2.15(rw,no_root_squash,async,no_subtree_check)
Line 190: Line 152:
  $ sudo /etc/init.d/unfs3 restart
  $ sudo /etc/init.d/unfs3 restart
-
=== Accessing NFS shares with Maemo device ===
+
==== Accessing NFS shares with Maemo device ====
Once you configured NFS on your Maemo device, you can access the shared folders from your host PC over the network. Below are instructions on how to access the shared NFS folders from the Linux host PC.
Once you configured NFS on your Maemo device, you can access the shared folders from your host PC over the network. Below are instructions on how to access the shared NFS folders from the Linux host PC.
-
On the host PC, run the <span><font face="monospace">showmount</font></span> command to check if NFS sharing is working.
+
On the host PC, run the <code>showmount</code> command to check if NFS sharing is working.
-
$ showmount -e &lt;device_ip&gt;
+
<pre>
-
Export list for 192.168.2.15:
+
$ showmount -e <device_ip>
-
/home/user/MyDocs 192.168.2.14
+
Export list for 192.168.2.15:
 +
/home/user/MyDocs 192.168.2.14
 +
</pre>
Next mount the exported Maemo device folder from the host PC.
Next mount the exported Maemo device folder from the host PC.
-
$ mkdir /tmp/MyDocs
+
<pre>
-
$ sudo mount -t nfs &lt;device_ip&gt;:/home/user/MyDocs /tmp/MyDocs
+
$ mkdir /tmp/MyDocs
 +
$ sudo mount -t nfs <device_ip>:/home/user/MyDocs /tmp/MyDocs
 +
</pre>
You can unmount the same folder with the following command:
You can unmount the same folder with the following command:
Line 209: Line 175:
  $ sudo umount /tmp/MyDocs
  $ sudo umount /tmp/MyDocs
-
=== Accessing NFS shares with Host PC ===
+
==== Accessing NFS shares with Host PC ====
Once you have configured NFS on your host PC, you can access the shared folders from your Maemo device over a network. Below are instructions on how to access the shared NFS folders from your Maemo device.
Once you have configured NFS on your host PC, you can access the shared folders from your Maemo device over a network. Below are instructions on how to access the shared NFS folders from your Maemo device.
Line 215: Line 181:
On the Maemo device mount the shared host PC folder.
On the Maemo device mount the shared host PC folder.
-
$ mkdir ~/hostpc
+
<pre>
-
$ mount -t nfs &lt;host_pc_ip&gt;:/home/&lt;host_pc_user&gt; ~/hostpc
+
$ mkdir ~/hostpc
 +
$ mount -t nfs <host_pc_ip>:/home/<host_pc_user> ~/hostpc
 +
</pre>
You can unmount the same folder with the following command:
You can unmount the same folder with the following command:
Line 222: Line 190:
  $ sudo umount ~/hostpc
  $ sudo umount ~/hostpc
-
== Using Samba mounts ==
+
=== Using Samba mounts ===
Samba allows file sharing between computers over the network. With Samba, you can remotely access the Maemo device file system from the host PC and vice versa. Once you have shared your file system through Samba, it is available every time you reconnect to the network.
Samba allows file sharing between computers over the network. With Samba, you can remotely access the Maemo device file system from the host PC and vice versa. Once you have shared your file system through Samba, it is available every time you reconnect to the network.
-
{|
+
{{ambox|text=Samba does not work on Maemo [[Open development/Maemo roadmap/Fremantle|Fremantle]] devices such as [[Nokia N900|N900]] but works fine with Maemo [[Open development/Maemo roadmap/Diablo|Diablo]] devices such as [[Nokia N800|N800]] and [[Nokia N810|N810]].}}
-
|-
+
-
| [[Image:dialog-information.png]]
+
-
| '''Note:'''  Samba does not work on Maemo Fremantle devices such as N900 but works fine with Maemo Diablo devices such as N800 and N810.
+
-
|}
+
-
=== Configuring Samba for Maemo device ===
+
==== Configuring Samba for Maemo device ====
To be able to share a folder from your Maemo device, you should follow these steps.
To be able to share a folder from your Maemo device, you should follow these steps.
Line 239: Line 203:
* Click on the '''Advanced''' button.
* Click on the '''Advanced''' button.
* Go to the '''Tool Manager''' tab.
* Go to the '''Tool Manager''' tab.
-
* Select the '''Samba''' option. After that, change the options according to your needs (Workgroup, User and Password), figure [[#fig:pc_connectivity_mpc_maemo_nm_samba|6.4]].
+
* Select the '''Samba''' option. After that, change the options according to your needs (Workgroup, User and Password), figure [[#figure-pc_connectivity_mpc_maemo_nm_samba|6.4]].
-
* Click on the '''Exported Paths''' button. Then add the folders to be shared, figure [[#fig:pc_connectivity_mpc_maemo_nm_samba_paths|6.5]].
+
* Click on the '''Exported Paths''' button. Then add the folders to be shared, figure [[#figure-pc_connectivity_mpc_maemo_nm_samba_paths|6.5]].
* Click on the '''Apply''' button.
* Click on the '''Apply''' button.
 +
<div id="figure-pc_connectivity_mpc_maemo_nm_samba">
 +
[[Image:mpc_maemo_nm_samba.png|frame|center|alt=Screenshot of Samba options in PC connectivity manager|Figure 6.4: PC Connectivity Manager - Samba options]]
 +
</div>
-
 
+
<div id="figure-pc_connectivity_mpc_maemo_nm_samba_paths">
-
{| summary="PC Connectivity Manager - Samba options"
+
[[Image:mpc_maemo_nm_samba_paths.png|frame|center|alt=Screenshot of Samba shared folders in PC connectivity manager|Figure 6.5: PC Connectivity Manager - Samba shared folders]]
-
|+ align="BOTTOM" |'''Figure 6.4:''' PC Connectivity Manager - Samba options
+
</div>
-
|-
+
-
|
+
-
[[Image:mpc_maemo_nm_samba.png|Image mpc_maemo_nm_samba]]
+
-
|}
+
-
 
+
-
 
+
-
 
+
-
 
+
-
 
+
-
{| summary="PC Connectivity Manager - Samba shared folders"
+
-
|+ align="BOTTOM" |'''Figure 6.5:''' PC Connectivity Manager - Samba shared folders
+
-
|-
+
-
|
+
-
[[Image:mpc_maemo_nm_samba_paths.png|Image mpc_maemo_nm_samba_paths]]
+
-
|}
+
-
 
+
-
 
+
You can access your host PC shared folders from your Maemo device.
You can access your host PC shared folders from your Maemo device.
* Open the '''Utilities - File Manager''' application.
* Open the '''Utilities - File Manager''' application.
-
* Click on the '''Shared folders''' option, figure [[#fig:pc_connectivity_mpc_maemo_nm_samba_access|6.6]].
+
* Click on the '''Shared folders''' option, figure [[#figure-pc_connectivity_mpc_maemo_nm_samba_access|6.6]].
* Select the desired shared folder.
* Select the desired shared folder.
 +
<div id="figure-pc_connectivity_mpc_maemo_nm_samba_access">
 +
[[Image:mpc_maemo_nm_samba_access.png|frame|center|alt=Screenshot of shared folders dialog in PC connectivity manager|Figure 6.6: PC Connectivity Manager - Shared folders dialog]]
 +
</div>
-
 
+
==== Configuring Samba for Linux ====
-
{| summary="PC Connectivity Manager - Shared folders dialog"
+
-
|+ align="BOTTOM" |'''Figure 6.6:''' PC Connectivity Manager - Shared folders dialog
+
-
|-
+
-
|
+
-
[[Image:mpc_maemo_nm_samba_access.png|Image mpc_maemo_nm_samba_access]]
+
-
|}
+
-
 
+
-
 
+
-
 
+
-
=== Configuring Samba for Linux ===
+
To be able to share a folder from your Linux host PC, you should follow these steps:
To be able to share a folder from your Linux host PC, you should follow these steps:
Line 288: Line 231:
* Open the File Manager ('''Nautilus''').
* Open the File Manager ('''Nautilus''').
* Right click the folder you want to share, and select '''Sharing options'''.
* Right click the folder you want to share, and select '''Sharing options'''.
-
* Type the '''Share name''' and check the '''Guest access''' option, figure [[#fig:pc_connectivity_mpc_linux_ubuntu_samba_share|6.7]].
+
* Type the '''Share name''' and check the '''Guest access''' option, figure [[#figure-pc_connectivity_mpc_linux_ubuntu_samba_share|6.7]].
* Click on the '''Create share''' button.
* Click on the '''Create share''' button.
 +
<div id="figure-pc_connectivity_mpc_linux_ubuntu_samba_share">
 +
[[Image:mpc_linux_ubuntu_samba_share.png|frame|center|alt=Screenshot of folder sharing in Linux|Figure 6.7: Linux folder sharing]]
 +
</div>
-
 
+
If <code>Samba</code> is not installed, Ubuntu requests the installation at this point. Otherwise, you can install <code>Samba</code> manually.
-
{| summary="Linux folder sharing"
+
-
|+ align="BOTTOM" |'''Figure 6.7:''' Linux folder sharing
+
-
|-
+
-
|
+
-
[[Image:mpc_linux_ubuntu_samba_share.png|Image mpc_linux_ubuntu_samba_share]]
+
-
|}
+
-
 
+
-
 
+
-
 
+
-
If <span><font face="monospace">Samba</font></span> is not installed, Ubuntu requests the installation at this point. Otherwise, you can install <span><font face="monospace">Samba</font></span> manually.
+
  $ sudo apt-get install samba
  $ sudo apt-get install samba
Line 308: Line 244:
To access a shared folder from the Maemo device using your Windows host PC.
To access a shared folder from the Maemo device using your Windows host PC.
-
* Open the File Manager (Nautilus) and type: <span><font face="monospace">smb://&lt;maemo_device_ip&gt;</font></span>, figure [[#fig:pc_connectivity_mpc_linux_ubuntu_samba_access|6.8]].
+
* Open the file manager (Nautilus) and type: <code>smb://&lt;maemo_device_ip&gt;</code>, figure [[#figure-pc_connectivity_mpc_linux_ubuntu_samba_access|6.8]].
* Press '''Enter'''.
* Press '''Enter'''.
 +
<div id="figure-pc_connectivity_mpc_linux_ubuntu_samba_access">
 +
[[Image:mpc_linux_ubuntu_samba_access.png|frame|center|alt=Screenshot of accessing shared folder with Final Manager|Figure 6.8: Accessing shared folder with file manager]]
 +
</div>
-
 
+
==== Configuring Samba for Windows ====
-
{| summary="Accessing shared folder with Final Manager"
+
-
|+ align="BOTTOM" |'''Figure 6.8:''' Accessing shared folder with Final Manager
+
-
|-
+
-
|
+
-
[[Image:mpc_linux_ubuntu_samba_access.png|Image mpc_linux_ubuntu_samba_access]]
+
-
|}
+
-
 
+
-
 
+
-
 
+
-
=== Configuring Samba for Windows ===
+
To be able to share a folder from your Windows host PC, you should follow these steps.
To be able to share a folder from your Windows host PC, you should follow these steps.
Line 334: Line 263:
* Click '''Start''', and then click '''Run'''.
* Click '''Start''', and then click '''Run'''.
-
* Type your Maemo device IP address as follows: <span><font face="monospace">&lt;maemo_device_ip&gt;</font></span>.
+
* Type your Maemo device IP address as follows: <code>&lt;maemo_device_ip&gt;</code>.
* The shared folders of your Maemo device are shown.
* The shared folders of your Maemo device are shown.
-
=== Configuring Samba for Mac OS X ===
+
==== Configuring Samba for Mac OS X ====
To be able to share a folder from your Mac OS X host PC, you should follow these steps:
To be able to share a folder from your Mac OS X host PC, you should follow these steps:
Line 343: Line 272:
* Go to '''System Preferences''' and click on the '''Sharing''' icon.
* Go to '''System Preferences''' and click on the '''Sharing''' icon.
* Select the '''File Sharing''' service.
* Select the '''File Sharing''' service.
-
* Add a folder you want to share, and then set the permissions for it, figure [[#fig:pc_connectivity_mpc_mac_samba_share|6.9]].
+
* Add a folder you want to share, and then set the permissions for it, figure [[#figure-pc_connectivity_mpc_mac_samba_share|6.9]].
-
 
+
-
 
+
-
 
+
-
{| summary="Mac OS X Sharing dialog"
+
-
|+ align="BOTTOM" |'''Figure 6.9:''' Mac OS X Sharing dialog
+
-
|-
+
-
|
+
-
[[Image:mpc_mac_samba_share.png|Image mpc_mac_samba_share]]
+
-
|}
+
-
 
+
 +
<div id="figure-pc_connectivity_mpc_mac_samba_share">
 +
[[Image:mpc_mac_samba_share.png|frame|center|alt=Screenshot of Mac OS X sharing dialog|Figure 6.9: Mac OS X Sharing dialog]]
 +
</div>
To access a folder shared from a Maemo device you need to do following on your Mac OS X host PC.
To access a folder shared from a Maemo device you need to do following on your Mac OS X host PC.
Line 360: Line 282:
* Go to the File Manager application ('''Finder''').
* Go to the File Manager application ('''Finder''').
* With the '''Finder''' open, click on the '''Go''' menu and select the '''Connect to Server''' option.
* With the '''Finder''' open, click on the '''Go''' menu and select the '''Connect to Server''' option.
-
* Type your Maemo device IP address as follows: <span><font face="monospace">smb://&lt;maemo_device_ip&gt;</font></span>, figure [[#fig:pc_connectivity_mpc_mac_samba_access|6.10]].
+
* Type your Maemo device IP address as follows: <code>smb://&lt;maemo_device_ip&gt;</code>, figure [[#figure-pc_connectivity_mpc_mac_samba_access|6.10]].
* Click on the '''Connect''' button.
* Click on the '''Connect''' button.
 +
<div id="figure-pc_connectivity_mpc_mac_samba_access">
 +
[[Image:mpc_mac_samba_access.png|frame|center|alt=Screenshot of Mac OS X ‘Connect to Server’ dialog|Figure 6.10: Mac OS X ‘connect to server’ dialog]]
 +
</div>
-
 
+
== File transfer ==
-
{| summary="Mac OS X connect to server dialog"
+
-
|+ align="BOTTOM" |'''Figure 6.10:''' Mac OS X connect to server dialog
+
-
|-
+
-
|
+
-
[[Image:mpc_mac_samba_access.png|Image mpc_mac_samba_access]]
+
-
|}
+
-
 
+
-
 
+
-
 
+
-
= File transfer =
+
You have several different ways to transfer files between a Maemo device and a host PC using tools provided by Maemo PC Connectivity. First, you have to install Maemo PC Connectivity to the Maemo device and Host PC Connectivity to the host PC (Linux, Windows and Mac OS X). Below describes how to use specific file transfer tools available from the Maemo PC Connectivity product. To simplify the process, it has been assumed that you already have a working USB network configured between the Maemo device and host PC.
You have several different ways to transfer files between a Maemo device and a host PC using tools provided by Maemo PC Connectivity. First, you have to install Maemo PC Connectivity to the Maemo device and Host PC Connectivity to the host PC (Linux, Windows and Mac OS X). Below describes how to use specific file transfer tools available from the Maemo PC Connectivity product. To simplify the process, it has been assumed that you already have a working USB network configured between the Maemo device and host PC.
Line 380: Line 295:
On the host PC, you must type the commands below using terminal on Linux and Mac OS and using Cygwin command shell on Windows.
On the host PC, you must type the commands below using terminal on Linux and Mac OS and using Cygwin command shell on Windows.
-
== Using SCP ==
+
=== Using SCP ===
With SCP (Secure Copy), you can securely transfer files between a local and a remote host or between two remote hosts, using the SSH protocol. Below describes in detail how to transfer files between the Maemo device and host PC using SCP.
With SCP (Secure Copy), you can securely transfer files between a local and a remote host or between two remote hosts, using the SSH protocol. Below describes in detail how to transfer files between the Maemo device and host PC using SCP.
Line 388: Line 303:
  $ scp &lt;source_file&gt; &lt;user&gt;@&lt;host_name&gt;:&lt;path&gt;/&lt;target_file&gt;
  $ scp &lt;source_file&gt; &lt;user&gt;@&lt;host_name&gt;:&lt;path&gt;/&lt;target_file&gt;
-
For example, if you want to transfer a file called <span><font face="monospace">file.txt</font></span> from a host PC to a Maemo device, you should use this command on the host PC:
+
For example, if you want to transfer a file called <code>file.txt</code> from a host PC to a Maemo device, you should use this command on the host PC:
  $ scp file.txt root@192.168.2.15:/etc/file.txt
  $ scp file.txt root@192.168.2.15:/etc/file.txt
Line 396: Line 311:
  $ scp &lt;user&gt;@&lt;host_name&gt;:&lt;path&gt;/&lt;source_file&gt; &lt;target_file&gt;
  $ scp &lt;user&gt;@&lt;host_name&gt;:&lt;path&gt;/&lt;source_file&gt; &lt;target_file&gt;
-
For example, if you want to transfer a file called <span><font face="monospace">file.txt</font></span> from a Maemo device to a host PC, you should use this command on host PC:
+
For example, if you want to transfer a file called <code>file.txt</code> from a Maemo device to a host PC, you should use this command on host PC:
  $ scp root@192.168.2.15:/etc/file.txt file.txt
  $ scp root@192.168.2.15:/etc/file.txt file.txt
-
You can use <span><font face="monospace">ssh-key-exchange</font></span> as described in the SSH installation chapter to avoid SSH requiring a password every time.
+
You can use <code>ssh-key-exchange</code> as described in the SSH installation chapter to avoid SSH requiring a password every time.
-
== Using SFTP ==
+
=== Using SFTP ===
After Maemo PC Connectivity has been installed to the Maemo device, your Maemo device folders can be accessed from a host PC using the SFTP client. If you also installed Host PC Connectivity your host PC already has a GUI-based SFTP client, FileZilla, installed. Therefore to access your Maemo device folders from the host PC through SFTP, simply follow these steps.
After Maemo PC Connectivity has been installed to the Maemo device, your Maemo device folders can be accessed from a host PC using the SFTP client. If you also installed Host PC Connectivity your host PC already has a GUI-based SFTP client, FileZilla, installed. Therefore to access your Maemo device folders from the host PC through SFTP, simply follow these steps.
-
Run the FileZilla client, figure [[#fig:pc_connectivity_mpc_sftp|6.11]].
+
Run the FileZilla client, figure [[#figure-pc_connectivity_mpc_sftp|6.11]].
* Linux - Ubuntu: '''Applications - Internet - FileZilla FTP Client'''.
* Linux - Ubuntu: '''Applications - Internet - FileZilla FTP Client'''.
Line 412: Line 327:
* Mac OS: '''/Applications/FileZilla'''.
* Mac OS: '''/Applications/FileZilla'''.
-
 
+
<div id="figure-pc_connectivity_mpc_sftp">
-
 
+
[[Image:mpc_sftp.png|frame|center|alt=Screenshot of FileZilla FTP client|Figure 6.11: FileZilla FTP client]]
-
{| summary="FileZilla FTP Client"
+
</div>
-
|+ align="BOTTOM" |'''Figure 6.11:''' FileZilla FTP Client
+
-
|-
+
-
|
+
-
[[Image:mpc_sftp.png|Image mpc_sftp]]
+
-
|}
+
-
 
+
-
 
+
* Type the IP address of your Maemo device in the '''Host''' field.
* Type the IP address of your Maemo device in the '''Host''' field.
Line 427: Line 335:
* Click on the '''Quickconnect''' button. Your Maemo device folders will appear in the '''Remote Site''' area.
* Click on the '''Quickconnect''' button. Your Maemo device folders will appear in the '''Remote Site''' area.
-
== Using Rsync ==
+
=== Using Rsync ===
As Maemo PC Connectivity and Host PC Connectivity products installs Rsync for your environment, you can incrementally transfer files and directories between a Maemo device and a host PC. You can send and receive files in such a way that only the changed bytes inside files are copied between the Maemo device and the host PC. Rsync also removes files from target folders if those files were deleted from the source folders in order to keep both folders in sync. You can find usage examples and documentation about Rsync from the [http://rsync.samba.org/ Rsync web page].
As Maemo PC Connectivity and Host PC Connectivity products installs Rsync for your environment, you can incrementally transfer files and directories between a Maemo device and a host PC. You can send and receive files in such a way that only the changed bytes inside files are copied between the Maemo device and the host PC. Rsync also removes files from target folders if those files were deleted from the source folders in order to keep both folders in sync. You can find usage examples and documentation about Rsync from the [http://rsync.samba.org/ Rsync web page].
Line 433: Line 341:
Rsync is a much more powerful tool than standard SCP, SFTP or disk mounts to back up or synchronise large files (such as music, pictures, maps and movies) between a Maemo device and a host PC.
Rsync is a much more powerful tool than standard SCP, SFTP or disk mounts to back up or synchronise large files (such as music, pictures, maps and movies) between a Maemo device and a host PC.
-
{|
+
{{ambox|text=Rsync protocol is also used by several backup and file synchronisation services available from the Internet.}}
-
|-
+
 
-
| [[Image:dialog-information.png]]
+
[[Category:Documentation]]
-
| '''Note:'''  Rsync protocol is also used by several backup and file synchronisation services available from the Internet.
+
-
|}
+

Latest revision as of 11:58, 4 November 2010

Contents

[edit] Disk mounting

Maemo PC Connectivity provides some tools for easily sharing files between a Maemo device and a host PC. You can can mount the file system of a Maemo device to the host PC over a network and interact with it as it is a local disk. Also, it is possible to mount a file system of a host PC to the Maemo device. For that, you have 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 the disk mounting tools available with Maemo PC Connectivity. To simplify the process, it is assumed that you already have a working USB network between your Maemo device and the host PC.

The recommended tools and methods to mount the file system of a Maemo device to a host PC are listed in table 6.1.

Table 6.1: Recommended mount tools for PC
Linux Windows Mac OS
SSHFS X X
NFS X X
SAMBA X X X

The recommended tools and methods to mount the file system of a host PC to a Maemo device are listed in table 6.2.

Table 6.2: Recommended mount tools for Maemo device
Linux Windows Mac OS
SSHFS X X
NFS X
SAMBA X X X

On the host PC, you must type the commands below in the terminal on Linux and Mac OS X and in the Cygwin command shell on Windows.

[edit] Using SSHFS mounts

SSHFS (SSH File System) is a file system client based on the SSH protocol. It allows users to mount locally a remote file system via SSH. With SSHFS, you can remotely access the Maemo device file system from the host PC and vice versa.

Image:Ambox_notice.png
SSHFS mounts do not work on Windows host PC.

If you want to mount the Maemo device file system to your host PC, you can execute the following commands.

$ mkdir ~/maemo
$ sshfs user@192.168.2.15:/ ~/maemo -o rw,nonempty
user@192.168.2.15's password: <type user password here>

If you did not set the SSH password for user yet, you can use the root account. You should set up the password for the user account by following these steps:

$ ssh root@192.168.2.15
root@192.168.2.15's password: <type root password here>
Nokia-810:~# passwd user
Changing password for user
Enter the new password (minimum of 5, maximum of 8 characters)
Please use a combination of upper and lower case letters and numbers.
New password: <type new user password here>
Re-enter new password: <retype user password>
Password changed

If you want to mount the host PC file system to your Maemo device, you can execute the following commands:

$ mkdir ~/hostpc
$ sshfs <host_pc_user>@<host_pc_ip>:/ ~/hostpc -o rw,nonempty
 <host_pc_user>@<host_pc_ip>'s password: <type user password here>

As SSHFS is a user mode file system, you cannot use the standard Linux mount command directly. For example, you should execute the following command to unmount the Maemo device file system from the host PC.

$ fusermount -u ~/maemo

You can configure SSH to use keys and not to ask for a password every time by exchanging the SSH keys as described in the SSH installation chapter.

[edit] Using NFS mounts

With NFS (Network File System), you can share folders from your Maemo device or host PC over a network. Below are instructions on how to share a folder from a Maemo device using NFS.

[edit] Configuring NFS for Maemo device

You should follow these steps to share a folder from your Maemo device through NFS using Maemo PC Connectivity configuration widget:

  • Run Settings - Control Panel - Connectivity - PC Connectivity Manager.
  • Click on the Advanced button.
  • Go to the Tool Manager tab.
  • Select the NFS option. After that, change the options according to your needs, figure 6.1.
  • Click on the Exported Paths button. Then add the folders to be shared, figure 6.2.
  • Click on the Allowed IPs button. Then add the host PC's IP addresses that are allowed to access the shared folders, figure 6.3.
File:Mpc maemo nm nfs.png
Figure 6.1: PC Connectivity Manager - NFS option
File:Mpc maemo nm nfs folders.png
Figure 6.2: PC Connectivity Manager - Shared folders list
File:Mpc maemo nm nfs ips.png
Figure 6.3: PC Connectivity Manager - Allowed IPs list

If you want, you can share a folder from your Maemo device manually. The following steps describe how to share the folder (/home/user/MyDocs) from a Maemo device over a network by giving access to the host PC IP address (192.168.2.14).

Connect to the Maemo device via ssh. Edit the file /etc/exports and add the folder you want to share and set the permissions of your shares (IP addresses).

/home/user/MyDocs 192.168.2.14(rw,no_root_squash,async,no_subtree_check)

Next restart the User Mode NFS server:

$ /etc/init.d/unfs3 restart

[edit] Configuring NFS for host PC

You must follows these steps to share a folder from a host PC over a network and giving access to it for Maemo device's IP address (192.168.2.15):

Image:Ambox_notice.png
NFS mounts do not work on Windows host PC.

Edit the file /etc/exports and add the folder you want to share and set the permissions for your shares (IP addresses).

/home/<host_pc_user> 192.168.2.15(rw,no_root_squash,async,no_subtree_check)

Next restart the User Mode NFS server:

$ sudo /etc/init.d/unfs3 restart

[edit] Accessing NFS shares with Maemo device

Once you configured NFS on your Maemo device, you can access the shared folders from your host PC over the network. Below are instructions on how to access the shared NFS folders from the Linux host PC.

On the host PC, run the showmount command to check if NFS sharing is working.

$ showmount -e <device_ip>
Export list for 192.168.2.15:
/home/user/MyDocs 192.168.2.14

Next mount the exported Maemo device folder from the host PC.

$ mkdir /tmp/MyDocs
$ sudo mount -t nfs <device_ip>:/home/user/MyDocs /tmp/MyDocs

You can unmount the same folder with the following command:

$ sudo umount /tmp/MyDocs

[edit] Accessing NFS shares with Host PC

Once you have configured NFS on your host PC, you can access the shared folders from your Maemo device over a network. Below are instructions on how to access the shared NFS folders from your Maemo device.

On the Maemo device mount the shared host PC folder.

$ mkdir ~/hostpc
$ mount -t nfs <host_pc_ip>:/home/<host_pc_user> ~/hostpc

You can unmount the same folder with the following command:

$ sudo umount ~/hostpc

[edit] Using Samba mounts

Samba allows file sharing between computers over the network. With Samba, you can remotely access the Maemo device file system from the host PC and vice versa. Once you have shared your file system through Samba, it is available every time you reconnect to the network.

Image:Ambox_notice.png
Samba does not work on Maemo Fremantle devices such as N900 but works fine with Maemo Diablo devices such as N800 and N810.

[edit] Configuring Samba for Maemo device

To be able to share a folder from your Maemo device, you should follow these steps.

  • Run Settings - Control Panel - Connectivity - PC Connectivity Manager.
  • Click on the Advanced button.
  • Go to the Tool Manager tab.
  • Select the Samba option. After that, change the options according to your needs (Workgroup, User and Password), figure 6.4.
  • Click on the Exported Paths button. Then add the folders to be shared, figure 6.5.
  • Click on the Apply button.
File:Mpc maemo nm samba.png
Figure 6.4: PC Connectivity Manager - Samba options
File:Mpc maemo nm samba paths.png
Figure 6.5: PC Connectivity Manager - Samba shared folders

You can access your host PC shared folders from your Maemo device.

  • Open the Utilities - File Manager application.
  • Click on the Shared folders option, figure 6.6.
  • Select the desired shared folder.
File:Mpc maemo nm samba access.png
Figure 6.6: PC Connectivity Manager - Shared folders dialog

[edit] Configuring Samba for Linux

To be able to share a folder from your Linux host PC, you should follow these steps:

  • Open the File Manager (Nautilus).
  • Right click the folder you want to share, and select Sharing options.
  • Type the Share name and check the Guest access option, figure 6.7.
  • Click on the Create share button.
File:Mpc linux ubuntu samba share.png
Figure 6.7: Linux folder sharing

If Samba is not installed, Ubuntu requests the installation at this point. Otherwise, you can install Samba manually.

$ sudo apt-get install samba

To access a shared folder from the Maemo device using your Windows host PC.

  • Open the file manager (Nautilus) and type: smb://<maemo_device_ip>, figure 6.8.
  • Press Enter.
File:Mpc linux ubuntu samba access.png
Figure 6.8: Accessing shared folder with file manager

[edit] Configuring Samba for Windows

To be able to share a folder from your Windows host PC, you should follow these steps.

  • Open the File Manager (Windows Explorer).
  • Right click the appropriate folder, and then click Sharing.
  • In the folder's properties, click Share this folder. Use the default name for the share.
  • Click the Permissions button to change permissions according to your needs.

To access a folder shared from your Maemo device, you need to do the following on your Windows host PC:

  • Click Start, and then click Run.
  • Type your Maemo device IP address as follows: <maemo_device_ip>.
  • The shared folders of your Maemo device are shown.

[edit] Configuring Samba for Mac OS X

To be able to share a folder from your Mac OS X host PC, you should follow these steps:

  • Go to System Preferences and click on the Sharing icon.
  • Select the File Sharing service.
  • Add a folder you want to share, and then set the permissions for it, figure 6.9.
File:Mpc mac samba share.png
Figure 6.9: Mac OS X Sharing dialog

To access a folder shared from a Maemo device you need to do following on your Mac OS X host PC.

  • Go to the File Manager application (Finder).
  • With the Finder open, click on the Go menu and select the Connect to Server option.
  • Type your Maemo device IP address as follows: smb://<maemo_device_ip>, figure 6.10.
  • Click on the Connect button.
File:Mpc mac samba access.png
Figure 6.10: Mac OS X ‘connect to server’ dialog

[edit] File transfer

You have several different ways to transfer files between a Maemo device and a host PC using tools provided by Maemo PC Connectivity. First, you have to install Maemo PC Connectivity to the Maemo device and Host PC Connectivity to the host PC (Linux, Windows and Mac OS X). Below describes how to use specific file transfer tools available from the Maemo PC Connectivity product. To simplify the process, it has been assumed that you already have a working USB network configured between the Maemo device and host PC.

On the host PC, you must type the commands below using terminal on Linux and Mac OS and using Cygwin command shell on Windows.

[edit] Using SCP

With SCP (Secure Copy), you can securely transfer files between a local and a remote host or between two remote hosts, using the SSH protocol. Below describes in detail how to transfer files between the Maemo device and host PC using SCP.

You should follow the SCP command examples below to transfer files from a local to a remote host:

$ scp <source_file> <user>@<host_name>:<path>/<target_file>

For example, if you want to transfer a file called file.txt from a host PC to a Maemo device, you should use this command on the host PC:

$ scp file.txt root@192.168.2.15:/etc/file.txt

You should follow this SCP command example to transfer files from a remote to a local host:

$ scp <user>@<host_name>:<path>/<source_file> <target_file>

For example, if you want to transfer a file called file.txt from a Maemo device to a host PC, you should use this command on host PC:

$ scp root@192.168.2.15:/etc/file.txt file.txt

You can use ssh-key-exchange as described in the SSH installation chapter to avoid SSH requiring a password every time.

[edit] Using SFTP

After Maemo PC Connectivity has been installed to the Maemo device, your Maemo device folders can be accessed from a host PC using the SFTP client. If you also installed Host PC Connectivity your host PC already has a GUI-based SFTP client, FileZilla, installed. Therefore to access your Maemo device folders from the host PC through SFTP, simply follow these steps.

Run the FileZilla client, figure 6.11.

  • Linux - Ubuntu: Applications - Internet - FileZilla FTP Client.
  • Windows: Start - Programs - FileZilla FTP Client - FileZilla.
  • Mac OS: /Applications/FileZilla.
File:Mpc sftp.png
Figure 6.11: FileZilla FTP client
  • Type the IP address of your Maemo device in the Host field.
  • Type your Username and Password to set up the SSH connection on your Maemo device and type 22 (for SSH) in the Port field.
  • Click on the Quickconnect button. Your Maemo device folders will appear in the Remote Site area.

[edit] Using Rsync

As Maemo PC Connectivity and Host PC Connectivity products installs Rsync for your environment, you can incrementally transfer files and directories between a Maemo device and a host PC. You can send and receive files in such a way that only the changed bytes inside files are copied between the Maemo device and the host PC. Rsync also removes files from target folders if those files were deleted from the source folders in order to keep both folders in sync. You can find usage examples and documentation about Rsync from the Rsync web page.

Rsync is a much more powerful tool than standard SCP, SFTP or disk mounts to back up or synchronise large files (such as music, pictures, maps and movies) between a Maemo device and a host PC.

Image:Ambox_notice.png
Rsync protocol is also used by several backup and file synchronisation services available from the Internet.