Paroli-developer-setup

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(Wiki formatting hell)
(formatting)
Line 3: Line 3:
 
document sshfs way.
 
document sshfs way.
  
# Resources:  
+
 
 +
== Resources: ==
 
* http://czarism.com/easy-peasy-ubuntu-linux-nfs-file-sharing
 
* http://czarism.com/easy-peasy-ubuntu-linux-nfs-file-sharing
 
* http://mirror.unej.ac.id/site/blog/2009/05/02/sharing-folder-di-linux.html
 
* http://mirror.unej.ac.id/site/blog/2009/05/02/sharing-folder-di-linux.html
 
* http://www.linuxconfig.org/HowTo_configure_NFS
 
* http://www.linuxconfig.org/HowTo_configure_NFS
  
# Setting up nfs on the local computer (laptop)
+
== Setting up nfs on the local computer (laptop) ==
 
  sudo apt-get install nfs-kernel-server
 
  sudo apt-get install nfs-kernel-server
  
Line 20: Line 21:
  
  
# Making connection with the phone
+
== Making connection with the phone ==
  
 
* usb networking:
 
* usb networking:
Line 30: Line 31:
  
  
# Mounting local dir from the phone
+
== Mounting local dir from the phone ==
 
  mount -t nfs 192.168.0.200:/home/[username]/[path to paroli] /usr/share/nfs-paroli  
 
  mount -t nfs 192.168.0.200:/home/[username]/[path to paroli] /usr/share/nfs-paroli  
  
  
# Compiling the theme
+
== Compiling the theme ==
 
  cd /usr/share/nfs-paroli/paroli-applications; ./build.sh
 
  cd /usr/share/nfs-paroli/paroli-applications; ./build.sh
  
  
# Running paroli
+
== Running paroli ==
 
  cd /usr/share/nfs-paroli/paroli-scripts; ./paroli-launcher.sh
 
  cd /usr/share/nfs-paroli/paroli-scripts; ./paroli-launcher.sh
  
  
# Frequently asked question about nfs
+
== Frequently asked question about nfs ==
  
 
* Can I map the phone's UID(root) with my local UID (notebookuser=1000)
 
* Can I map the phone's UID(root) with my local UID (notebookuser=1000)

Revision as of 16:11, 21 May 2009

To be able to test the latest paroli directly on the phone, the simplest method to mount the local paroli source via nfs. Maybe sshfs works too. Need somebody to document sshfs way.


Contents

Resources:

Setting up nfs on the local computer (laptop)

sudo apt-get install nfs-kernel-server


The /etc/exports file:

/home/[username]/[path to paroli] 192.168.0.202(rw,sync,no_subtree_check,anonuid=0,anongid=0)


Restart the nfs server:

/etc/init.d/nfs-kernel-server restart


Making connection with the phone

  • usb networking:
sudo ip address add 192.168.0.200/24 dev usb0


  • ssh in:
ssh root@192.168.0.202


Mounting local dir from the phone

mount -t nfs 192.168.0.200:/home/[username]/[path to paroli] /usr/share/nfs-paroli 


Compiling the theme

cd /usr/share/nfs-paroli/paroli-applications; ./build.sh


Running paroli

cd /usr/share/nfs-paroli/paroli-scripts; ./paroli-launcher.sh


Frequently asked question about nfs

  • Can I map the phone's UID(root) with my local UID (notebookuser=1000)

Sadly NO. There were a map_static option, but it was removed in nfs-kernel-server. Here is a 5 year old bugreport about this issue:

 https://bugzilla.redhat.com/show_bug.cgi?id=130261
  • Does anongid and anonuid impact the security.

Certainly. It permits to anybody (on your local network) to be able create files with the remote uid. Root(uid=0) in our freerunner case.

  • Shouldn't I add chmod go+w recursively to that mounted dir, to be able creating files?

Yepp, this is the alternative to using anongid/anonuid in /etc/exports.

  • Is there an alternative to nfs?

Yepp, sshfs would be the easiest. Need somebody to figure out the steps, and update this doc.

Personal tools

To be able to test the latest paroli directly on the phone, the simplest method to mount the local paroli source via nfs. Maybe sshfs works too. Need somebody to document sshfs way.

  1. Resources:
  1. Setting up nfs on the local computer (laptop)
sudo apt-get install nfs-kernel-server


The /etc/exports file:

/home/[username]/[path to paroli] 192.168.0.202(rw,sync,no_subtree_check,anonuid=0,anongid=0)


Restart the nfs server:

/etc/init.d/nfs-kernel-server restart


  1. Making connection with the phone
  • usb networking:
sudo ip address add 192.168.0.200/24 dev usb0


  • ssh in:
ssh root@192.168.0.202


  1. Mounting local dir from the phone
mount -t nfs 192.168.0.200:/home/[username]/[path to paroli] /usr/share/nfs-paroli 


  1. Compiling the theme
cd /usr/share/nfs-paroli/paroli-applications; ./build.sh


  1. Running paroli
cd /usr/share/nfs-paroli/paroli-scripts; ./paroli-launcher.sh


  1. Frequently asked question about nfs
  • Can I map the phone's UID(root) with my local UID (notebookuser=1000)

Sadly NO. There were a map_static option, but it was removed in nfs-kernel-server. Here is a 5 year old bugreport about this issue:

 https://bugzilla.redhat.com/show_bug.cgi?id=130261
  • Does anongid and anonuid impact the security.

Certainly. It permits to anybody (on your local network) to be able create files with the remote uid. Root(uid=0) in our freerunner case.

  • Shouldn't I add chmod go+w recursively to that mounted dir, to be able creating files?

Yepp, this is the alternative to using anongid/anonuid in /etc/exports.

  • Is there an alternative to nfs?

Yepp, sshfs would be the easiest. Need somebody to figure out the steps, and update this doc.