Herramientas de usuario

¡Esta es una revisión vieja del documento!


Tutorial de Plan9

Este es un tutorial de la distribución 9front de Plan9, que podrás seguir una vez te hayas dado de alta en el Campamento de Entrenamiento (“bootcamp”) de Plan9 en SDF.org.

Esta hace uso de una máquina accesible a través de la terminal remota drawterm.

Date de alta en 9p.sdf.org

Para darte de alta en la máquina de 9Front, recurre a la web de registro del servidor 9front e indica un nombre de usuario de 9p y una dirección de correo electrónico válida. El admin de dicha instancia procesará el pedido y recibirás un correo electrónico indicando tu nombre de usuario_9p en la instancia en la máquina 9p.sdf.org, a la vez que contarás con una contraseña pasavante.

Compila el cliente de terminal gráfico Drawterm.

Luego ingresa al sistema remoto usando Drawterm, mediante el siguiente comando:

drawterm -h 9p.sdf.org -a 9p.sdf.org -u usuario_9p

El servidor te solicitará la contraseña pasavante, y tras unos segundos habrá establecido comunicación y verás una ventana gráfica de bienvenida en el escritorio rio.

La ventana te demostrará el prompt por defecto del intérprete de comandos rc de 9front: cpu%.

Bienvenido a…

___                 _  __                 

/ _ \ _ _ | |/ _| _ _ _

