shithub: x

ref: 52455c058d7eaa25c7d03f0bfb62928f0ad02e8e
dir: /x.man/

View raw version
.TH X 1
.SH NAME
x \- tools for dealing with alien systems
.SH SYNOPSIS
.PP
.B x/mnt
.I [user@]host
.PP
.B x/run
.RB [ -l ]
.I cmd
.PP
.B x/man
.RI [ section ] title
.PP
.B x/path
.SH DESCRIPTION
.PP
.I X
is a collection of programs that tries to enable convenient
interaction with alien systems of the UNIX® variety from the
extreme comfort of Plan 9.
.PP
These programs rely on the namespace convention whereupon the
root hierarchy of the remote system to be interacted with is
mounted, usually through
.IR sshfs (4),
at the
.IR mntgen (4)
provided mountpoint under
.I /x
named after the
.B user@host
login tuple used to mount the system.
.PP
In this way the working directory of a program is loaded with
two bits of information about the remote system: the login
that can be used to access it, and the path relative to the
remote root - which are exploited by the programs described
here to provide some further convenience.
.SH SETUP
.PP
Create the
.I /x
directory on your root file server and make sure to have the
.IR mntgen (4)
started somewhere convenient, perhaps in your profile:
.EX
; mount -c /srv/boot /n/boot
; mkdir /x
; mntgen /x
.EE
.SH COMMANDS
.PP
.B x/mnt
is a convenience wrapper around
.IR sshfs (4)
that connects to and mounts the remote
.I host
as 
.I user
to the appropriate place as discussed above.
If
.I user
is missing,
.B x/mnt
tries the mount as both the invoking user and as
.I root.

.PP
.B x/run
uses
.B ssh(1)
to connect to and run the
.I cmd
on the system suggested by the current path;
.B cd(1)
will be prepended to the command to execute it in the correct
context.  For example, given the current directory
.B /x/me@moskvax/home/me/prog
the command
.B x/run make
will run
.B make(1)
in the expected corresponding directory.

.PP
.B x/man

.PP
.B x/path

.SH EXAMPLES
.SH SEE ALSO
.IR ssh (1),
.IR mntgen (4),
.IR sshfs (4)
.SH SOURCE
.B git://code.a-b.xyz/x
.SH BUGS
Mhm.