You are not logged in.

#1 2009-08-24 09:45:54

agravier
Member
Registered: 2009-08-21
Posts: 18

Creating a PKGBUILD for the proprietary NX server

Hi all

I want to do a PKGBUILD for the vanilla NX free edition for Linux.

The installation instructions are to uncompress the server, node and client tarballs in /usr/NX and to run their home-made install scripts located in NX/scripts/setup.

Of course, the install script is trying to guess on which distrib it's being installed, and it fails for Arch as only a few major ones are listed.

Hence, the PKGBUILD is very simple:

# Maintainer: Alexandre Gravier <alexandre.gravier+archlinux*gmaildotcom>                                                        

pkgname=nomachine-nxserver
pkgver=3.3.0-22
pkgrel=1
pkgdesc="Nomachine's original proprietray NX server with node and client dependencies"
arch=(i686)
url="http://http://www.nomachine.com/"
license=("Proprietary")
depends=(fontconfig freetype2 glibc gcc-libs libx11 libxext libcups libxft libxpm)
conflicts=(nxserver nx-commons nxclient)

dlserver=http://64.34.161.181/download/3.3.0/Linux

source=(
"${dlserver}/nxclient-3.3.0-6.i386.tar.gz"
"${dlserver}/nxnode-3.3.0-17.i386.tar.gz"
"${dlserver}/FE/nxserver-3.3.0-22.i386.tar.gz")

md5sums=(
'f2523d38803896073f050314c3a1dd3f'
'c945d770ee9a7dadd6bdb387e797c2c3'
'82dbcd1fbc086698547fba01b4528a83')

install=${pkgname}.install

build() {
  cd ${srcdir}

  if [ -n -d NX ]; then
    msg "Something went wrong, the archive didn't expand into a NX directory"
    return 1
  fi

  mv NX ${pkgdir}/usr/
}

But the nomachine-nxserver.install script has to replicate te funtionality of the scripts located in NX/scripts/setup.
Did anyone already install the proprietary NX server on his Archlinux machine? If you did, you probably adapted Nomachine's scripts or copy-pasted some commands from them. If you could mind sharing that, if would greatly helm me writing this install script tongue

Last edited by agravier (2009-11-16 05:14:48)

Offline

#2 2009-08-24 11:12:01

xduugu
Member
Registered: 2008-10-16
Posts: 292

Re: Creating a PKGBUILD for the proprietary NX server

extra/nxserver 3.3.0-6 [2.53 MB]
    NoMachine NX is the next-generation X compression and roundtrip suppression scheme.

Isn't that the nomachine nx server?

Offline

#3 2009-08-24 12:59:50

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Creating a PKGBUILD for the proprietary NX server

The package in extra is built from source, which is usually preferable. If you still want to package the binary files, as in the PKGBUILD above, you should examine the provided install script and recreate the necessary commands within the PKGBUILD, amending install paths as required to include ${pkgdir} and any other Arch-specific requirements.

*.install scripts in Arch packaging are only used for commands that require execution at install time, as distinct from package-build time.

Offline

#4 2009-08-24 13:47:06

agravier
Member
Registered: 2009-08-21
Posts: 18

Re: Creating a PKGBUILD for the proprietary NX server

xduugu wrote:

Isn't that the nomachine nx server?

I tried it, and as far as I could understand, it's not all of Nomachine's binaries, if any, and it requires freenx to properly work.
What I need is an installer for the closed-source binaries.

tomk summarized that correctly, and that's the point of my message: did anybody adapt Nomachine's installer script to Arch (or at least managed to get the NX server working)? Because the rc.d structure is different than anything the installer is able to handle, etc...

Offline

#5 2009-08-24 15:10:08

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Creating a PKGBUILD for the proprietary NX server

I'd suggest you start by assuming nobody else has done this - that way you can make a start yourself, and if somebody drops by with relevant experience, that's a bonus. Essentially you need to look in the provided script to see where it puts the files from the tarballs, then do the same in your PKGBUILD. You will probably need to write the init script from scratch, using the original as inspiration, but adapting it to Arch's requirements - rc.d etc. Look at /usr/share/pacman/rc-script.proto and/or any existing script from /etc/rc.d/ for guidance.

Re the nxserver package, you're almost correct - it provides none of Nomachine's binaries, as it is built from source. For curiosity's sake, is there some advantage to using those binaries, compared to the source build?

Offline

#6 2009-08-25 17:30:53

agravier
Member
Registered: 2009-08-21
Posts: 18

Re: Creating a PKGBUILD for the proprietary NX server

Thanks tomk, I'll do what I can. As for the need for the proprietary implementation, it's more performant on my machines and I have some tricks that allow me to use nxclient as local and remote "display manager" (I mean login prompt) with detachable sessions that I can reattach remotely. It then feels like screen for X11. But I need the proprietary binaries as when I failed to do that with freenx. Maybe my lack of knowledge, but I also lack time.

Anyway, cheers and thanks for the advice, I hope I'll be ale to close this thread with a working PKGBUILD soon.

Offline

#7 2009-09-09 16:45:16

richardmurri
Member
Registered: 2008-10-29
Posts: 39

Re: Creating a PKGBUILD for the proprietary NX server

You should also take a look at x2go.  It is not compatible with the official nx clients but I beleive it supports all of the features you've mentioned.

Offline

#8 2009-10-01 14:42:02

peoro
Member
Registered: 2007-06-10
Posts: 67

Re: Creating a PKGBUILD for the proprietary NX server

As far as I know, x2go (just like the opensource NX client) can't export the local display, while NoMachine NX server (and VNC, which is terribly slow) can.

For such reason I'd like to find a package for Nomachine NX has well...

Offline

#9 2010-01-11 14:43:17

pcallycat
Member
Registered: 2010-01-11
Posts: 5

Re: Creating a PKGBUILD for the proprietary NX server

It's not necessarily the 'right' way to do things, but here's how I install it.  I create a symlink init.d -> rc.d since the setup scripts expect the init.d directory instead.  then run the install scripts specifying redhat for the system type.  There will be some failure as it tries to install runlevel specific scripts, but, that's ok, the main script gets installed to rc.d.  After all is said and done, remove the init.d symlink. 

Following these steps I have nx free edition installed and working.

Offline

#10 2010-04-28 22:25:31

esplinter
Member
Registered: 2010-04-28
Posts: 2

Re: Creating a PKGBUILD for the proprietary NX server

pcallycat wrote:

It's not necessarily the 'right' way to do things, but here's how I install it.  I create a symlink init.d -> rc.d since the setup scripts expect the init.d directory instead.  then run the install scripts specifying redhat for the system type.  There will be some failure as it tries to install runlevel specific scripts, but, that's ok, the main script gets installed to rc.d.  After all is said and done, remove the init.d symlink. 

Following these steps I have nx free edition installed and working.

many thanks. After symlinking init.d to rc.d I could install closed source nx server without problem (tar.gz file). What a pain that AltGr key still doesn´t work for me sad  I have the same problem using freenx or the close source nx server from nomachine, AltGr is not working in remote sessions from my ubuntu machine to my arch machine.....

Offline

Board footer

Powered by FluxBB