# teradici PCoIP client on Gentoo

## tayga

My wok is changing remote workstation set up and now its going to be Teradici PCoIP thing. 

Their website only has client set up for Ubuntu and Cent OS in the docs. 

Does anyone have experience with Teradici client on Gentoo? 

Is it even possible?

Really dont want to change my tuned system to some Ubuntu based disro 

Thanks

----------

## fedeliallalinea

I create an ebuild install pcoip-client and run but I can't really test if work (based on arch pkgbuild package)

```
# Copyright 2021 Gentoo Authors

# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit unpacker xdg-utils

DESCRIPTION="Teradici PCOIP client for x86_64 (64bit) Linux"

HOMEPAGE="https://www.teradici.com/"

SRC_URI="https://downloads.teradici.com/ubuntu/pool/non-free/p/pcoip-client/pcoip-client_${PV}-18.04_amd64.deb

http://se.archive.ubuntu.com/ubuntu/pool/main/p/protobuf/libprotobuf10_3.0.0-9.1ubuntu1_amd64.deb"

LICENSE="Teradici"

SLOT="0"

KEYWORDS="~amd64 ~x86"

RDEPEND="

    dev-qt/qtdeclarative:5

    dev-qt/qtquickcontrols:5

    media-gfx/graphicsmagick[cxx,q16]

    sys-apps/pcsc-lite

"

BDEPEND="

    app-arch/gzip

    dev-util/patchelf

"

S="${WORKDIR}"

QA_PREBUILT="

    /usr/bin/pcoip-client

    /usr/lib64/pcoip-client/*.so*

    /usr/lib64/pcoip-client/*/*.so*

    /usr/libexec/pcoip-client/usb-helper

"

src_prepare() {

    default

    patchelf --replace-needed libGraphicsMagick++-Q16.so.12 libGraphicsMagick++.so.12 "usr/lib/x86_64-linux-gnu/pcoip-client/vchan_plugins/libvchan-plugin-clipboard.so" || die "Unable to patch libvchan-plugin-clipboard.so for libGraphicsMagick++.so.12"

    patchelf --set-rpath  '$ORIGIN/../lib64/pcoip-client' usr/bin/pcoip-client || die "Failed to set rpath"

    gunzip usr/share/man/man8/pcoip-configure-kernel-networking.8.gz || die "Failed to uncompress man"

}

src_install() {

    dobin usr/bin/pcoip-client{,-support-bundler}

    exeinto /usr/sbin

    doexe usr/sbin/pcoip-configure-kernel-networking

    insinto /usr/lib64/pcoip-client

    doins -r usr/lib/x86_64-linux-gnu/pcoip-client/*

    doins usr/lib/x86_64-linux-gnu/libprotobuf.so.10{,.0.0}

    find "${ED}/usr/lib64/" -name "*.so*" -type f -exec chmod +x {} \; || die "Change .so permission failed"

    exeinto /usr/libexec/pcoip-client

    doexe usr/libexec/pcoip-client/usb-helper

    insinto /usr/share/{applications,fonts,icons}

    doins -r usr/share/*

    insinto /usr/share/doc/"${P}"

    doins usr/share/doc/client/pcoip-client/copyright

    doman usr/share/man/man8/pcoip-configure-kernel-networking.8

}

pkg_postinst() {

    xdg_desktop_database_update

    xdg_icon_cache_update

}

pkg_postrm() {

    xdg_desktop_database_update

    xdg_icon_cache_update

}
```

----------

## tayga

wow! Man!

I have no words! 

It works!

This community is the best!

----------

## tayga

Hi!

Thank you very much for helping me in first place with installing teradici!

I was using it constantly since  :Smile: 

But today I need to update it.

How do I update custom ebuild? 

Thank you

----------

## Hu

What have you tried so far?  By inspection of the ebuild posted back then, I expect you need to rename it to match the version number of the new version.  You may also need to adjust the version number for the semi-bundled libprotobuf, if the new version of teradici needs a different one.  If you need more specific help, please link to the install instructions for the version of teradici you want.  Someone may be able to convert those instructions into an ebuild, using the older ebuild as a reference.

