Paroli-developer-setup

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(formatting)
Line 1: Line 1:
== Setting up paroli with a '''FreeRunner''' ==
+
== Setting up paroli WITH a FreeRunner ==
  
 
To be able to test the latest paroli directly on the phone, the simplest method to  
 
To be able to test the latest paroli directly on the phone, the simplest method to  
Line 67: Line 67:
  
  
== Setting up Paroli without a FreeRunner ==
+
== Setting up Paroli WITHOUT a FreeRunner ==
  
 
Note: This guide is a bit ugly, and if you have better ideas and eg. document how to do everything non-root, feel free to fill in.
 
Note: This guide is a bit ugly, and if you have better ideas and eg. document how to do everything non-root, feel free to fill in.

Revision as of 14:20, 23 May 2009

Contents

Setting up paroli WITH a FreeRunner

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.


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.


Setting up Paroli WITHOUT a FreeRunner

Note: This guide is a bit ugly, and if you have better ideas and eg. document how to do everything non-root, feel free to fill in.

E17

Enlightenment 17 (E17) used by Paroli is a big bunch of code which is not readily packaged to most distributions (largely because no release is declared stable so it's a moving target). One script to help installing E17 is available at omicron, Easy_e17.sh.

Easy_e17 checks out and installs most of E17 automatically, under /opt/e17. If you dislike running random scripts from the web, check the script first before running. You can rerun it with "-u" to update or "-i" to try installing again if for example some dependencies were missing during the first run. If some compilation fails, check out the error message and install needed dependencies. It may get a few iterations of "-i" before you get to the finish without errors, so prepare to spend some time.

Set up your environment to use the installed E17 with something like follows, putting the commands into eg. ~/paroli_environment.sh:

export PATH=${PATH}:/opt/e17/bin
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/e17/lib
export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/opt/e17/lib/pkgconfig
export PYTHONPATH=${PYTHONPATH}:/usr/local/lib/python2.6/site-packages

Easy_e17 does not seem to install Python bindings E17, but it does download them. By default you can find them in your home directory under ~/e17_src/BINDINGS/python. Those are required for Paroli. Install them with eg. sudo bash; . ~/paroli_environment.sh ; ./build-all.sh /usr/local.

Paroli

Check out Paroli source code from the git repository as usual.

Paroli seems to require additional D-BUS rule. Type:

cat << EOF | sudo tee /etc/dbus-1/system.d/org.tichy.launcher.conf

<?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- -->

<!DOCTYPE busconfig PUBLIC
 "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
  <!-- Only polkituser can own the service -->
  <policy user="root">
    <allow own="org.tichy.launcher"/>
  </policy>

  <!-- any user can talk to the service -->
  <policy context="default">
    <allow send_destination="org.tichy.launcher"/>
  </policy>
</busconfig>

[End with Ctrl-D]

Restart D-Bus (or computer) with /etc/init.d/dbus restart. Run build.sh under paroli-applications and then paroli under paroli-scripts.

...XXX getting segmentation fault at the moment at this point, even though Paroli starts running, searching for contacts etc.

Personal tools

Setting up paroli with a FreeRunner

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.


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.


Setting up Paroli without a FreeRunner

Note: This guide is a bit ugly, and if you have better ideas and eg. document how to do everything non-root, feel free to fill in.

E17

Enlightenment 17 (E17) used by Paroli is a big bunch of code which is not readily packaged to most distributions (largely because no release is declared stable so it's a moving target). One script to help installing E17 is available at omicron, Easy_e17.sh.

Easy_e17 checks out and installs most of E17 automatically, under /opt/e17. If you dislike running random scripts from the web, check the script first before running. You can rerun it with "-u" to update or "-i" to try installing again if for example some dependencies were missing during the first run. If some compilation fails, check out the error message and install needed dependencies. It may get a few iterations of "-i" before you get to the finish without errors, so prepare to spend some time.

Set up your environment to use the installed E17 with something like follows, putting the commands into eg. ~/paroli_environment.sh:

export PATH=${PATH}:/opt/e17/bin
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/e17/lib
export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/opt/e17/lib/pkgconfig
export PYTHONPATH=${PYTHONPATH}:/usr/local/lib/python2.6/site-packages

Easy_e17 does not seem to install Python bindings E17, but it does download them. By default you can find them in your home directory under ~/e17_src/BINDINGS/python. Those are required for Paroli. Install them with eg. sudo bash; . ~/paroli_environment.sh ; ./build-all.sh /usr/local.

Paroli

Check out Paroli source code from the git repository as usual.

Paroli seems to require additional D-BUS rule. Type:

cat << EOF | sudo tee /etc/dbus-1/system.d/org.tichy.launcher.conf

<?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- -->

<!DOCTYPE busconfig PUBLIC
 "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
  <!-- Only polkituser can own the service -->
  <policy user="root">
    <allow own="org.tichy.launcher"/>
  </policy>

  <!-- any user can talk to the service -->
  <policy context="default">
    <allow send_destination="org.tichy.launcher"/>
  </policy>
</busconfig>

[End with Ctrl-D]

Restart D-Bus (or computer) with /etc/init.d/dbus restart. Run build.sh under paroli-applications and then paroli under paroli-scripts.

...XXX getting segmentation fault at the moment at this point, even though Paroli starts running, searching for contacts etc.