0

Hoping someone can help. I have been searching the web put failed find a solution that has helped. I have recently updated my Ubuntu VM from version 20.04 to version 22.04. After the update was complete, I am no longer able to use winxserver to open a browser of the server on my local laptop screen. Luckly, I have a VMWare snapshot and can easily jump between the 2 version of the server. Ubuntu 20.04 works using the below steps, but 22.04 will not.

I have followed some hints found online:

/etc/ssh/sshd_config -> X11Forwarding yes
echo $DISPLAY -> localhost:11.0
cat /etc/hosts -> 127.0.0.1 localhost
                  127.0.1.1 server_name

I have tried deleting my .Xauthority file in the home directory of the user I am ssh'ing as, and letting it recreate at next log, but error persists. confirmed x11-apps is at latest version

sudo apt install x11-apps
x11-apps is already the newest version (7.7+8build2).

Steps taken to reproduce:

  • On Windows 11 laptop installed cygwin with Xserver

  • Open cygwin, at the prompt start the Xserver with command startxwin -- -listen tcp

  • Open a 2nd window in cygwin

  • On the 2nd terminal screen set the display variable -> export DISPLAY=11.0

  • Attempt to ssh -> ssh -Y -C user@IP firefox

  • Get prompt for password. After entering my password get error:

    Could not find ':' in DISPLAY: 11.0
    Error: Can't open display: localhost:13.0
    
    
  • I then change my cygwin display to be 13.0 by using command '$ export DISPLAY=13.0' then get error.

    Warning: No xauth data; using fake authentication data for X11 forwarding. Could not find ':' in DISPLAY: 13.0 Error: Can't open display: localhost:14.0

  • For interest if I just use PuTTy and ssh to the server as the same user. Attempt to open firefox in the background from the command prompt, using command firefox & I get error:

server_name:~$ MoTTY X11 proxy: Unsupported authorisation protocol Error: cannot open display: localhost:11.0

Any ideas on how to fix this?

Hi Jos I gave your suggestion a try still getting error. When starting the Xserver in cygwin I see it exports the display as 0:0 -> winClipboardThreadProc - DISPLAY=:0.0. I have exported my display like you suggested: $ export DISPLAY=:0 Make ssh connection $ ssh -Y -C user@IP user@IP's password: Make connection to Ubuntu Server Attempt to start firefox kw@kpmg-apicup:~$ firefox & [1] 21635 user@server_name:~$ X11 connection rejected because of wrong authentication. Error: cannot open display: localhost:12.0

I seem to have found a solution by continuing to search on google. Incase anyone else gets this issue in the future here is what I did.

  1. Open cygwin session on windows 11 laptop
  2. From there start the xserver running command #startxwin -- -listen tcp
  3. check what display cygwin exports, in my case it was 0:0
  4. Open a new window on the cygwin and export Display #export DISPLAY=0.0
  5. On a ssh connection to the Ubuntu VM I then typed the below command to start firefox, should be done as the user you want to connect as #XAUTHORITY=$HOME/.Xauthority /snap/bin/firefox (found this on google)
  6. A couple of seconds later my firefox browser from the VM appears on my laptop screen.
1
  • Comments are designed for US to ask YOU questions about your Question. You should Edit your question to add information. By updating your Question, and using the formatting buttons, you make all the information available to new readers. People shouldn't have to read a long series of comments to get the whole story. AskUbuntu is a Question and Answer site, not a conversation site. If you have an update, edit your Question. If you have a new question, see How to Ask.
    – waltinator
    Oct 6, 2023 at 19:14

1 Answer 1

0

I seem to have found a solution by continuing to search on google. Incase anyone else gets this issue in the future here is what I did.

  1. Open cygwin session on windows 11 laptop
  2. From there start the xserver running command # startxwin -- -listen tcp
  3. check what display cygwin exports, in my case it was 0:0
  4. Open a new window on the cygwin and export Display # export DISPLAY=0.0
  5. On a ssh connection to the Ubuntu VM I then typed the below command to start firefox, should be done as the user you want to connect as # XAUTHORITY=$HOME/.Xauthority /snap/bin/firefox (found this on google)
  6. A couple of seconds later my firefox browser from the VM appears on my laptop screen.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .