Difference between revisions of "TermOS"

From Space Station 13 Wiki
Jump to navigation Jump to search
m
Line 166: Line 166:
When a file is downloaded it can be printed with the file_print command. Simply examine the paper to read the message.
When a file is downloaded it can be printed with the file_print command. Simply examine the paper to read the message.


[[Category:Tutorials]]
[[Category:Tutorial]]

Revision as of 11:19, 14 October 2012

TermOS is a lightweight operating system for terminals, used primarily for the Research Wing network. The terminals are remote displays for the interface of the device they are connected to, and allow input to that device. However, the actual software is running on the device itself, be it the Mainframe or a Communications Array.

Every device is connected to the network wires through a data terminal on the floor. Devices have a net_id, their address on the network (an 8 digit string); and a type, which describes their function. P: [02002776]-TYPE: PNET_MAINFRAME

To operate any networked device you will have to ping, then connect to it.

Connecting

  • Help: the most important command. Displays all available commands and their usage.
  • Term_Ping': this will have the terminal ping the network and produce a list of all connected devices and their net_id.
  • Connect': followed by the 8 digit net_id (e.g. connect 02002ceb) will have the terminal connect to the device. More commands will be available once connected to a device.
  • Term_Login: logs you on a terminal.
  • Disconnect: this will disconnect your terminal from the mainframe or communications array you are currently linked to.
  • Restart: reboots your terminal. It disconnects from any device you were connected or logged in to. This can be handy if the device is locked in some way that would prevent normal use of disconnect. Overuse of restart is analogous to rebooting your computer every time you open the wrong web page, and is hence discouraged.

The Network

Outpost Computers.png
Every networked device in the Research Sector

DWAINE Terminals

DWAINE is the operating system of Research Mainframes. Scientists use it to run their research programs. Research Directors program their Robuddies on DWAINE. Log on a terminal inserting your ID card, and typing term_login. When you log in at a terminal your home folder is created on the Mainframe's memory. This folder is only visible to you and superusers. It will generally be preserved between logins, provided you only log in to one terminal at a time.

The Mainframe

DWAINE OS runs on the Mainframe in the central part of the research wing. Its core files are stored on an electronic board. To interface with peripherals the Mainframe uses a series of device drivers and mountpoints. All drivers are on the Mainframe by default. The Mainframe is accessed from Terminals in the research Labs. All programs you use are being run on the Mainframe, terminals simply display the program's interface and transmit commands to the Mainframe.

Peripherals

From the Mainframe you will have access to peripherals, including databanks, printers, and Guardbuddies. Many of these feature some manner of interface with the file system in the form of a mountpoint folder in the directory /mnt.

Commands

The in-system help file is currently a work in progress, but may be accessed by the command help.

  • ls: and an optional argument specifying the filepath. If no filepath is supplied, it will list the contents of the current working directory.
  • cd "filepath" changes the current working directory. If the filepath is not prefixed with a forward slash, it will be taken as relative to the current directory. For example, "cd /" would set the working directory to root, and then a subsequent "cd mnt/artlab" would have the same effective result as "cd /mnt/artlab"
  • rm [-r/i/f] "filepath" removes a target file or directory. The user must have appropriate access to the target file. There are three possible command switches, which may be combined (e.g. -r, -rf, and -if would all be valid). r, recursive, is necessary for the deletion of directories. i instructs the system to confirm before deletion with a simple yes/no dialog, and f suppresses response messages (And overrides i).
  • cat "filepath" [additional filepaths...] will print the contents of the document(s) at the specified filepath(s)
  • cp "filepath to copy" "destination filepath" will make a copy of the file at the first filepath and place it in the destination. If the destination is a directory, the copy will try to maintain the name of the original.
  • mv "filepath to move" "destination filepath" functions in much the same way as cp, with the exception that the original file will be removed following the copy operation.
  • su is used to assume superuser status. After executing su, insert an authorized (Read: Station Heads) ID card and follow on-screen instructions.
  • echo [text...] will print provided text to the current output stream. By default, this is the user's terminal. This may also be piped into a record file by use of ^. For example: "echo Hello, World! ^ ./file" will create a file named "file" in your current directory (Assuming you have write access) containing the the text "Hello, World" "|n" may be used to establish newlines.
  • chmod "new permission value" "target filepath" will change the access permission of a target file. The permission value takes the form of three octal digits, going (from left to right) owner access, group access, and other access. Each can be thought of as three-bit binary values, bit 1 (The least significant) controlling modify access, bit 2 controlling write access, and bit 3 controlling read access. For example, the value "777" would be 111 111 111 in binary, and thus would be all access.
  • who will list the usernames and network IDs of other current users on the system.
  • talk "username or network ID" "message" will send a message to another user on the system.
  • mesg [y/n] Will allow/disallow receiving messages from other users, or, if invoked without arguments, will show the current acceptance status.
  • logout or logoff will do exactly what you would expect.

Transferring Files

Databanks connected to the network serve as external storage; data is recorded on magnetic tapes, which can be removed and swapped. The important banks are:

  • Control: currently holds copies of the guardbuddy control files and scripts. It is located in the RD's office. It takes the mountpoint /mnt/control.
  • Artlab: is the databank in Artifact Research. By default, it contains artifact research software. And a readme, you should read that. It takes the mountpoint /mnt/artlab

Databanks can be accessed in the same way as any other folder in the operating system, with the caveat that any file I/O will have a minor delay that could interfere with scripting. It is a good idea to double check any file transfers to them, in case the tape has been write-protected.

Printing Files

Any valid document copied to the mountpoint of a printer will be printed. The printer mountpoints are, as expected, in /mnt, and are generally prefixed with "lp-"

