-1

I have Linux on Raspi I have set up a while ago, and have been using it via ssh with X server. Lately, it became clear that Raspi cannot handle the apps I am developing and I've switched to WSL on a secondary laptop.

Current use case: Using Putty and X-serv on my main machine (WIN7), SSH into another laptop (WIN10) on the same network with Linux installed on WSL.

I use two IDEs (Anjuta and Codeblocks) to develop a GUI app.

I've added yesterday a new non-root user to WSL, tried to make X-serv work for the new user and messed around with xauth and ./Xauthority file. Gave up in frustration and successfully managed to run my IDEs and app as the root user.

Today, root again, the following happened:

  • First try:

    1. start Anjuta: runs in X-window
    2. start Codeblocks: "Putty X11 proxy: Authorisation not recognised" error
    3. close all windows
  • Second try:

    1. start Anjuta: runs ok
    2. run code in Anjuta: "Putty X11 proxy: Authorisation not recognised" error
    3. close all
  • Third try:

    1. start Anjuta: runs ok
    2. run code in Anjuta: the app is executed in a new X-window
    3. start Codeblocks: "Putty X11 proxy: Authorisation not recognised" error
    4. close all
  • Forth try:

    1. start Anjuta: runs ok
    2. start Codeblocks: runs ok
    3. run code in Anjuta: "Putty X11 proxy: Authorisation not recognised" error

Question: Why is X-server intermittently refusing the connection and how can I fix it?

Many thanks!

Dani Dobre
  • 29
  • 7

1 Answers1

0

Here's the routine that solves the problem:

  1. In the first opened terminal, run xauth list and copy the output

localhost/unix:10 MIT-MAGIC-COOKIE-1 e17b************************7c8a

  1. In any new opened terminal, run xauth add with the cookie as argument: xauth add localhost/unix:10 MIT-MAGIC-COOKIE-1 e17b************************7c8a
Dani Dobre
  • 29
  • 7