nxproxy(1)

πŸ“¦
version 3.5.99.27 Β· 3 versions
, in alpine 3.24, debian trixie, epel 10, fedora 43, fedora 44, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ¦‹ NAME πŸ¦‹

okay so this is the manual page for nxproxy(1), coming to you from the NX Proxy section of the manual. Its government name is the NX Proxy Tool. That's it, that's the name section. short. iconic. moving on. πŸ’…


✨ SYNOPSIS ✨

nxproxy [<options>] <host>:<port>

like, that's the whole shape of it. options, then a host and a port at the end. slay. 🌸


🌈 DESCRIPTION 🌈

so bestie, nxproxy is a tool that lets you tunnel X sessions through the NX compression library. that's the whole vibe. πŸ¦‹

it's a backend application, which means it's the behind-the-scenes main character that a bunch of client applications use. we're talking Remmina, X2Go Client, PyHoca-Gui, Arctica Client, TheQVD Client, etc. they show up and look pretty, nxproxy does the actual work. no cap. πŸ‘‘


πŸŽ€ COMMAND LINE OPTIONS πŸŽ€

every single one, in order, no skipping. buckle up. 🫢

  • -C β€” tells nxproxy it has to run on the 'X client' side. that means it's listening for connections and straight up impersonating an X server. catfishing, but for networking. 😭
  • -S β€” tells nxproxy to run in 'X server' mode. so it's forwarding the connections to daemons running on the client.
  • -h β€” prints this message. the classic cry for help. πŸ™ˆ
  • -v β€” prints version information. the "what era are we in" check. ⭐
  • -d <int> β€” sets the log level. here's the scale, memorize it:
    • 0 β€” FATAL
    • 1 β€” ERROR
    • 2 β€” WARNING
    • 3 β€” INFO
    • 4 β€” DEBUG

the default is 0. so yeah, by default it's only telling you about disasters. πŸ’€

  • -o <string> β€” the name of the log file. the default is stderr. πŸ“
  • -f <string> β€” specifies the log format. the characters inside <string> define how the loglines get formatted. here's what's supported, and the default is '0':
    • 0 β€” only the plain text, no additions whatsoever. this is the default.
    • u β€” include time
    • l β€” include loglevel
    • T β€” include thread ids
    • L β€” include the location of the log call in the source code
  • <host>:<port> β€” goes at the end, and it specifies the host and port of the listening proxy. the finale. the last word. 🌟

πŸ’œ NX/NX DISPLAY OPTIONS πŸ’œ

here's the tea: you can specify multiple nx/nx options, either in the DISPLAY environment or right on the command line, by using the nx/nx,option=value notation. so many options, so little time. ✨

  • link=<string> β€” an indication of the link speed that's gonna be used between the proxies. usually the compression and the other link parameters depend on this setting. the value can be either 'modem', 'isdn', 'adsl', 'wan', 'lan', 'local', or a bandwidth specification β€” like for example '56k', '1m', '100m', etc. pick your fighter. πŸ₯Š
  • type=<string> β€” the type of session, for example 'windows', 'unix-kde', 'unix-application', etc.
  • display=<string> β€” specifies the real display where X connections have to be forwarded by the proxy running on the client.
  • listen=<int> β€” the local port used for accepting the proxy connection.
  • loopback=<bool> β€” bind to the loopback device only. stay home, stay safe. 🏠
  • accept=<string> β€” the name or IP of the host that can connect to the proxy.
  • connect=<string> β€” the name or IP of the host that the proxy will connect to.
  • port=<int> β€” the remote port used for the connection.
  • retry=<int> β€” the number of connection attempts.
  • root=<string> β€” the root directory for the session. usually it's the C-* or S-* in the .nx directory in the user's home, with '*' being the virtual display.
  • session=<string> β€” the name of the session file. the default is the name 'session' in the session directory.
  • errors=<string> β€” the name of the log file used by the proxy. the default is the name 'errors' in the session directory.
  • stats=<string> β€” the name of the file where the proxy statistics get written. the default is a file 'stats' in the session directory. and here's the cute part: the proxy replaces the data in the file whenever it receives a SIGUSR1 or SIGUSR2 signal:
    • SIGUSR1 β€” gives total statistics, i.e. statistics collected since the beginning of the session.
    • SIGUSR2 β€” gives partial statistics, i.e. statistics collected since the last time this signal was received.

