theqvd / theqvd

QVD is an Open Source VDI (Virtual Desktop Infrastructure) solution, developed by Qindel Group, it provides a safe and easy to manage alternative to desktops and applications virtualisation under Linux environment.
http://theqvd.com
103 stars 31 forks source link

linux binary client has X server issue #57

Open basd925 opened 7 years ago

basd925 commented 7 years ago

I started a demo account at theqvd.com. My windows client logs in correctly.

I have tried using the linux .bin client, but there is a problem with connecting to the X server. Any suggestions? Error response below:

Connecting to the first vm: vm_id 12180

NXPROXY - Version 3.5.0

Copyright (C) 2001, 2010 NoMachine. See http://www.nomachine.com/ for more information.

Info: Proxy running in client mode with pid '27066'. Session: Starting session at 'Tue Mar 21 11:10:53 2017'. Info: Using abstract X11 socket in kernel namespace for accessing DISPLAY=:0. Info: Connection with remote proxy completed. Info: No proxy cookie was provided for authentication. Info: Forwarding the real X authorization cookie. Info: Using ADSL link parameters 512/24/1/0. Info: Using cache parameters 4/4096KB/8192KB/8192KB. Info: Using pack method 'adaptive-7' with session ''. Info: Using ZLIB data compression 1/1/32. Info: Using ZLIB stream compression 4/4. Info: No suitable cache file found. Info: Forwarding X11 connections to display ':0'. Session: Session started at 'Tue Mar 21 11:10:53 2017'. Warning: X connection failed with error 'No protocol specified'. Session: Terminating session at 'Tue Mar 21 11:10:58 2017'. Info: Your session was closed before reaching a usable state. Info: This can be due to the local X server refusing access to the client. Info: Please check authorization provided by the remote X application. Session: Session terminated at 'Tue Mar 21 11:10:58 2017'. after qvd_connect_to_vm

jzeaherra commented 7 years ago

Hi, What distro do you use? What is your x server version?

Please, try running this in a terminal as your own user: xhost +

X access control shouldn't be a problem, but this way we will take it out of the equation.

basd925 commented 7 years ago

Distro is openSUSE Tumbleweed, KDE Plasma 5.9.2, Kernel 4.10.4-1ge2ef894-default

X-Server version 11.0

I'm using the pre-compiled linux binary qvdclient. I did run "xhost +" prior to qvdclient.

Remote session does not come up, though it says "Established X server connection." Response is as follows:

Info: Proxy running in client mode with pid '28045'. Session: Starting session at 'Thu Mar 23 00:32:04 2017'. Info: Using abstract X11 socket in kernel namespace for accessing DISPLAY=:0. Info: Connection with remote proxy completed. Info: No proxy cookie was provided for authentication. Info: Forwarding the real X authorization cookie. Info: Using ADSL link parameters 512/24/1/0. Info: Using cache parameters 4/4096KB/8192KB/8192KB. Info: Using pack method 'adaptive-7' with session ''. Info: Using ZLIB data compression 1/1/32. Info: Using ZLIB stream compression 4/4. Info: No suitable cache file found. Info: Forwarding X11 connections to display ':0'. Session: Session started at 'Thu Mar 23 00:32:04 2017'. Info: Established X server connection. after qvd_connect_to_vm Session: Session terminated at 'Thu Mar 23 00:34:05 2017'.

On 03/22/2017 12:05 AM, jzeaherra wrote:

Hi, What distro do you use? What is your x server version?

Please, try running this in a terminal as your own user: xhost +

X access control shouldn't be a problem, but this way we will take it out of the equation.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/theqvd/theqvd/issues/57#issuecomment-288315647, or mute the thread https://github.com/notifications/unsubscribe-auth/AZWVG9pDVZ3nnSZmnBg67_Di-HFL-FIRks5roMgxgaJpZM4MkO5i.

basd925 commented 7 years ago

This is interesting. I ran remote-viewer, which is a linux vnc and spice viewer. In remote-viewer I started spice://192.168.1.100:5390 (where I have redirected the port via Virtualbox).

I got a connection -- black screen. So, then I ran the qvdclient from a command line to "log in" and the vm came up in the remote-viewer display.

On 03/23/2017 12:42 AM, Barrington Daltrey wrote:

Distro is openSUSE Tumbleweed, KDE Plasma 5.9.2, Kernel 4.10.4-1ge2ef894-default

On 03/22/2017 12:05 AM, jzeaherra wrote:

Hi, What distro do you use? What is your x server version?

Please, try running this in a terminal as your own user: xhost +

X access control shouldn't be a problem, but this way we will take it out of the equation.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/theqvd/theqvd/issues/57#issuecomment-288315647, or mute the thread https://github.com/notifications/unsubscribe-auth/AZWVG9pDVZ3nnSZmnBg67_Di-HFL-FIRks5roMgxgaJpZM4MkO5i.