(_) '_ \ / |/ _` | |_ / _ \| '/ _`

\, | |_) |\ \ (_| | _| (_) | | | (_| |

 /_/| .__(_)___/\__,_|_|(_)___/|_|  \__, |
    |_|                             |___/ 
    Sistema Plan9 de Acceso Público de SDF

Rio es el sistema de ventanas de Plan 9.

Puede leer mas de esta ventana con flecha arriba/abajo para deslizar el texto en media pantalla.

Para usar rio efectivamente, necesita al menos un mouse de tres botones. Si solo tiene un mouse de dos botones, puede emular el botón del medio manteniendo presionada la tecla mayúsculas mientras presiona el botón derecho del mouse.

Button 1, 2, and 3 are used to refer to the left, middle, and right buttons respectively.

Menú Desplegable

Al presionar el botón derecho en el escritorio o ventana de shell, aparecerá un menú con las siguientes opciones:

* New - Crea una ventana nueva * Resize - Redimensiona una ventana * Move - Mueve la ventana sin redimensionarla * Delete - Cierra una ventana * Hide - Oculta una ventana del escritorio (aparecerá en este menú) * <label> - La etiqueta de una ventana oculta, al seleccionarla la presenta en el escritorio.

Para seleccionar un ítem del menu, suelte el botón sobre tal ítem del men{u. Rio utiliza el mismo botón que comenzó la acción a lo largo de esa operación. Esto significa que si presiona otro botón durante la acción, la operación original se cancenal y cualquier cambio parcial se deshace.

El menú actua como una selector de acción verbal, que puede requerir seleccionar un sujeto (ejemplo: ventana) para realizar la acción verbalizada. Esto significa que puede requerirse otra acción adicional.

Ejemplos

Luego de seleccionar New, el cursor cambiará a una cruz de mira. Al usar el botón derecho nuevamente, debe luego arrastrar un rectángulo para indicar el tamaño y localización de la nueva ventana que quiere crear. Cuando soltamos el botón, se creará la ventana.

Las ventanas nuevas contendrán un intérprete rc. Al invocar un programa de rio desde la shell, se permitirá que dicho programa tome el control de la ventana que contiene al shell. Ya que no hay un sistema de control de trabajos en el intérprete (ej. &, fg, bg), sólo debe crear una ventana nueva si quiere ejecutar otro programa de manera concurrente.

Para redimensionar una ventana, debe seleccionar Resize, luego hacer clic (recuerde usar el mismo botón que comenzó la acción, por ejemplo, el botón derecho del mouse) en la ventana que desea redimensionar. El cursor cambiará a una cruz de mira, que le permitirá arrastrar la forma deseada de ventana.

After selecting Move, click and keep the button depressed over the window you want to move, then move the mouse to move the red rectangle that represents the new location you want. Release the button to finish the action.

Delete and Hide both operate by requiring you to click on the window you wish to respectively Delete or Hide.

WINDOW CONTROL TIPS

Clicking on a window brings it to the front.

You can directly change the shape of a window by clicking and dragging on the edge or corner of the window border. Button 1 or 2 will allow you to drag the edge or corner to a new size, and Button 3 will allow you to move the window.

The pop-up menu remembers the last command chosen, so as a short cut you can just press and release button 3 without moving the mouse between pressing and releasing to select the previous command again.

BASIC TEXT CONTROL

Unlike in other systems, the text cursor can only be controlled by the mouse or the side-effects of certain commands.

Clicking with button 1 will move the text insertion point (indicated by an I-beam) to just before the character closest to the mouse pointer. Dragging across a section of text will select that portion of text. It may be useful to know that the insertion I-beam represents an empty selection (between two characters). In text editors, the current selection is known as “dot”.

In the shell window button 2 will invoke a pop-up menu. Most of it's commands operate on dot.

* cut - moves the contents of the dot to the clipboard

 if dot is non-empty 

* paste - replaces dot with the contents of the clipboard * snarf - copies dot to the clipboard * plumb - sends dot (or text surrounding dot, if dot is

 empty)to the plumber.

* send - completes the current input line with the dot,

 if it is non-empty, or the contents of the clipboard.
 If the dot is non-empty it does a snarf at the same time.

* scroll - toggles the automatic scrolling of the window

 on output.

Double-clicking will allow you to automatically select a section of text surrounding that point. The selection is made by an analysis of appropriate delimeters. A whole line is selected by double-clicking at either end of the line. A quoted or bracketed selection is made by double-clicking just inside of the quote or bracket.

SCROLLING

The arrow keys will let you scroll up or down by half a page at a time.

Clicking button 1 on the scrollbar scrolls up by half a page. Button 3 scrolls down by half a page. Button 2 jumps to position in the document relative to the position on the scrollbar clicked. Holding a button on the scrollbar will have the effect of invoking the clicking action continuously.

The white elevator box on the scrollbar is sized proportionally to the proportion of the document that is currently visible.

Scrolling does not affect the text cursor.

RIO AND THE RC SHELL WINDOW

Rc is a command interpreter for Plan 9 that provides similar facilities to UNIX's Bourne shell. See the additional references at the end of this document for information specifically about rc.

Rio provides some additional features that enhance the interface to programs that use the text console. The rc shell command interpreter is one such program.

Rc commands are typed after the prompt on the last line of the text buffer. The commands are sent to rc only after each newline so line editing may be performed if desired. You can move the cursor and edit the previous lines of commands and program output but none of this will be interpreted by rc shell.

The interpretation of commands is supressed altogether when ESC is pressed to put the window in hold mode. The window border and text will change to dark blue to indicate the hold mode is active. In this mode you can type multiple lines of commands and edit them. Pressing ESC again will release the hold and send the lines of text to the rc command interpreter.

The DEL key sends an 'interrupt' note to all processes in the window's process group. The usual intent is to terminate the execution of the current command. It is also a convenient short cut for ensuring you have a fresh command prompt.

FURTHER INFORMATION

For further information, try the rio(1) manual page. Type “man rio” or click on rio(1) in either of these sentences and select plumb from the button 2 menu

Rc

El intérprete de comandos nativo de Plan9 es rc y su prompt es cpu%. Esta shell rc contiene ciertas similitudes con los intérpretes de comandos típicos de Unix. Las diferencias radican en el teclado no es el normalizado. Para activar el autocompletado, en lugar de usar la tecla Tab, usa la tecla Insertar o bien Ctrl+i.

A su vez, Ctrl+h opera como la Tecla Retroceder, en tanto que Ctrl+u borra la línea entera. Ctrl+b retorna al renglón del prompt.

Lo primero que podrás hacer en la CPU remota de SDF.org es ejecutar el comando de activación de usuario, que nos termina de convertir en un planero:

rc /sys/lib/newuser

Acto seguido, opcionalmente podrás cambiar la contraseña pasavante que se nos proveyó el puntero de SDF.org por una propia, mediante el comando:

passwd usuario@9p.sdf.org

(habrás de ingresar primero la contraseña pasavante y luego confirmar dos veces la nueva contraseña deseada.

Hecho esto, recibirás tu directorio de usuario en el sistema: /usr/$user.

Podrás asociar los binarios de SDF.org para extender el uso del entorno 9front con:

bind -a /usr/sdf/bin /bin

Entre ellos encontraremos los servicios de finger, com, bboard, gemini, gopher, y varios mas.

Podrás crear una ventana nueva haciendo clic con el botón derecho y eligiendo New, Luego mediante un arrastre con el botón derecho podrás crear una nueva ventana en el escritorio de rio, en la cual se dispondrá un nuevo intérprete de comandos rc.

Editores de texto

Además del editor ed, podrás recurrir al nativo de Plan9, Acme.

Web en 9p

Crea un fichero index.html en tu directorio de usuario /usr/$user/html/.

Correo electrónico en 9p

Recibirás la dirección de correo electrónico $user@9p.sdf.org.

Este sitio web utiliza cookies para guardar datos esenciales de su actividad, como su autenticación. Al entrar acepta el uso de cookies.

Más información