1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-22 08:58:47 +00:00

NoMachine NX is the next-generation X compression and roundtrip suppression

scheme. It can operate remote X11 sessions over 56k modem dialup links or
anything better.

This port contains a free (GPL) implementation of the nxserver component.

PR:		ports/79670
Submitted by:	dewey hylton <freenx@deweyonline.com>
This commit is contained in:
Pav Lucistnik 2005-04-09 12:09:09 +00:00
parent 8ccd5ae0a8
commit 23973b4aec
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=132807
11 changed files with 262 additions and 0 deletions

View File

@ -134,6 +134,7 @@
SUBDIR += freebsd-uucp
SUBDIR += freenet
SUBDIR += freenet6
SUBDIR += freenx
SUBDIR += freeradius
SUBDIR += freevrrpd
SUBDIR += freewais-sf

36
net/freenx/Makefile Normal file
View File

@ -0,0 +1,36 @@
# New ports collection makefile for: freenx
# Date created: Sat 11 Sep 2004
# Whom: Lauri Watts <lauri@kde.org>
#
# $FreeBSD$
#
PORTNAME= freenx
PORTVERSION= 0.3.1
CATEGORIES= net
MASTER_SITES= http://debian.tu-bs.de/knoppix/nx/
MAINTAINER= freenx@deweyonline.com
COMMENT= Low-bandwidth X network server
RUN_DEPENDS= ${NXPREFIX}/bin/nxagent:${PORTSDIR}/net/nxserver \
bash:${PORTSDIR}/shells/bash2 \
expect:${PORTSDIR}/lang/expect
NO_BUILD= yes
USE_X_PREFIX= yes
NXPREFIX?= ${PREFIX}/NX
WRKSRC= ${WRKDIR}
do-install:
${MKDIR} ${NXPREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/freenx-0.3.1/nxclient ${NXPREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/freenx-0.3.1/nxnode ${NXPREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/freenx-0.3.1/nxnode-login ${NXPREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/freenx-0.3.1/nxserver ${NXPREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/freenx-0.3.1/nxsetup ${NXPREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/freenx-0.3.1/nxkeygen ${NXPREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/freenx-0.3.1/nxloadconfig ${NXPREFIX}/bin
.include <bsd.port.mk>

2
net/freenx/distinfo Normal file
View File

@ -0,0 +1,2 @@
MD5 (freenx-0.3.1.tar.gz) = 73295358543aa8b785d2fd817f118424
SIZE (freenx-0.3.1.tar.gz) = 32804

View File

@ -0,0 +1,8 @@
--- freenx-0.3.1/nxclient.orig Fri Sep 10 10:04:51 2004
+++ freenx-0.3.1/nxclient Fri Sep 17 12:24:22 2004
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/local/bin/bash
TEMP=`getopt -a -o d: --long local,noautokill,dialog:,caption:,message:,display: -n $(basename $0) -- "$@"`

View File

@ -0,0 +1,17 @@
--- freenx-0.3.1/nxkeygen.orig Sun Feb 13 20:52:08 2005
+++ freenx-0.3.1/nxkeygen Mon Mar 28 15:26:50 2005
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/local/bin/bash
#
# /usr/NX/bin/nxkeygen
# Create a new client/server key pair
@@ -48,7 +48,7 @@
for x in ${NX_CLIENT_KEY} ${NX_SERVER_KEY} ; do
chmod 600 $x
- chown nx:root $x
+ chown nx:nx $x
done
# copy the key to the authorized_keys2 file

View File

@ -0,0 +1,19 @@
--- freenx-0.3.1/nxloadconfig.orig Thu Mar 10 19:11:15 2005
+++ freenx-0.3.1/nxloadconfig Mon Mar 28 12:35:11 2005
@@ -18,12 +18,12 @@
NX_LICENSE="OS (GPL)"
# Where can different nx components be found
-NX_DIR=/usr
+NX_DIR=/usr/X11R6/NX/
PATH_BIN=$NX_DIR/bin # if you change that, be sure to also change the public keys
PATH_LIB=$NX_DIR/lib
-NX_ETC_DIR=/etc/nxserver
-NX_SESS_DIR=/var/lib/nxserver/db
-NX_HOME_DIR=/var/lib/nxserver/home
+NX_ETC_DIR=/usr/X11R6/NX/etc/nxserver/
+NX_SESS_DIR=/var/lib/nxserver/
+NX_HOME_DIR=/home/nx/
# adds PATH_LIB to the startup of nxagents
# Should be set to 1 if PATH_LIB is not a system default library path

View File

@ -0,0 +1,57 @@
--- freenx-0.3.1/nxnode.orig Sat Mar 12 12:57:35 2005
+++ freenx-0.3.1/nxnode Mon Mar 28 12:10:41 2005
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/local/bin/bash
# Free implementation of nxserver components
#
@@ -198,7 +198,7 @@
P=""
[ -n "$agent_user" ] && U="-u $agent_user"
[ -n "$agent_password" ] && P="-p -"
- echo "$agent_password" | $PATH_BIN/nxdesktop -name "NX - $user@$SERVER_NAME:$display - $session (GPL Edition)" $K $G $U $P $agent_server $AGENT_EXTRA_OPTIONS_RDP 2>>~/.nx/C-$sess_id/session &
+ echo "$agent_password" | LD_LIBRARY_PATH=$NX_DIR/lib $PATH_BIN/nxdesktop -name "NX - $user@$SERVER_NAME:$display - $session (GPL Edition)" $K $G $U $P $agent_server $AGENT_EXTRA_OPTIONS_RDP 2>>~/.nx/C-$sess_id/session &
else
# nxviewer session
@@ -206,17 +206,17 @@
if [ "$type" = "vnc" ]
then
mkdir -p ~/.nx/C-$sess_id/scripts/
- echo "$agent_password" | $PATH_BIN/nxpasswd ~/.nx/C-$sess_id/scripts/.passwd doit
- $PATH_BIN/nxviewer -encodings tight hextile copyrect raw -passwd ~/.nx/C-$sess_id/scripts/.passwd -name "NX - $user@$SERVER_NAME:$display - $session (GPL Edition)" $agent_server $AGENT_EXTRA_OPTIONS_RFB 2>>~/.nx/C-$sess_id/session &
+ echo "$agent_password" | LD_LIBRARY_PATH=$NX_DIR/lib $PATH_BIN/nxpasswd ~/.nx/C-$sess_id/scripts/.passwd doit
+ LD_LIBRARY_PATH=$NX_DIR/lib $PATH_BIN/nxviewer -encodings tight hextile copyrect raw -passwd ~/.nx/C-$sess_id/scripts/.passwd -name "NX - $user@$SERVER_NAME:$display - $session (GPL Edition)" $agent_server $AGENT_EXTRA_OPTIONS_RFB 2>>~/.nx/C-$sess_id/session &
else
# "normal" nxagent session
if [ -n "$R" -a "$ENABLE_ROOTLESS_MODE" != "1" ]
then
# nxproxy single application mode session
- $PATH_BIN/nxproxy -C :$display $PROXY_EXTRA_OPTIONS 2>>~/.nx/C-$sess_id/session &
+ LD_LIBRARY_PATH=$NX_DIR/lib $PATH_BIN/nxproxy -C :$display $PROXY_EXTRA_OPTIONS 2>>~/.nx/C-$sess_id/session &
else
# nxagent session
- $PATH_BIN/nxagent -persistent $R -name "NX - $user@$SERVER_NAME:$display - $session (GPL Edition)" $K $G $B :$display $AGENT_EXTRA_OPTIONS_X 2>>~/.nx/C-$sess_id/session &
+ LD_LIBRARY_PATH=$NX_DIR/lib $PATH_BIN/nxagent -persistent $R -name "NX - $user@$SERVER_NAME:$display - $session (GPL Edition)" $K $G $B :$display $AGENT_EXTRA_OPTIONS_X 2>>~/.nx/C-$sess_id/session &
fi
fi
fi
@@ -460,7 +460,7 @@
# TODO: imagecompressionmethod ...
[ "$imagecompressionmethod" = "0" ] && PACK="pack=nopack,"
- proxy_cookie=$(echo $[$RANDOM*$RANDOM] | md5sum | cut -d" " -f1)
+ proxy_cookie=$(echo $[$RANDOM*$RANDOM] | md5 | cut -d" " -f1)
# write options file
[ -z "$samba" ] && samba=0
@@ -573,7 +573,7 @@
$COMMAND_SMBMOUNT //$computername/$rdir $HOME/$dir -o username $username ip 127.0.0.1 port $port
if [ $? -eq 0 ]
then
- $PATH_BIN/nxclient -dialog ok -caption "NXServer Message" -message "Info: Share: '//$computername/$rdir' mounted on: '$HOME/$dir'" -noautokill -display :$display
+ LD_LIBRARY_PATH=$NX_DIR/lib $PATH_BIN/nxclient -dialog ok -caption "NXServer Message" -message "Info: Share: '//$computername/$rdir' mounted on: '$HOME/$dir'" -noautokill -display :$display
fi
}

View File

@ -0,0 +1,44 @@
--- freenx-0.3.1/nxserver.orig Sun Mar 13 19:56:34 2005
+++ freenx-0.3.1/nxserver Mon Mar 28 16:49:04 2005
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/local/bin/bash
# Free implementation of nxserver components
#
@@ -48,7 +48,7 @@
passdb_get_crypt_pass()
{
- echo "$@" | md5sum | cut -d" " -f1
+ echo "$@" | md5 | cut -d" " -f1
}
passdb_get_pass()
@@ -697,7 +697,7 @@
rm -f "$SESS_LOCKFILE"
- uniqueid=$(echo $[$RANDOM*$RANDOM] | md5sum | cut -d" " -f1 | tr "[a-z]" "[A-Z]")
+ uniqueid=$(echo $[$RANDOM*$RANDOM] | md5 | cut -d" " -f1 | tr "[a-z]" "[A-Z]")
FULL_PARAMS="user=$USER&userip=$USERIP&uniqueid=$uniqueid&display=$SESS_DISPLAY&$PARAMS"
log "$FULL_PARAMS"
@@ -755,7 +755,7 @@
if [ "$ENCRYPTION" = "1" ]
then
let PROXY_DISPLAY=$SESS_DISPLAY+4000
- netcat 127.0.0.1 $PROXY_DISPLAY
+ nc 127.0.0.1 $PROXY_DISPLAY
exit 0
else
echo_x "NX> 1001 Bye."
@@ -953,7 +953,7 @@
[ ${#CMD_CHUSER} -ge 32 ] && cmd_abort "Error: User $CMD_CHUSER must be shorter than 32 characters."
egrep -q "^$CMD_CHUSER:" $NX_ETC_DIR/passwords && cmd_abort "Error: User $CMD_CHUSER already in database."
- getent passwd | egrep -q "^$CMD_CHUSER:" || cmd_abort "Error: User $CMD_CHUSER not existing on local system. Can't add."
+ cat /etc/passwd | egrep -q "^$CMD_CHUSER:" || cmd_abort "Error: User $CMD_CHUSER not existing on local system. Can't add."
passdb_add_user "$CMD_CHUSER"
}

View File

@ -0,0 +1,63 @@
--- freenx-0.3.1/nxsetup.orig Tue Feb 15 19:00:31 2005
+++ freenx-0.3.1/nxsetup Mon Mar 28 15:53:10 2005
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/local/bin/bash
# Coypright (c) 2004-2005 by Fabian Franz <freenx@fabian-franz.de>.
# 2005 by Jon Severinsson <jonno@users.berlios.de>.
@@ -97,7 +97,9 @@
{
set -e
- if [ "$(pidof sshd)" = "" ]
+ #if [ "$(pidof sshd)" = "" ]
+ MAYBE_PID=`cat /var/run/sshd.pid`
+ if test -z "$MAYBE_PID"
then
echo -n "Starting ssh service ..."
# Generate Host keys if they are not available, yet
@@ -129,10 +131,12 @@
chmod 600 "$NX_LOGFILE"
echo "done"
- if ! { getent passwd | egrep -q "^nx:"; }
+ #if ! { getent passwd | egrep -q "^nx:"; }
+ if ! { cat /etc/passwd |egrep -q "^nx:"; }
then
echo -n "Setting up user nx ..."
- useradd_nx
+ #useradd_nx
+ pw useradd nx -d $NX_HOME_DIR -s $PATH_BIN/nxserver
echo "done"
fi
@@ -173,19 +177,22 @@
echo "done"
echo -n "Setting up permissions ..."
- chown -R nx:root $NX_SESS_DIR
- chown -R nx:root $NX_ETC_DIR
- chown -R nx:root $NX_HOME_DIR
- chown nx:root "$NX_LOGFILE"
+ chown -R nx:nx $NX_SESS_DIR
+ chown -R nx:nx $NX_ETC_DIR
+ chown -R nx:nx $NX_HOME_DIR
+ chown nx:nx "$NX_LOGFILE"
+ chmod 0400 $NX_HOME_DIR/.ssh/$SSH_AUTHORIZED_KEYS
echo "done"
}
uninstall_nx()
{
- if { getent passwd | egrep -q "^nx:"; }
+ #if { getent passwd | egrep -q "^nx:"; }
+ if { cat /etc/passwd | egrep -q "^nx:"; }
then
echo -n "Removing user nx ..."
- userdel nx
+ #userdel nx
+ pw userdel nx
echo "done"
fi

8
net/freenx/pkg-descr Normal file
View File

@ -0,0 +1,8 @@
NoMachine NX is the next-generation X compression and roundtrip suppression
scheme. It can operate remote X11 sessions over 56k modem dialup links or
anything better.
This package contains a free (GPL) implementation of the nxserver component.
WWW: http://www.nomachine.com/
WWW: http://www.kalyxo.org/twiki/bin/view/Main/FreeNX

7
net/freenx/pkg-plist Normal file
View File

@ -0,0 +1,7 @@
NX/bin/nxclient
NX/bin/nxnode
NX/bin/nxnode-login
NX/bin/nxserver
NX/bin/nxsetup
NX/bin/nxkeygen
NX/bin/nxloadconfig