vatral commented 7 years ago

Hello,

I've been testing Tumbleweed in a VM. I successfully reproduced your issue in a clean install: download, run, "No protocol specified".

Further testing revealed that SuSE seems to be configured somewhat differently from say, Fedora. Fedora has user account based identification by default, while SuSE requires using the MIT-MAGIC-COOKIE and the client appears to fail to provide it.

You can fix the auth issue with:

$ xhost SI:localuser:$USER

to grant access to X11 apps running locally under your user account. This is more secure than just allowing X11 from anywhere. I will look into the cookie auth issue, but meanwhile that should get things working.

With that everything works correctly for me under KVM. I'm now setting up VirtualBox to see if there's anything about it that causes a problem.

vatral commented 7 years ago

I tested things under VirtualBox and it also works (after the xhost command above).

Regarding SPICE it seems you've got some kind of custom setup there, as VirtualBox doesn't use it. Could you give us more details on this setup you have?

basd925 commented 7 years ago

Thank you. As noted, I also have the remote-viewer work around. I will give you more information when I return from a short trip, I have ben away from my test computer.

On March 23, 2017 3:38:28 AM MST, Vadim Troshchinskiy notifications@github.com wrote:

Hello,

I've been testing Tumbleweed in a VM. I successfully reproduced your issue in a clean install: download, run, "No protocol specified".

Further testing revealed that SuSE seems to be configured somewhat differently from say, Fedora. Fedora has user account based identification by default, while SuSE requires using the MIT-MAGIC-COOKIE and the client appears to fail to provide it.

You can fix the auth issue with:

$ xhost SI:localuser:$USER

to grant access to X11 apps running locally under your user account. This is more secure than just allowing X11 from anywhere. I will look into the cookie auth issue, but meanwhile that should get things working.

With that everything works correctly for me under KVM. I'm now setting up VirtualBox to see if there's anything about it that causes a problem.

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/theqvd/theqvd/issues/57#issuecomment-288679566

-- Sent from my Android device with K-9 Mail. Please excuse my brevity.

basd925 commented 7 years ago

On 03/23/2017 08:25 AM, Vadim Troshchinskiy wrote:

I tested things under VirtualBox and it also works (after the xhost command above).

Regarding SPICE it seems you've got some kind of custom setup there, as VirtualBox doesn't use it. Could you give us more details on this setup you have?

Hi --

I was away for awhile, so did not respond earlier. I attempted using the xhost command per your suggestion (xhost SI:localuser:$USER) and then ran the qvdclient. The response indicated an X session was started, but a terminal did not come up. I have pasted the console response below. I have a fairly customized Tumbleweed install, so the problem could be any of a number of things. The QVD client on my Win10 computer works ok.

I previously mentioned a connection I made using the SPICE "remote-viewer" software. I just tried to replicate that, but could not do it, so it is a mystery to me why it worked before. Just FYI: when it previously worked, I started the local qvd server (in virtualbox), then I connected via software called "remote-viewer" with a command of spice://192.168.1.xx:5930. (I had changed the port forwards in virtualbox to my lan so that I could access from a second computer via the qvd windows client.) I also put the port forwards back to the virtualbox appliance defaults and connected via spice://localhost:5930.

In either instance, this brought up a black x-screen without any log in prompts, so I ran the linux qvd client binary from a separate console command line and logged in to achieve a "logged in" connection. The black x-screen then went "live" and I was able to access my local virtualbox qvd/ubuntu. (In any event, I am now unable to replicate this process, although I can still connect to the virtualbox qvd from my Win10 laptop).

The SPICE software I am referring to is found here: https://www.spice-space.org/download.html, but I got my version from openSUSE build service: http://software.opensuse.org/search?utf8=%E2%9C%93&q=spice&search_devel=false&search_unsupported=false&baseproject=openSUSE%3ALeap%3A42.2

The reason I tried the SPICE viewer is that somewhere in the QVD online literature, I found a reference to SPICE technology. I had not heard of it before. So, after unsuccessful attempts with vncviewer, I thought "why not?" I'm disappointed it doesn't work anymore, I thought I was on to something ...

Console response to qvdclient binary:

daltrey@linux-rvrs:~> xhost SI:localuser:$USER localuser:daltrey being added to access control list

daltrey@linux-rvrs:~> ./qvdclient -h demo.theqvd.com -u XXXXX -w XXXXX Unknown cert:

Serial: 18260071524629807760

Issuer: /C=US/ST=Arizona/L=Scottsdale/O=Starfield Technologies, Inc./OU=http://certs.starfieldtech.com/repository//CN=Starfield Secure Certificate Authority - G2

