20:38 15.09.17 guest54: <script>alert(123);</script> 20:34 15.09.17 Aaron: "Hello everybody out there using minix - Im doing a (free) operating 20:34 15.09.17 guest54: Hello
guest@kernelultras var/www $ help -a sk

Help for the administrators

The structure of folders Error messages How to write your own template * The basic template * Design of the page * Display of output by query * Examples * Shell_filter * Different template for the main page and for the other pages

The structure of folders

Directory structure is based on Filesystem Hierarchy Standard. bin -> Programs └commands -> All commands └inc -> Auxiliary functions └javascript -> JavaScript functions └shell.php -> Shell └shell_filter.php -> Shell for special use dev -> Devices etc -> Configuration files └apt -> Settings for the updates └mail -> Settings for the email notification └system -> Settings of the system └banned -> File with banned IP addresses └bashrc -> If the user doesn't have his own bashrc, then this is used └conf.php -> Settings of the system └post_commands.php -> Commands which will launch after a certain command └group -> File with user groups home -> Home file of all users tmp -> Temporary files, for example resampled image usr -> Datas of the programs └sessions -> Users sessions └share -> Datas for systems and documentation └man -> Manual pages └doc -> Documentation └themes -> Settings of appearance (theme) var -> Logs and content of the web └log -> Logs └articles └comments └dirs └edits └errors └moves └removes └system └uploads └www -> Content of the web └.chat -> History of the chat └.trash -> Bin, the deleted files are saved there

Error messages

Errors from /index.php ERR-INDEX-R.CONF -> Failed to connect the configuration file '/etc/system/conf.php' ERR-INDEX-R.FUNCTION -> Failed to connect the basic functions from '/bin/inc/function.php' ERR-INDEX-R.FRONTEND -> Failed to connect the frontend from '/bin/inc/frontend.php' ERR-INDEX-WF.LOG -> Failed write to the logs ERR-INDEX-RF.SESSIONS -> Failed to read the file from the folder '/usr/sessions' ERR-INDEX-RF.GID -> Failed to read the GID from the file '/home/user/.gid.php' ERR-INDEX-R.SHELL -> Failed to connect to the shell '/bin/shell.php ERR-INDEX-R.SHELL-FILTER -> Failed to connect to the shell_filter'/bin/shell_filter.php ERR-INDEX-R.KERNEL -> Failed to connect to the kernel '/bin/inc/kernel.php' Errors from /bin/inc/kernel.php ERR-KERNEL-THEME-DONT-EXIST -> Failed to connect the theme Errors from system Firstly a warning appears: Error, contact root. Then the file and line of which was the function called: SHELL-120 And then command with the called parameters: ku\chmod__ opt: www dat: home/bedna/ lin: 55 And root email appears at the end: root email: email@email.com

How to write your own template

The basic template

For the start we will write the basic Hello World. <body> Hello World </body> The template is saved in the file /usr/share/themes/theme_name/template.tpl According to the example you can see that in the template you can use the basic HTML. But we want to use "Aarona" so he can offer the outputs of commands to us. So for example when we want the header of the page, which is a file "1" and the output of article what will be the file "2", then the template will look like this: <body> {{ shell, cat 1 }} // The command for processing the file "1" {{ show_output }} // The output of the file "1" will be displayed {{ shell, cat 2 }} // The command for processing the file "2" {{ show_output }} // The output of the file "2" will be displayed </body> From the example you can see that for every action [*] is needed to run a command and then display the output. [*] There are commands which are displaying only output of some data, so they don't need to launch the command before for their generation, alternatively we will launch the command and we don't need to display the output. For launching the command this part is always used {{ shell, after the comma there is the command, like in the case for viewing the article "2" cat 2 }} We will display the output with {{ show_output }}

Design of the page

We will edit design of the page with CSS, which is saved in the file /usr/share/themes/theme_name/template.css. Now we can edit the template.tpl like this: <body> {{ shell, cat 1 }} // The command for processing the file "1" <div class="head"> // CSS for the header {{ show_output }} // The output of the file "1" will be displayed </div> {{ shell, cat 2 }} // The command for processing the file "2" <div class="article"> // CSS for the article {{ show_output }} // The output of the file "2" will be displayed </div> </body>

Display of output by query

For example we will type something like this into the browser : http://www.domain.com?shell=cat 1 We will insert the command to process the query into the template : {{ shell, $shell_request }} And to view the output we will use this : {{ show_output }} A really simple example of the template, which will process the query like this : <body> {{ shell, $shell_request }} {{ show_output }} </body> We will add the links for each articles into the template, after clicking the link, the chosen article will appear. <body> <a href="?shell=cat 1">Article 1</a> // The link for viewing the article 1 <a href="?shell=cat 2">Article 2</a> // The link for viewing the article 2 <a href="?shell=cat 3">Article 3</a> // The link for viewing the article 3 {{ shell, $shell_request }} // The process of query will launch {{ show_output }} // The output will display </body>

Examples

The template for terminal, emails and chat looks like this. <body> <div id = "ku_win"> {{ shell_filter, form }} // If the command form was entered, it will launch <div class="mail"> {{ show_emails }} // The internal emails will be displayed </div> {{ shell_filter, say }} // If the command say was entered, it will launch <div id="chat"> {{ show_chat }} // The chat will be displayed </div> {{ shell, $shell_request }} // The command from $_REQUEST will be launched {{ show_current_command }} // The entered command will be displayed <div class="output"> <div class="clipboard"></div> {{ show_output }} // The output of the command will be displayed </div> {{ input }} // The command line will be displayed {{ javas, bin/javascript/autocomplete.js }} // The Javascript will be connected </div> </body> There is the real use

Shell_filter

Shell_filter it works like the shell, with the difference, that it will process only the command we will enter. In the example which is stated higher is {{ shell_filter, say }}, so it will launch only when the command was entered say. In the default behaviour shell_filter after finishing the command from the command line the given command will be deleted. For example we will send the command ls && say test && id, after the line {{ shell_filter, say }} only this will be processed ls && id.

Different template for the main page and for the other pages

If we want a different template for the main page and the other pages, then we will create a template for the main page /usr/share/themes/theme_name/index.tpl a /usr/share/themes/theme_name/index.css. For the other pages we will use /usr/share/themes/theme_name/template.tpl a /usr/share/themes/theme_name/template.css The english version written by : Monika Chorvathova Licence GPLv2+: GNU GPL version 2 or the later https://www.gnu.org/licenses/old-licenses/gpl-2.0.html.