GuardBuddies

Using the DWAINE terminals, you can assign Guardbuddies to various jobs. To start playing with your buddies, follow these instructions. Italicized words are commands you input into the computer:

  • Insert your ID card into the terminal
  • term_login
  • su
  • term_login
  • Eject your ID card
  • cd /mnt/control
  • prman list

You are now in the folder with the GuardBuddy controls, and you have big boss access so they actually listen to you. The list you see before you will show your little minions with their network IDs and their equipped weapon.

Assign a buddy to guard

  • guard_script (network ID) (name without spaces)

The computer should respond Transmitting wake command. The buddy should be active, with a small face on its viewscreen. When it gets close enough to see whomever they are guarding, they will point at that person and announce they are under guard. If the guard target does not have access to the Guardbuddy bay, you might need to drag it out to meet its ward. Don't always think a guard is a good thing, though...many flavors of Guardbuddies are capable of friendly fire, and that can leave you vulnerable to antagonists - perhaps even the devious RD who assigned the buddy in the first place!

Assign a buddy to patrol

  • patrol_script (network ID)

The computer should respond Transmitting wake command. The Guardbuddy will wake up and behave much like a Securitron, roaming the halls and arresting people doing bad things. This is a good thing to fall back on if you don't have something better for the buddy to do, but don't want it idle.

Assigning a buddy to purge

  • prman upload purge (network ID)
  • prman wake (network ID)

This one doesn't have a fancy control script with it because you really, really should not be uploading this command unless you are a traitor or everything has completely gone to hell. When under these orders, the Guardbuddies figure 'if it ain't a Head, it's dead.' They will roam station and arrest anyone not showing a Head ID, causing mass havoc. The AI can shut down Guardbuddies remotely, so if you are a traitor and want to start a mechanical revolution, you should probably corrupt or kill the AI before setting about it. Laser blasts from one of the lasers or Energy guns around the station will also stun a buddy and make it a sitting duck to repeated blasts.

Recall the buddies

  • prman recall (network ID) OR
  • prman recall all

This will order the buddies back to their charging bays and cancel all standing orders. This is useful if a traitor got into your controls and corrupted the buddies.

Radio

If connected, the radio interface module (Used primarily by the Guardbuddy software to recall them) will appear at /mnt/radio. This can be used to transmit packets simply by writing a record file to it, each line being interpreted as a separate key in the radio packet. For example, "echo command=dostuff|naddress_1=020000FF ^ /mnt/radio/test" would cause the radio to transmit a packet on the default frequency with two entries, "command" equal to "dostuff" and a target address equal to 020000FF. It should be noted that all packets sent in this method must have the address_1 value specified to be transmitted.

If you wish to send a signal on a frequency other than the radio's default (the Guardbuddy communication frequency), include a line in your file specifying the value of "_freq" such as "_freq=1149" to transmit over the PDA communication frequency 114.9.

Troubleshooting

When a terminal become unable to connect to the network there are few elements which may be damaged.
As the network is wired, a severed cable is the most frequent problem, and requires to track the missing section in the cable between the devices you are communicating with.

Data Terminal

Every device is connected to the wires through a data terminal. Data terminals are directly under the device, hidden by the floor tile. Network cables run between terminals to connect devices.
When a data terminal is destroyed, if the device is still functioning, it will be off the network.

Terminal themselves are easy to build and disassemble.
TermOS can be easily installed from a disk in Tech Storage.

This is a list of the most common problems:

  • Blinking terminal screen
    The glass is cracked. Take it off with screwdriver, then crowbar. Replace the glass.
  • Terminal unable to ping
    Wires might be severed at some point. Search for the damaged cable section and replace it.
    A data terminal might have been destroyed by an explosion. Dismantle your terminal and move it onto another data terminal. Or ask the electricians to scan one and make you a replacement.
  • Programs stop responding. But terminal is able to ping other devices
    The mainframe may be damaged. Use the restore kit in the Research Director's office. It comes with instructions
  • Data Banks cannot be accessed and do not appear in /mnt.
    Banks are directly connected to the Mainframe, the cable between them may be damaged. Look for the missing section. Or a missing terminal port.

Tapping the Wire

Communications between terminals and devices run on the wire; commands are sent as messages that can be eavesdropped with the proper equipment. The Mainframe on the station is not unique. Another mainframe is at an high-tech location away from the station. This is ideal to practice on, if you don't want an angry scientists to blow you up for breaking his work.

Scripting

It is possible to automate function with the use of script files. These are text files with a special prefix that marks them as executable.

A sample script to display a few words on screen.

#!
echo Hello World.

To create this script you must enter the following text.

echo #!|necho Hello World ^./myscript

"#!" is at the start of every script, to tell the system the file is executable.
"|n" breaks lines in the script, one line for every command.
"^" marks the path to the file where the script is to be saved (in this case a file named myscript in the current folder).

The tape in /mnt/control has some scripts which you can study to understand how more complex scripts can be layed out.

Tech Support

To contain costs, our Help Line has been relocated to Space India. It can be reached from any land line, Monday to Friday.
If you are interested in financially sponsoring the Thinktronic. LTD.robuddy basketball team, please contact Stephen H. Toczylowski.

Bridge Comm. Console

There is one communication console on station. It is on the Bridge, and it is used to connect to Centcom's communication array to download often flawed intel on potential traitors or revolutions, or other messages from Centcom.

Instructions are available on a nearby slip of paper.

  • Initially two commands will be available.
    list: This prints a list of all the Centcom messages available to download and their messages IDs
    download: Download (message ID)

When a file is downloaded it can be printed with the file_print command. Simply examine the paper to read the message.