Validity:

    Not before:

160118110738Z

    Not after:

190118110738Z

Subject: /OU=Domain Control Validated/CN=*.theqvd.com

Do you want to accept it? yes

Unknown cert:

Serial: 18260071524629807760

Issuer: /C=US/ST=Arizona/L=Scottsdale/O=Starfield Technologies, Inc./OU=http://certs.starfieldtech.com/repository//CN=Starfield Secure Certificate Authority - G2

Validity:

    Not before:

160118110738Z

    Not after:

190118110738Z

Subject: /OU=Domain Control Validated/CN=*.theqvd.com

Do you want to accept it? yes

Connecting to the first vm: vm_id 12180

NXPROXY - Version 3.5.0

Copyright (C) 2001, 2010 NoMachine.

See http://www.nomachine.com/ for more information.

Info: Proxy running in client mode with pid '27683'.

Session: Starting session at 'Fri Mar 31 22:31:35 2017'.

Info: Using abstract X11 socket in kernel namespace for accessing DISPLAY=:0.

Info: Connection with remote proxy completed.

Info: No proxy cookie was provided for authentication.

Info: Forwarding the real X authorization cookie.

Info: Using ADSL link parameters 512/24/1/0.

Info: Using cache parameters 4/4096KB/8192KB/8192KB.

Info: Using pack method 'adaptive-7' with session ''.

Info: Using ZLIB data compression 1/1/32.

Info: Using ZLIB stream compression 4/4. Info: No suitable cache file found. Info: Forwarding X11 connections to display ':0'. Session: Session started at 'Fri Mar 31 22:31:35 2017'. Info: Established X server connection. after qvd_connect_to_vm Session: Session terminated at 'Fri Mar 31 22:33:40 2017'.

vatral commented 7 years ago

Hello,

We don't currently use SPICE for anything. It's one of the things we have considered for going forward, but the current tech is all X11 based.

Are you by chance running Wayland? If so, please try pure X11, just in case that makes some sort of difference (I have tried under Xwayland and it works for me, though)

Please try the following things:

I'm also looking into seeing how easy it is to install the RPM packages on Tumbleweed. Our packages are extremely self-contained and have few external dependencies, so in general it's not very hard to get them to work on distributions that aren't officially supported.

basd925 commented 7 years ago

Strange I was able to get a connection using the spice remote-viewer, especially as I can't reproduce it -- but I am pretty sure I was not hallucinating!

I tried the rpm, but there was at least one missing dependency I could not resolve. Maybe that is a package also required by the binary. However, that would not explain why it works on your Tumbleweed install and not mine.

.nx might be an issue, because I once tried an nx set up on my machine, so I probably have residual config files of some sort. Maybe I should try a different user login.

I have a Plasma Wayland optional desktop, but I am not presently using it as it is not 100% stable. I may try running qvd in an xfce or lxde desktop to rule out kde plasma issues. Or maybe even Wayland, which might avoid conflicts with the Plasma X utilization. I do not have any problem with multiple VNC sessions

I will follow up on your suggestions. Thanks.

Meantime, I am off at a hotel -- which is the exact situation where i would like qvd to work.☺

On April 3, 2017 2:21:04 AM PDT, Vadim Troshchinskiy notifications@github.com wrote:

Hello,

We don't currently use SPICE for anything. It's one of the things we have considered for going forward, but the current tech is all X11 based.

Are you by chance running Wayland? If so, please try pure X11, just in case that makes some sort of difference (I have tried under Xwayland and it works for me, though)

Please try the following things:

  • Run xterm from the same window where you're starting the QVD client, just to make sure everything works correctly.
  • Delete ~/.nx
  • Run "strace -s 200 -f -tt -o client.trace ./qvdclient_x86_64" with the usual connection arguments after that.
  • Send us client.trace, as well as the contents of ~/.nx after running the client.

I'm also looking into seeing how easy it is to install the RPM packages on Tumbleweed. Our packages are extremely self-contained and have few external dependencies, so in general it's not very hard to get them to work on distributions that aren't officially supported.

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/theqvd/theqvd/issues/57#issuecomment-291091064

-- Sent from my Android device with K-9 Mail. Please excuse my brevity.

basd925 commented 7 years ago

Good news, I was able to get the linux client to run on my laptop. The same software changes may work on my desktop, but I haven't tried it yet.

In this instance, I found the libwx_gtk2u_adv-2_8-0-stl dependency from openSUSE 42.2. It does not seem to be available to my Tumbleweed install (and adding the 42.2 repository may create some conflict risks.)

I then installed the QVD-SUSE 12SP1. It worked to the qvd demo server (but had an ssl handshake error to my local virtualbox server).

I then ran the command line binary and successfully connected both to the qvd demo server and to my local virtualbox server).