----------

## tayga

im trying to convert updated arch pkgbuild: https://github.com/ppira/pcoip-client/blob/master/PKGBUILD

----------

## tayga

here is what i got so far:

pcoip-client-22.01.0.ebuild

```

dl.teradici.com# Copyright 2021 Gentoo Authors

 # Distributed under the terms of the GNU General Public License v2

 

 EAPI=7

 

 inherit unpacker xdg-utils

 

 DESCRIPTION="Teradici PCOIP client for x86_64 (64bit) Linux"

 HOMEPAGE="https://www.teradici.com/"

 SRC_URI="https://dl.teradici.com/DeAdBCiUYInHcSTy/pcoip-client/deb/ubuntu/pool/focal/main/p/pc/pcoip-client_${PV}-20.04/pcoip-client_${PV}-20.04_amd64.deb

 http://se.archive.ubuntu.com/ubuntu/pool/main/p/protobuf/libprotobuf17_3.6.1.3-2ubuntu5_amd64.deb"

 

 LICENSE="Teradici"

 SLOT="0"

 KEYWORDS="~amd64 ~x86"

 

 RDEPEND="

     dev-qt/qtdeclarative:5

     dev-qt/qtquickcontrols:5

     media-gfx/graphicsmagick[cxx,q16]

     sys-apps/pcsc-lite

 "

 BDEPEND="

     app-arch/gzip

     dev-util/patchelf

 "

 

 S="${WORKDIR}"

 

 QA_PREBUILT="

     /usr/bin/pcoip-client

     /usr/lib64/pcoip-client/*.so*

     /usr/lib64/pcoip-client/*/*.so*

     /usr/libexec/pcoip-client/usb-helper

 "

 

 src_prepare() {

     default

 

     patchelf --replace-needed libGraphicsMagick++-Q16.so.12 libGraphicsMagick++.so.12 "usr/lib/x86_64-linux-gnu/pcoip-client/vchan_plugins/libvchan-plugin-clipboard.so" || die "Unable to patch libvchan-plugin-clipboard.so for libGraphicsMagick++.so.12"

     patchelf --set-rpath  '$ORIGIN/../lib64/pcoip-client' usr/bin/pcoip-client || die "Failed to set rpath"

 

     gunzip usr/share/man/man8/pcoip-configure-kernel-networking.8.gz || die "Failed to uncompress man"

 }

 

 src_install() {

     dobin usr/bin/pcoip-client{,-support-bundler}

     exeinto /usr/sbin

     doexe usr/sbin/pcoip-configure-kernel-networking

 

     insinto /usr/lib64/pcoip-client

     doins -r usr/lib/x86_64-linux-gnu/pcoip-client/*

     doins usr/lib/x86_64-linux-gnu/libprotobuf.so.10{,.0.0}

 

     find "${ED}/usr/lib64/" -name "*.so*" -type f -exec chmod +x {} \; || die "Change .so permission failed"

 

     exeinto /usr/libexec/pcoip-client

     doexe usr/libexec/pcoip-client/usb-helper

 

     insinto /usr/share/{applications,fonts,icons}

     doins -r usr/share/*

 

     insinto /usr/share/doc/"${P}"

     doins usr/share/doc/client/pcoip-client/copyright

 

     doman usr/share/man/man8/pcoip-configure-kernel-networking.8

}

 

 pkg_postinst() {

     xdg_desktop_database_update

     xdg_icon_cache_update

 }

 

 pkg_postrm() {

     xdg_desktop_database_update

     xdg_icon_cache_update

```

and it fails on installation:

