0

I have a Debian stretch x64 server running in a virtual KVM machine. I have installed Cygwin on Windows 7 Pro x64 and would like to run X applications on the Debian machine, using the Cygwin X server at the Windows machine.

This is my server-side SSH daemon configuration (Debian side):

AcceptEnv LANG LC_*
AllowAgentForwarding no
AllowTcpForwarding no
AllowStreamLocalForwarding no
ChallengeResponseAuthentication no
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes256-ctr
Compression no
DebianBanner no
HostKeyAlgorithms ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-rsa,ssh-ed25519
KbdInteractiveAuthentication no
KexAlgorithms curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256
ListenAddress 192.168.20.12:22
LoginGraceTime 20
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com
PasswordAuthentication no
PermitUserRC no
Protocol 2
PubkeyAcceptedKeyTypes ssh-rsa,ssh-ed25519
RekeyLimit 100M 20m
Subsystem sftp /usr/lib/openssh/sftp-server
TCPKeepAlive no
X11Forwarding yes
X11UseLocalhost yes

This is the batch file I use to start konsole on the server (Windows side):

set CYG=c:\cygwin64

%CYG%\bin\run.exe XWin -multiwindow -resize -clipboard -listen inet :1
SET DISPLAY=:1
SET LANG=en_US.UTF-8
%CYG%\bin\ssh.exe -f -Y root@192.168.20.12 "LANG=en_US.UTF-8 konsole"
"C:\Program Files (x86)\cmdow\cmdow.exe" X-Morn-multiwindow /HID
exit

In principle, this works: When executing this batch file, konsole starts in a window on my Windows desktop. But there are two error messages in the cmd window:

libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast

As a last resort, I could live with those errors because konsole (and the other applications I need) obviously actually work, but I really would prefer knowing what is going on there (i.e. what causes the error messages).

From reading the other questions / threads / blog entries I have mentioned above, I got the impression that the problem might be related to missing nvidia or mesa components. So I installed some of these components on the Debian server doing (as root):

aptitude install libgl1-mesa-glx libgl1-glvnd-nvidia-glx

Indeed, when I then ran the batch file mentioned above, the libGL errors were not thrown any more. But unfortunately, now the konsole window did not appear on the Windows desktop any more.

After uninstalling the two packages again, the konsole window again appeared when I ran my batch file - of course, this is true for the libGL error messages as well.

I would like to understand both of the phenomena. So what could be the cause of the libGL error messages (given the fact that missing mesa or nvidia drivers or libraries should not play a role when running X applications via SSH), and why does installing the two packages mentioned above keep the konsole windows from appearing?

  • In windows you are dealing with the windows HAL and not with the graphic card. Furthermore, often X servers in windows give you a outdated implementation of the X primitives. Using other shareware or even sometimes commercial implementations will often leave you no better. We are however talking about windows limitations and superuser se would be a better fit for this question. – Rui F Ribeiro Dec 8 '18 at 9:50
  • I am grateful for your comment, but to be honest, I doubt your statement. As I have described, changing the configuration at the Linux side definitely makes the error messages go away. I am pretty sure that those messages are not caused by the X server in Windows or any other Windows component. It seems that X applications started at the server side are searching for some libraries although those libraries are not needed when the applications are started via SSH. – Binarus Dec 8 '18 at 10:15
  • The fact they use the libraries does not invalidate what I am saying. You are dealing with several questions, however without using Linux natively or in a vm, the lack of libraries is the least of your worries – Rui F Ribeiro Dec 8 '18 at 10:23
  • TLDR I would not even try to go via remote X... see NX/NoMachine for having a fulll Linux desktop on your side. Have tried to go down that road in the past, and X in Windows does not deliver. See also this unix.stackexchange.com/questions/462817/… – Rui F Ribeiro Dec 8 '18 at 10:34
  • 1
    I have found out by accident how to solve the problem - see my own answer. – Binarus Dec 13 '18 at 7:24
0

The problem went away after installing the following packages (apt has installed them together):

  • dbus-x11
  • libglib2.0-tests
  • libdbus-glib-1-2
  • libgee-0.8-2
  • libmoonshot1

I can't tell for sure which of these packages (or which combination thereof) made the problem go away. I do not plan to do further examinations because this machine has become a production server in the meantime.

However, I think I can give an educated guess:

  • libgee-0.8-2 and libmoonshot1 do not have anything to do directly with the low-level X11 or UI parts, so I am quite sure that they are out of the game.
  • libglib2.0-tests (as the name implies) is just a test suite for GLib, so I am quite sure that this is out of the game as well.
  • I really can't tell which of the remaining two candidates might have solved the problem. I have the feeling that the problem was more related to GLib than to X11, so my favorite is libdbus-glib-1-2. But this is really just a feeling ...

It would be nice if somebody in the same situation (i.e. setting up a Debian stretch server and running X applications via SSH) could confirm this. But even when not, I think this answer is useful because exactly this question has been asked at other places dozens of times without a solution having been given (to my best knowledge).

  • lidbdbus-glib seems an unlikely candidate, though in the sea of dependencies who knows. Many apps are happier if dbus (and dependencies) are installed though. – Rui F Ribeiro Dec 13 '18 at 8:23
  • It's unlikely any of those packages are directly responsible, though there may have been an indirect effect. In any case, note that forwarded X won't use the hardware OpenGL acceleration, you are using a software renderer (compare swrast in the error message), so installing NVidia libraries wasn't helping, either. – dirkt Feb 27 at 11:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.