I am attaching the strace and ~/.nx from my desktop install. Later I will see if I can cure the defects and get my desktop to connect to either server.

Thank you again for your assistance.

On 04/03/2017 02:21 AM, Vadim Troshchinskiy wrote:

Hello,

We don't currently use SPICE for anything. It's one of the things we have considered for going forward, but the current tech is all X11 based.

Are you by chance running Wayland? If so, please try pure X11, just in case that makes some sort of difference (I have tried under Xwayland and it works for me, though)

Please try the following things:

  • Run xterm from the same window where you're starting the QVD client, just to make sure everything works correctly.
  • Delete ~/.nx
  • Run "strace -s 200 -f -tt -o client.trace ./qvdclient_x86_64" with the usual connection arguments after that.
  • Send us client.trace, as well as the contents of ~/.nx after running the client.

I'm also looking into seeing how easy it is to install the RPM packages on Tumbleweed. Our packages are extremely self-contained and have few external dependencies, so in general it's not very hard to get them to work on distributions that aren't officially supported.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/theqvd/theqvd/issues/57#issuecomment-291091064, or mute the thread https://github.com/notifications/unsubscribe-auth/AZWVG3vPpc7xigg29omK7-MqoWea2LbTks5rsLoAgaJpZM4MkO5i.

basd925 commented 7 years ago

Further follow-up:

  1. Same install updates solved the issues on my desktop machine that is also running the virtualbox qvd server.
  2. FYI, the opensuse build service search system did not find its own 42.2 version of libwx. When I looked for it directly (for my desktop machine), I was directed to a SUSE 12SP1 version. I found the link to the 42.2 version via a duckduckgo.com search that linked back to the direct install one-click link for the 42.2 version. (Odd.) The link is as follows: http://software.opensuse.org/package/libwx_gtk2u_adv-2_8-0-stl
  3. It would be nice to cure the defect in the rpm package. The error code is: "Unable to connect to 192.168.1.100:8443: SSL connect attempt failed because of handshake problems error:1409442E:SSL routines:ssl3_read_bytes:tlsv1 alert protocol version at /usr/lib/qvd/lib/perl5/site_perl/5.14.2/QVD/Client/Proxy.pm line 321 thread 1." I assume this is an incompatibility between suse 12SP1 and opensuse tumbleweed. (But the problem does not arise when running the downloadable binary.)
  4. I am attaching a screenshot of the linux qvd rpm login screen. You might want to identify what the boxes are, as it is not intuitive (but I knew what they were from the windows version). In the screenshot it's possible to see the word "connect" in the connect button, but on my laptop (which has a quad density screen and everything is tiny), I initially couldn't see the word "connect," it just looked like another fill-in field.

BTW, I am very impressed with my initial software response time test -- LibreOffice seems to load on the remote QVD desktop faster than it does when I run my local install of LibreOffice.

On 04/09/2017 12:32 PM, Barrington Daltrey wrote:

Good news, I was able to get the linux client to run on my laptop. The same software changes may work on my desktop, but I haven't tried it yet.

In this instance, I found the libwx_gtk2u_adv-2_8-0-stl dependency from openSUSE 42.2. It does not seem to be available to my Tumbleweed install (and adding the 42.2 repository may create some conflict risks.)

I then installed the QVD-SUSE 12SP1. It worked to the qvd demo server (but had an ssl handshake error to my local virtualbox server).

I then ran the command line binary and successfully connected both to the qvd demo server and to my local virtualbox server).

I am attaching the strace and ~/.nx from my desktop install. Later I will see if I can cure the defects and get my desktop to connect to either server.

Thank you again for your assistance.

On 04/03/2017 02:21 AM, Vadim Troshchinskiy wrote:

Hello,

We don't currently use SPICE for anything. It's one of the things we have considered for going forward, but the current tech is all X11 based.

Are you by chance running Wayland? If so, please try pure X11, just in case that makes some sort of difference (I have tried under Xwayland and it works for me, though)

Please try the following things:

  • Run xterm from the same window where you're starting the QVD client, just to make sure everything works correctly.
  • Delete ~/.nx
  • Run "strace -s 200 -f -tt -o client.trace ./qvdclient_x86_64" with the usual connection arguments after that.
  • Send us client.trace, as well as the contents of ~/.nx after running the client.

I'm also looking into seeing how easy it is to install the RPM packages on Tumbleweed. Our packages are extremely self-contained and have few external dependencies, so in general it's not very hard to get them to work on distributions that aren't officially supported.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/theqvd/theqvd/issues/57#issuecomment-291091064, or mute the thread https://github.com/notifications/unsubscribe-auth/AZWVG3vPpc7xigg29omK7-MqoWea2LbTks5rsLoAgaJpZM4MkO5i.