« Previous - Version 6/80 (diff) - Next » - Current version
Alexandre Quessy, 2010-01-05 16:35


= Lunch = {{{
#!html
}}}
Lunch is a distributed process starter and manager for GNU/Linux. It might also work under other operating systems when they have a X terminal application and the python and bash interpreters. SSH needs to be installed as well. * The first step is to configure your SSH client. The steps to manage ssh keys are in the SshKeysManagement page. * Next, download and install lunch on every computer.

= Dependencies =
It uses ssh, xterm and the multiprocessing and subprocess python modules. Python2.4 or later is needed for subprocess. {{{
sudo apt-get install openssh-client openssh-server python-setuptools mercurial
}}} {{{
sudo easy_install --prefix=/usr/local multiprocessing
}}}
(there might be a python-multiprocessing package if you use a newer Ubuntu or Debian) We will drop multiprocessing in version 0.2. = INSTALLATION =
Checkout the latest version from the subversion repository. {{{
mkdir -p ~/src
cd ~/src
hg clone https://svn.sat.qc.ca/hg/lunch
cd lunch
}}}

Install lunch to /usr/local/bin/lunch on both local and remote hosts. (type your password) {{{
sudo make install
}}}
There should be a Lunch icon in the Application/Other Gnome menu.

= Try it out =
Copy the "config-sample" example config file to the local ~/.lunchrc. Edit the configuration file to suit your needs. {{{
cp config-sample ~/.lunchrc
edit ~/.lunchrc
}}}

Start the lunch master:: {{{
lunch
}}}

Implementation details
A remote lunch as a slave is started this way/ {{{
lunch -s -c "xlogo"
lunch -s -c "xdg-open /usr/local/share/icons/Lunch.svg"
}}}
How to customize your lunch file
The ~/.lunchrc file is written in Python and the only function needed is add_command. Here are some examples:: {{{
add_command(command="xlogo", env={}, title="xlogo")
add_command(command="mplayer /usr/share/example-content/Ubuntu_Free_Culture_Showcase/StopMotionUbuntu.ogv", env={}, title="mplayer")
}}}
Setting the user and host arguments make it be issued through SSH to a remote host:: {{{
add_command(command="xlogo", env={"DISPLAY":":0.0"}, user=_user, host="example.org", title="remote_xlogo")
}}}
Here is a Lunch config file for miville. Note that the sleep attribute is for processes AFTER which we need to wait. {{{
add_command("/home/aalex/src/miville/branches/services/py/mivilled -o 0", title="miville un", priority=1, sleep=1)
add_command("/home/aalex/src/miville/branches/services/py/mivilled -o 1", title="miville deux", priority=1, sleep=1)
add_command("telnet localhost 14444", title="miville un", priority=2)
add_command("telnet localhost 14445", title="miville deux", priority=2)
}}}

= LICENSE = {{{
Lunch
Copyright (C) 2008 Société des arts technologiques (SAT)
http://www.sat.qc.ca
All rights reserved.

This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

Lunch is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Lunch. If not, see <http://www.gnu.org/licenses/>.
}}}

= IMAGES =
The source of Lunch's icon is http://commons.wikimedia.org/wiki/File:Fruit-cherries.svg and is in the public domain. Thank you Rocket000 !

Lunch200x200.png (24.7 kB) Simon Piette, 2010-01-04 19:57

snapshot_lunch_0.4_window.png (41.5 kB) Alexandre Quessy, 2011-03-26 18:07