[FreeNX-kNX] [Doc] nxserver-login-helper
Alastair Johnson
alastair at solutiontrax.com
Fri Jul 6 10:28:58 UTC 2007
On Thursday 05 July 2007 17:29, Fabian Franz wrote:
> Hi,
>
> here is the first component. This one has no i18n support, so you can only
> comment on the comments.
>
> You can either grab the version from SVN
> (freenx-redesign/server/compatibility/) and send a diff (which I would
> prefer) or reply to this mail:
>
> My comments will be the not commented ones ;-)
>
> # nxnode-login: spawns and controls ssh|su for backwards compatibility.
> #
> # Copyright (c) 2004-2007 by Fabian Franz.
> #
> # License: GPL, version 2
> #
> # Environment variables used:
> #
> # @env COMMAND_SSH Command for spawning ssh.
> # @env COMMAND_NETCAT Command for spawning netcat.
> # @env NODE_PUBLICKEY Public key for test-nx mode.
> # @env NODE_PASSWORD Password for ssh|su mode.
> #
> # Used external programs:
> #
> # @ext COMMAND_SSH OpenSSH SSH client (remote login program)
> # @ext su Change user ID or become super-user
> # @ext cat Concatenate files and print on the standard output
> (coreutils)
> # @ext cut Remove sections from each line of files
> (coreutils)
> # @ext tr Translate or delete characters (coreutils)
> # @ext COMMAND_NETCAT TCP/IP swiss army knife.
Might help to say COMMAND_NETCAT may be netcat (GNU version) or nc (original)
unless we require one or other. Do we? Similarly is OpenSSH required, or
would a different ssh client like dropbear work?
Perhaps change (coreutils) to (usually provided by GNU coreutils)
> #
> # Exit codes used:
> #
> # @exit 0 Success
> # @exit 1 Authentication failed.
> # @exit 2 Redirection via netcat failed.
> #
> # Known protocol from server:
> #
> # @proto "hello NXSERVER - Version x.y.z" Banner used to determine
> successful connection.
> # @proto "NX> 105" Prompt to send "quit" to.
Does this mean that if we receive "NX> 105" we send "quit" in reply?
> # @proto "NX> 999 Bye." We have successfully logged out.
> # @proto "NX> 103 Welcome to: <server> user: <user>" Used to determine
> successful login.
> #
> # Accepted protocol extensions from nxserver / nxnode:
> #
> # @protoext * "FREENX> 100 Switch: <host>:<port>" Spawns netcat to enable
> SSL tunneling mode.
> #
> # Used protocol extensions to nxclient:
> #
> # @protoext 100 "FREENX> 400 Redirection failed: $error" Thrown when
> redirecting netcat process fails.
> #
> # Parameters used:
> #
> # @param 1 "operation mode" - can be ssh or su or test-nx
> # @param 2 username - to be used username#
> # @param 3 "ssh port" - port
> provided to ssh command line
> # @param 4 executable - program to be executed
> as <username>
> # @param 5 parameters - parameters provided for <executable>
Use of quotes is inconsistent. Does this signify anything, or is it
accidental? I suspect it's because of the spaces, but for consistency with
the syntax below the spaces shouldn't be there.
> #
> # Syntax used:
> #
> # nxserver-login-helper {ssh|su|test-nx} user ssh-port executable
> parameters
Need to keep these consistent with the @param names above
> #
> # SVN: $Id: nxserver-login-helper 348 2007-07-05 16:19:34Z fabianx $
> #
> #
> # Special test-nx instruction for nxsetup
> #
> #
> # Log the user in via the supplied method.
> #
> # Use the spawn id as fd and send everything
> # received from nxserver to stderr.
>
> # we do not need fd in here anymore
>
> # redirection failed
>
> # all okay
>
> # authentication failed
>
> As you can see all programs will be fully documented using some language,
> that is a bit like Doxygen, including _all_
>
> - used programs
> - used components
> - used exit codes
> - spoken protocol
>
> So basically all external interfaces used in any way.
Sounds good. Should help a lot
> Enjoy spellchecking and making the comments more nice if needed.
>
> cu
>
> Fabian
> ________________________________________________________________
> Were you helped on this list with your FreeNX problem?
> Then please write up the solution in the FreeNX Wiki/FAQ:
> http://openfacts.berlios.de/index-en.phtml?title=FreeNX_FAQ
> Don't forget to check the NX Knowledge Base:
> http://www.nomachine.com/kb/
>
> ________________________________________________________________
> FreeNX-kNX mailing list --- FreeNX-kNX at kde.org
> https://mail.kde.org/mailman/listinfo/freenx-knx
> ________________________________________________________________
More information about the FreeNX-kNX
mailing list