rev |
line source |
al@419
|
1 <section>
|
al@419
|
2 <header>SliTaz Web Control Panel</header>
|
al@419
|
3 <div>
|
al@419
|
4 <p>TazPanel is the SliTaz Control Panel, a web interface which lets you manage the full system in a radically simple way. The output xHTML code is valid HTML 5 and all theming is done with standard CSS 3. TazPanel is published under a BSD License.</p>
|
al@303
|
5
|
al@303
|
6
|
al@419
|
7 <h3>Use it!</h3>
|
al@303
|
8
|
al@419
|
9 <p>You can clone the tazpanel repo into <tt>/var/www/tazpanel</tt> and work on this copy or clone it somewhere else and <tt>'make install'</tt>. After, add <tt>tazpanel</tt> to your <tt>/etc/hosts</tt>, type <tt>'./tazpanel start'</tt> to start the server and go to the URL: <tt>http://tazpanel:82</tt>. Panel user and password are defined in the <tt>httpd.conf</tt> and default is <tt>root:root</tt></p>
|
al@303
|
10
|
al@303
|
11
|
al@419
|
12 <h3>i18n</h3>
|
al@303
|
13
|
al@419
|
14 <p>TazPanel has been coded from the beginning with gettext support. Please forget <tt>'echo'</tt> and use <tt>gettext</tt>, but remember that <tt>gettext ""</tt> is equivalent to <tt>echo -n</tt>. All scripts use the same <tt>TEXTDOMAIN</tt> and the same pot files, and all translations go in the <tt>po/</tt> folder. To start a new translation please use <tt>msginit</tt> from the pot file directory. Example for French/France locale (fr_FR):</p>
|
al@419
|
15 <pre>$ msginit -l fr_FR -o fr.po -i tazpanel.pot</pre>
|
al@419
|
16 <p>To update all translations from a newly updated pot file:</p>
|
al@419
|
17 <pre>$ make msgmerge</pre>
|
al@303
|
18
|
al@303
|
19
|
al@419
|
20 <h3>User interface</h3>
|
al@303
|
21
|
al@419
|
22 <p>If you develop an official SliTaz GUI for TazPanel, please follow the default style. If you need more CSS markup and you are not a coder, please ask an official developer for the best way to implement your idea. TazPanel is fully themable and more than one theme can be installed, this will allow us to make packages in a TazPanel style! All the GUI is done with HTML 5 and CSS 3; some javascript can be used, but with precautions… one more time, it's better to check with a main contributor before adding too much stuff; the goal is, as for all the SliTaz projects: KISS</p>
|
al@303
|
23
|
al@303
|
24
|
al@419
|
25 <h3>CGI template and files</h3>
|
al@303
|
26
|
al@419
|
27 <p>To start or test a new function with TazPanel you will find a file in <tt>utils/template.cgi</tt> that needs to be in the <tt>$PANEL</tt> root to work, all TazPanel CGI scripts are in that location. If you think your code is too big to fit in another script you can eventually create a new CGI page and update all links, but please to talk to the AUTHORS beforehand.</p>
|
al@419
|
28 <dl>
|
al@419
|
29 <dt>index.cgi</dt>
|
al@419
|
30 <dd>Main Tazpanel CGI script</dd>
|
al@419
|
31 <dt>boot.cgi</dt>
|
al@419
|
32 <dd>All what happens before login</dd>
|
al@419
|
33 <dt>network.cgi</dt>
|
al@419
|
34 <dd>All related stuff to networking (Ethernet, Wi-Fi, services)</dd>
|
al@419
|
35 <dt>pkgs.cgi</dt>
|
al@419
|
36 <dd>Tazpkg packages CGI interface</dd>
|
al@419
|
37 <dt>settings.cgi</dt>
|
al@419
|
38 <dd>System settings and services such as time, users accounts, locales or daemons management</dd>
|
al@419
|
39 <dt>live.cgi</dt>
|
al@419
|
40 <dd>All tools related to Live systems (CD, USB, Frugal)</dd>
|
al@419
|
41 <dt>hardware.cgi</dt>
|
al@419
|
42 <dd>Devices drivers, firmware, printing</dd>
|
al@419
|
43 <dt>help.cgi</dt>
|
al@419
|
44 <dd>Cat the html doc and this README file</dd>
|
al@419
|
45 </dl>
|
al@419
|
46 <p>For common functions have a look at <tt>lib/libtazpanel</tt>, where you may find functions you need already coded such as a <tt>xhtml_header</tt> to get the style <tt>header.html</tt> in your CGI script. For the loading message you can use <tt>loading_msg</tt>. When cat is used:</p>
|
al@419
|
47 <pre>$(gettext "Text to translate")</pre>
|
al@303
|
48
|
al@303
|
49
|
al@419
|
50 <h3>Web server</h3>
|
al@303
|
51
|
al@419
|
52 <p>TazPanel can run with the Busybox httpd applet or LightTPD and probably Apache. Start the webserver with a custom config to listen only on a local port for security reasons since we run as root to perform system actions, example:</p>
|
al@419
|
53 <pre># httpd -p 82 u root -c /etc/slitaz/httpd.conf</pre>
|
al@419
|
54 <p>Or use a tazpanel cmdline:</p>
|
al@419
|
55 <pre># ./tazpanel start</pre>
|
al@303
|
56
|
al@419
|
57 </div>
|
al@419
|
58 </section>
|