yes bestie, it's giving receipts on demand. 🧾

  • cookie=<string> β€” use the provided cookie for authenticating to the remote proxy. the same cookie is used as the fake value used for the X authorization. the fake cookie gets replaced on the X server side with the real cookie to be used for the display, so that the real cookie doesn't have to travel over the net. when not using a proxy cookie, any host will be able to connect to the proxy. see also the 'accept' parameter. so like, use the cookie. protect yourself. πŸͺ
  • nodelay=<bool> β€” a boolean indicating if TCP_NODELAY has to be set on the proxy link. old Linux kernels had problems with handling TCP_NODELAY on PPP links. ancient drama, we don't talk about it. πŸ’€
  • policy=<bool> β€” let or not let the agent decide when it's the best time to flush the proxy link. if set to 0, the proxy will flush any encoded data immediately. this option has only effect on the X client side proxy.
  • render=<bool> β€” enable or disable use of the RENDER extension.
  • taint=<bool> β€” try to suppress trivial sources of X roundtrips by generating the reply on the X client side. dodging the roundtrip, fr fr. πŸƒβ™€οΈ
  • delta=<bool> β€” enable X differential compression.
  • data=<int> β€” enable or disable the ZLIB data compression. it's possible to specify a value between 0 and 9. usually the value is chosen automatically based on the requested link setting.
  • stream=<int> β€” enable or disable the ZLIB stream compression. the value, between 0 and 9, is usually determined according to the requested link setting. not fully implemented in nx-X11 Agent, yet. so like, it's half dressed. πŸ™ˆ
  • limit=<int> β€” specify a bitrate limit allowed for this session.
  • memory=<int> β€” trigger memory optimizations used to keep small the size of X buffers. this is useful on embedded plat- forms, or where memory is scarce. tiny budget, big dreams. πŸ“
  • cache=<int> β€” size of the in-memory X message cache. setting the value to 0 will disable the memory cache as well as the NX differential compression. one switch, two consequences. ⚠️
  • images=<int> β€” size of the persistent image cache.
  • shseg=<int> β€” enable the use of the MIT-SHM extension between the nxproxy and the real X server. a value greater than 1 is assumed to be the size of the requested shared memory segment. by default, the size of the segment is determined based on the size of the in-memory cache.
  • load=<bool> β€” enable loading a persistent X message cache at the proxy startup.
  • save=<bool> β€” enable saving a persistent X message cache at the end of session.
  • cups=<int> β€” enable or disable forwarding of CUPS connections, by listening on the optional port 'n'.
  • aux=<int> β€” enable or disable forwarding of the auxiliary X channel used for controlling the keyboard. the 'keybd=<int>' form is accepted for backward compatibility.
  • smb=<int> β€” enable or disable forwarding of SMB connections. the 'samba=<int>' form is accepted for backward compatibility.
  • media=<int> β€” enable forwarding of audio connections. 🎧
  • http=<int> β€” enable forwarding of HTTP connections.
  • font=<int> β€” enable forwarding of reversed connections to a font server running on the NX server.
  • file=<int> β€” enable forwarding of file transfer connections.
  • mask=<int> β€” determine the distribution of channel ids between the proxies. by default, channels whose ids are multiple of 8 (starting from 0) are reserved for the NX client side. all the other channels can be allocated by the nx-X11 Agent side. dividing up the friend group. 🀝
  • timeout=t β€” specify the keep-alive timeout used by proxies to determine if there's a network problem preventing communication with the remote peer. a value of 0 disables the check.
  • cleanup=t β€” specify the number of seconds the proxy has to wait at session shutdown before closing all channels. the feature is used by the NX server to ensure that services are disconnected before shutting down the link.
  • pack=<string> β€” determine the method used to compress images.
  • product=<string> β€” the product id of the client or server. the value is ignored by the proxy, but the client or server can provide it to facilitate the support. it's just for the record, bestie. πŸ“‹
  • core=<bool> β€” enable production of core dumps when aborting the proxy connection.
  • options=<string> β€” specify an additional file containing options that has to be merged with option read from the command line or the environment.
  • kill=<int> β€” add the given process to the list of daemons that must be terminated at session shutdown. multiple 'kill=<int>' options can be specified. the proxy will send them a SIGTERM signal just before exiting. dramatic exit, honestly deserved. πŸ’…
  • strict=<bool> β€” optimize for responsiveness, rather than for the best use of all the available bandwidth.
  • encryption=<bool> β€” should be set to 1 if the proxy is running as part of a program providing encryption of the point to point communication.

πŸ™ˆ the options that aren't even yours

