Contents

Introduction

This page describes the Plan 9 port of Object Icon. This port does not use Plan 9's Posix porting library ("APE"), but rather attempts to be a pure Plan 9 port, using Plan 9's native features directly.

A full graphics implementation is included; however it requires a modified version of the rio window manager in order to work. This is called riox and is compiled along with the rest of Object Icon. It is described in full on this page.

Source code

The source code is contained on a separate branch, and can be obtained with the following command :-

svn co svn://svn.code.sf.net/p/objecticon/code/branches/plan9 objecticon

This directory must then be made available from within plan 9, either by copying it or sharing it via 9p (eg using the u9fs program).

Compilation

Firstly, ensure that the sh program is available on your path. It can be found in /bin/ape, and is needed to run the test scripts. If it is not on your path, edit your profile to include the command :-

bind -a /bin/ape /bin

Then, from the checked out Object Icon directory, run the command :-

./configure.rc

This sets up the mkfiles and other configuration files. Now run

mk all test

to compile and test everything. Hopefully at the end "Testing successful" will appear.

Path setup

To add the Object Icon executables to your path, and set up the usual environment variables, it is necessary to "source" the paths.rc file from your profile file. For example, I have the following line in my profile :-

. /usr/rparlett/objecticon/paths.rc

Graphics

As mentioned in the introduction, the modified window manager riox must be used with the graphics facilities.

Environment variables

Two additional environment variables are provided.

OI_USE_WIN allows the first window opened to take over the current window, assumed to be mounted in the /dev directory. If the variable is unset, or is 0, then the current window is not used. Otherwise, it is taken over, and adjusted depending on the value :-

OI_WIN_NAMEG. If this variable is unset, or is 1, then an rfork(RFNAMEG) system call is made when the window system is initialized. This has the effect of making the process use a private copy of the namespace, and so keeps all window mounts private. If this variable is 0, then this call is not performed, and the window mounts are thus visible in other processes sharing the program's namespace. This has the disadvantage that, should this namespace be copied by a forked process, then the window mounts will be kept alive until that forked process exits. This in turn keeps the associated windows open (with a pointless white background).

To see this latter effect in action, run the following two commands :-

% OI_WIN_NAMEG=0 ivib &
% OI_WIN_NAMEG=1 ivib &

Now exit the first program. You will see that the window remains open, since its window mount directory has been captured by the rfork(RFNAMEG) done by the second command. Exiting the second instance of ivib releases this reference and the first window closes.

Additional methods

The graphics.Window class contains an extra method, get_dir(), which returns the path of the directory on which the window is mounted. From this directory, all of the usual riox window files may be accessed, giving complete flexibility to the client program.

Screenshot

File systems

The Plan 9 implementation includes some classes for providing file system servers using Plan 9's 9P protocol. Full details can be found on this page.

I/O

The I/O package exhibits some necessary differences in the Plan 9 implementation; these are detailed on this page.

Contents