Distrobox pcoip-client

Hi! I’m trying to make the switch to nixos as my daily driver. The only thing I truly need to do my job right now is the pciop-client from HP / Teradici. I have succesfully tested distrobox running pcoip in PopOS so I know it’s probably possible but I am failing in nix.
Here is what I get when I run the application:

_IceTransSocketUNIXConnect: Cannot connect to non-local host nixos
_IceTransSocketUNIXConnect: Cannot connect to non-local host nixos
Qt: Session management error: Could not open network socket
QQmlEngine::setContextForObject(): Object already has a QQmlContext

I can see the icon in my dock like its running there but the window is missing.
UPDATE: I get these same warnings in PopOS too so they are not the problem.

I’ve added this to my config:

  environment.shellInit = ''
    [ -n "$DISPLAY" ] && xhost +si:localuser:$USER || true
  '';

I’m running X11 in case that is the issue. Anyone know how to fix this?
Thanks!

Update: I tried running pcoip-client in docker, as their site suggests:

I have a bunch more errors and the end result is the same blank window:

libGL error: MESA-LOADER: failed to retrieve device information
Could not stat /dev/bus/usb/001/009: No such file or directory
QQmlEngine::setContextForObject(): Object already has a QQmlContext
QOpenGLFramebufferObject: Framebuffer incomplete attachment.
QOpenGLFramebufferObject: Framebuffer incomplete, missing draw buffer.
QOpenGLShader: could not create shader
QQmlEngine::setContextForObject(): Object already has a QQmlContext

Is there a mesa package or something I’m missing? I can run glxgears in distrobox and my host fine. Intel gpu.

Here is a link to my dockerfile if anyone wants to sanity check me:

run it with this:

docker run --rm -h myhost -v $(pwd)/.config/:/home/dev/.config/Teradici -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY --network=host pcoip-client

I’m hoping I’m just missing something vital. Thanks!

by the way, there was an old request for pcoip package for nixpkgs, but noone seem to want to do that: Package request: Teradici PCoIP Client · Issue #239042 · NixOS/nixpkgs · GitHub

I currently use pcoip in a virtualbox vm, which is far from optimal, but i would guess that the most straight-forward way of running pcoip client would be by wrapping it in buildFHSEnv.
I’d say the biggest challenge with the package is to automate the fetching of the deb file, as there seem to be some trickery happening on teradici download page.

Interesting… I have no idea how building for nix works so excuse my ignorance. I’m pulling apart the script that HP / Teradici provides to grab the right deb from their server. I was going to try to package it as an appimage. I have no idea of how successful that would be but I’m guessing not at all.

It’s frustrating that I’ve been able to run other docker gui applications on nixos like Firefox. I’m guessing there is something blocking the window from drawing for pcoip.

Virtualizing pcoip seems crazy but that might be the route I ultimately take.

as for your original question - i’ve never ran gui applications in docker, but with X11 it’s always that you need to have DISPLAY, XAUTHORITY env variable set to the same value as host, and have both the file that $XAUTHORITY points to mapped, and /tmp/.X11-unix socket available

That’s usually enough for apps isolated with namespaces.

in case of wayland you need just /run/user/<uid>/wayland-<num> socket, but you probably don’t need that

Thanks for that. I’ve added a bunch to the docker run command and always get the blank window.

My built appimage errors out on a qt symbol - I don’t have the time to untangle the QT mess with appimages, I guess there is a lot there to work through.

I have hit on some success from an odd place. I can run the Teradici pcoip Windows version through Wine. Performance isn’t bad, I think its close to native. I’ll work in it tomorrow and see how it does. If you are curious I’m running wine without anything additional configured :

environment.systemPackages = with pkgs; [
  wineWowPackages.stable
];

Update: FYI Running it all morning in wine. No problems and performance matches the linux native client perfectly.

Hey @da-am did you have to do anything special after installing pcoip?

wine64 ./pcoip_client.exe 
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0084:fixme:hid:handle_IRP_MN_QUERY_ID Unhandled type 00000005
0024:err:module:import_dll Library WinSCard.dll (which is needed by L"C:\\Program Files (x86)\\Teradici\\PCoIP Client\\bin\\broker_client.dll") not found
0024:err:module:import_dll Library broker_client.dll (which is needed by L"C:\\Program Files (x86)\\Teradici\\PCoIP Client\\bin\\pcoip_client.exe") not found
0024:err:module:import_dll Library WinSCard.dll (which is needed by L"C:\\Program Files (x86)\\Teradici\\PCoIP Client\\bin\\pcoip_core.dll") not found
0024:err:module:import_dll Library pcoip_core.dll (which is needed by L"C:\\Program Files (x86)\\Teradici\\PCoIP Client\\bin\\pcoip_client.exe") not found
0024:err:module:LdrInitializeThunk Importing dlls for L"C:\\Program Files (x86)\\Teradici\\PCoIP Client\\bin\\pcoip_client.exe" failed, status c0000135

I’m facing this trying to run it :frowning:

Nope, nothing special. I’ll post the entirety of the wine stuff from my config if that would help. I’ve been using it for weeks with no problems. Once in about 15 times I get a blank frame but otherwise it has been great.

1 Like

I updated to the unstable nixos channel to try out plasma 6 and I can’t load the Anywhere client in wine anymore. It pops up with a dll error. I guess I have some more troubleshooting to do in a few months but until then I’ll stay on 23.11.

1 Like

To update my update, I’ve upgraded to 24.05. My current config for wine is this:

environment.systemPackages = with pkgs; [
    wineWowPackages.stable
    winetricks
];

After updating I had to update the wineprefix :
$WINEPREFIX=~/.wine wineboot --update

Working again

1 Like