```

>>> Emerging (1 of 1) net-misc/pcoip-client-22.01.0::localrepo

 * pcoip-client_22.01.0-20.04_amd64.deb BLAKE2B SHA512 size ;-) ...                                                                                                                                     [ ok ]

 * libprotobuf17_3.6.1.3-2ubuntu5_amd64.deb BLAKE2B SHA512 size ;-) ...                                                                                                                                 [ ok ]

>>> Unpacking source...

>>> Unpacking pcoip-client_22.01.0-20.04_amd64.deb to /var/tmp/portage/net-misc/pcoip-client-22.01.0/work

>>> Unpacking data.tar.gz to /var/tmp/portage/net-misc/pcoip-client-22.01.0/work

>>> Unpacking libprotobuf17_3.6.1.3-2ubuntu5_amd64.deb to /var/tmp/portage/net-misc/pcoip-client-22.01.0/work

>>> Unpacking data.tar.xz to /var/tmp/portage/net-misc/pcoip-client-22.01.0/work

>>> Source unpacked in /var/tmp/portage/net-misc/pcoip-client-22.01.0/work

>>> Preparing source in /var/tmp/portage/net-misc/pcoip-client-22.01.0/work ...

>>> Source prepared.

>>> Configuring source in /var/tmp/portage/net-misc/pcoip-client-22.01.0/work ...

>>> Source configured.

>>> Compiling source in /var/tmp/portage/net-misc/pcoip-client-22.01.0/work ...

>>> Source compiled.

>>> Test phase [not enabled]: net-misc/pcoip-client-22.01.0

>>> Install net-misc/pcoip-client-22.01.0 into /var/tmp/portage/net-misc/pcoip-client-22.01.0/image

Traceback (most recent call last):

  File "/usr/lib/portage/python3.9/doins.py", line 607, in <module>

    sys.exit(main(sys.argv[1:]))

  File "/usr/lib/portage/python3.9/doins.py", line 596, in main

    if _doins(

  File "/usr/lib/portage/python3.9/doins.py", line 439, in _doins

    return install_runner.install_file(source, os.path.dirname(dest))

  File "/usr/lib/portage/python3.9/doins.py", line 373, in install_file

    return self._ins_runner.run(source, dest_dir)

  File "/usr/lib/portage/python3.9/doins.py", line 181, in run

    sstat = os.stat(source)

FileNotFoundError: [Errno 2] No such file or directory: b'usr/lib/x86_64-linux-gnu/libprotobuf.so.10'

 * ERROR: net-misc/pcoip-client-22.01.0::localrepo failed (install phase):

 *   doins failed

 * 

 * If you need support, post the output of `emerge --info '=net-misc/pcoip-client-22.01.0::localrepo'`,

 * the complete build log and the output of `emerge -pqv '=net-misc/pcoip-client-22.01.0::localrepo'`.

 * The complete build log is located at '/var/tmp/portage/net-misc/pcoip-client-22.01.0/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/net-misc/pcoip-client-22.01.0/temp/environment'.

 * Working directory: '/var/tmp/portage/net-misc/pcoip-client-22.01.0/work'

 * S: '/var/tmp/portage/net-misc/pcoip-client-22.01.0/work'

>>> Failed to emerge net-misc/pcoip-client-22.01.0, Log file:

>>>  '/var/tmp/portage/net-misc/pcoip-client-22.01.0/temp/build.log'

 * Messages for package net-misc/pcoip-client-22.01.0:

 * ERROR: net-misc/pcoip-client-22.01.0::localrepo failed (install phase):

 *   doins failed

 * 

 * If you need support, post the output of `emerge --info '=net-misc/pcoip-client-22.01.0::localrepo'`,

 * the complete build log and the output of `emerge -pqv '=net-misc/pcoip-client-22.01.0::localrepo'`.

 * The complete build log is located at '/var/tmp/portage/net-misc/pcoip-client-22.01.0/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/net-misc/pcoip-client-22.01.0/temp/environment'.

 * Working directory: '/var/tmp/portage/net-misc/pcoip-client-22.01.0/work'

 * S: '/var/tmp/portage/net-misc/pcoip-client-22.01.0/work'

```

----------

## Hu

The ebuild has a doins that tries to install that file.  Presumably the new version of protobuf has a different name for the file, so you need to adjust the argument to doins accordingly.

----------

## tayga

Yes, that was it! 

protobuf is version 17 now not 10. I changed it in the ebuild file and it installed!

Thanks again!

----------

