xpacommon(7)

πŸ’– xpacommon(7) πŸ’–

okay bestie, welcome to the XPACommon page β€” this is where we learn how to get common information about access points. it's the section of the xpa manual (that's the manual name btw, xpacommon(7), in case you were wondering who's talking) and honestly? it's giving cheat-sheet energy. let's go πŸ¦‹


✨ SYNOPSIS ✨

so the whole vibe here is: there are various kinds of generic information you can pull about an XPA access point, and you do it with the xpaget command. that's it. that's the synopsis. periodt. πŸ’…


🌸 DESCRIPTION 🌸

πŸ‘‘ who's even registered rn

you can find out which XPA access points have been registered with the currently running XPA name server by running xpaget to retrieve info from the XPA name server:

xpaget xpans

so like, if the stest test server program is running, you'll get these XPA access points back (and ngl, the specifics of the returned info will vary for different machines and users, so don't come for me if yours looks different):

XPA xpa gs 838e2f67:1262 eric
XPA xpa1 gs 838e2f67:1266 eric
XPA c_xpa gs 838e2f67:1267 eric
XPA i_xpa i 838e2f67:1268 eric
⚠️ heads up bestie: access to this info is subject to the usual XPA Access Control restrictions. so if you can't see it, that's not a bug, that's permissions.

πŸ’… the reserved sub-commands, aka the good stuff

every single XPA access point supports a bunch of reserved sub-commands that hand you different kinds of information β€” like the access control for that access point, for example. you can run these either from the command line with xpaset or xpaget, or from inside programs with XPAGet() or XPASet(), like:

xpaget ds9 -acl
xpaget ds9 -help
xpaget ds9 env FOO

xpaset -p ds9 env FOO foofoo
🚨 IMPORTANT CAVEAT, no cap: with the exception of -help and -version, reserved sub-commands are available only on the machine on which the XPA server itself is running. so no, you can't just reach across the network for these. the way that local-only restriction works... it's real.

the following reserved sub-commands are defined for all access points:

  • -acl β€” get (set) the access control list [options: host type acl, for set]

the xpaset option lets you add a new acl for a given host, or change the acl for an existing host. see XPA Access Control for more info. 🫢 this access point is available only on the server machine.

  • -env β€” get (set) an environment variable [options: name (value, for set)]

the xpaget option will return the value of the named environment variable. the xpaset option will set the value of the named variable to the specified value. this access point is available only on the server machine. (also, please be advised β€” fr fr, we've had problems setting environment variables in static Tcl/Tk programs such as ds9 running under Linux. πŸ’€)

  • -clipboard β€” set(get) information on a named clipboard

clients can store ASCII state information on any number of named clipboards. clipboards of the same name created by clients on different machines are kept separate. the syntax for creating a clipboard is:

[data] | xpaset [server] -clipboard add|append [clipboard_name]
xpaset -p [server] -clipboard delete [clipboard_name]

use "add" to create a new clipboard or replace the contents of an existing one. use "append" to append to an existing clipboard.

information on a named clipboard is retrieved using:

xpaget [server] -clipboard [clipboard_name]
  • -exec β€” set: execute commands from buffer [options: none]

if -exec is specified in the paramlist of an xpaset call, then further sub-commands will be retrieved from the data buffer. 🌈

  • -help β€” get: return help string for this XPA or sub-command [options: name (for sub-commands)]

every XPA access point and every XPA sub-command can have a help string associated with it that's specified when the access point is defined. the -help option will return this help string. for XPA access points that contain user-defined sub-commands, you can get the help string for a particular sub-command by specifying its name, or else get the help strings for all sub-commands if no name is specified. πŸ‘‘

  • -ltimeout β€” get (set) the long timeout value [options: seconds|reset]

the xpaget option will return the value of the long timeout (in seconds). the xpaset option will set the value of the long timeout. if "reset" is specified, then the timeout value will be reset to the default value.

  • -nsconnect β€” set: re-establish name server connection to all XPA's [options: none]

if the XPA Name Server (xpans) process has terminated unexpectedly and then re-started, this sub-command can be used to re-establish the connection. you use it by sending the command to the [name:port] or [file] of the access point instead of to the XPA name (since the latter requires the xpans connection!):

xpaset -p 838e2f67:1268 -nsconnect

see xpans for more info. 🧚

  • -nsdisconnect β€” set: break name server connection to all XPA's [options: none]

this sub-command will terminate the connection to the XPA Name Server (xpans), thereby making all access points inaccessible except through their underlying [name:port] or [file] identifiers. and honestly? "i forget why we added it, it seems pretty useless." β€” the original authors, being so real. 😭

  • -stimeout β€” get (set) the short timeout value [options: seconds|reset]

the xpaget option will return the value of the short timeout (in seconds). the xpaset option will set the value of the short timeout. if "reset" is specified, then the timeout value will be reset to the default value.

  • -remote β€” set: register xpa with remote server [options: host[:port] [acl]] [-proxy]

this sub-command will register the XPA access point with the XPA name server (xpans) on the specified host (which must already be running). the specified host also is given access control to the access point, using the specified acl or the default acl of "+" (meaning the remote host can xpaset, xpaget, xpainfo or xpaaccess). if the acl is specified as "-", then the access point is unregistered. see Communication Between Machines for more info on how this sub-command is used. 🌐

  • -version β€” get: return XPA version string [options: none]

the version refers to the version of XPA used to define this access point (currently something like 2.0).

πŸŽ€ make it your own

you can add your own reserved commands to all XPA access points by using the XPACmdAdd() routine, passing the XPA handle returned by XPAGetReserved(void) as the first argument. and note again, bestie, because it matters: these will only be available on the machine where the XPA service is running. πŸ’œ


⭐ SEE ALSO ⭐

see xpa(n) for a list of XPA help pages. that's the whole squad. go read it. πŸ“


okay that's the whole page!! signing off with the receipts: this was version 2.1.15, dated July 23, 2013, brought to you by SAORD Documentation, and it's the xpacommon(7) page in all its glory. stay slaying, and remember: local-only sub-commands don't care about your network dreams. mwah πŸ’–βœ¨