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