the following options are interpreted by the nx-NX Agent. they are ignored by the proxy. so like, nxproxy is literally just not listening to these. not my business, not my problem, iykyk. βœ‹

  • autodpi=<bool>
  • autograb=<bool>
  • backingstore=<int>
  • client=<string>
  • clients=<string>
  • clipboard=<int>
  • composite=<int>
  • copysize=<int>
  • defer=<int>
  • fullscreen=<bool>
  • geometry=<string>
  • kbtype=<string>
  • keyboard=<string>
  • keyconv=<string>
  • magicpixel=<bool>
  • menu=<int>
  • resize=<bool>
  • rootless=<bool>
  • shadow=<int>
  • shadowmode=<string>
  • shadowuid=<int>
  • shmem=<bool>
  • shpix=<bool>
  • sleep=<int>
  • state=<string>
  • streaming=<int>
  • textclipboard=<bool>
  • tile=<string>
  • tolerancechecks=<int>
  • xinerama=<int>

🌸 NX ENVIRONMENT VARIABLES 🌸

ok so bestie, listen β€” the nxproxy app (and nxagent too, when it's vibing with nxcomp support) can be influenced by these environment variables. like, they're literally whispering in its ear. here's the tea:

  • NX_ROOT β€” this is the root NX directory, aka the place where the session directory and the cache files get created. it's usually overridden by passing the root= option instead. by default, the root NX directory is assumed to be the directory .nx in the user's home. cute, right? 🏠
  • NX_SYSTEM β€” the directory where NX programs and libraries live. if it's not set, the value is assumed to be /usr/NX. programs, libraries and data files get searched in the bin, lib and share subdirectories respectively. so organized of them πŸ’…
  • NX_HOME β€” the NX user's home directory. if NX_ROOT is not set or is invalid, the user's NX directory gets created here.
  • NX_TEMP β€” the directory where all the temporary files are to be created. all of them. every single one. πŸ—‚οΈ
  • NX_CLIENT β€” the full path to the <nxclient> executable. if this variable is not set, the <nxclient> executable will be run assuming that the program is in the system path. this can be useful on platforms like Windows and the MacOS X where <nxclient> is located in a different directory compared to the other programs β€” makes it easier for the user to execute the program from the shell, no cap ✨
  • NX_SLAVE_CMD β€” the full path to the slave channel handler. when the slave channel is enabled, the agent will listen on a port and forward the connection to the NX_SLAVE_CMD program. this can be used to implement agent/proxy communication for applications such as serial port and USB forwarding. obsessed with the versatility honestly πŸ”₯

🐚 SHELL ENVIRONMENT VARIABLES 🐚

these are the ones your shell already knows about, and they matter too:

  • HOME β€” this variable is checked in the case that NX_HOME is not set, null or invalid. backup plan energy πŸ’–
  • TEMP β€” this variable is checked whenever the NX_TEMP directory is not set, null or invalid.
  • PATH β€” the path where all executables are searched, except <nxclient>. if NX_CLIENT is not set, then the client executable is searched in the system path too. so like, it depends, iykyk 🫢
  • LD_LIBRARY_PATH β€” the system-wide library search order. this should be set by the program invoking the proxy. it's giving "not your job, bestie, the caller handles it" 😌
  • DISPLAY β€” on the X server side, the DISPLAY variable indicates the location of the X11 server. when nxcomp is used as a transport library, the DISPLAY may represent a NX transport specification, and options can be passed in the form nx/nx,option=value.... iconic behavior fr fr πŸ‘‘
  • XAUTHORITY β€” this is the file containing the X11 authorization cookie. if it's not set, the file is assumed to be in the user's home (either NX_HOME or HOME). πŸͺ (yes it's literally called a cookie, we love that for us)

πŸ’œ AUTHOR πŸ’œ

okay story time, because the lore is actually good:

the nxproxy application has originally been derived from a software project called DXCP. the company NoMachine turned DXCP into nxcomp, with nxproxy as the executable around nxcomp. so like, nxproxy is basically nxcomp's little outfit, its main character moment πŸ’…

the current maintenance of nxproxy (major version 3) is coordinated between various projects β€” mainly by The Arctica Project, TheQVD (Qindel Group) and the X2Go Project. group project but make it ✨international collaboration✨

this manual has been written by Mike Gabriel <mike.gabriel@das-netzwerkteam.de> for the X2Go project (http://www.x2go.org) and later on improved for the Arctica Project (https://arctica-project.org). shoutout to Mike, the realest 🫢


and that's the whole page, bestie!! πŸŽ€ this was Version 3.5.99.27, dated Jun 2023, and it's the nxproxy(1) manpage β€” now go forth and proxy responsibly, you absolute icon πŸ¦‹βœ¨πŸ’–