4
respostas

Acesso remoto

Na parte de acesso remoto via SSH com interface gráfica cheguei a conseguir acessar um programa complexo (ficou bem lento), mas não consegui acessar programas simples como o Chromium. Aparece esta mensagem de erro:

X11 connection rejected because of wrong authentication. [12285:12285:0501/174440.112437:ERROR:browser_main_loop.cc(1485)] Unable to open X display.

Alguém sabe o que pode ser?

admin@pop-os:~$ ssh -X thales@192.168.0.44
thales@192.168.0.44's password: 
Welcome to Ubuntu 20.04 LTS (GNU/Linux 5.4.0-28-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

 * Ubuntu 20.04 LTS is out, raising the bar on performance, security,
   and optimisation for Intel, AMD, Nvidia, ARM64 and Z15 as well as
   AWS, Azure and Google Cloud.

     https://ubuntu.com/blog/ubuntu-20-04-lts-arrives


0 updates can be installed immediately.
0 of these updates are security updates.

Last login: Fri May  1 17:40:46 2020 from 192.168.0.20
thales@ubuntu:~$ chromium
X11 connection rejected because of wrong authentication.
[11852:11852:0501/174149.755931:ERROR:browser_main_loop.cc(1485)] Unable to open X display.
thales@ubuntu:~$ ginkgocadx
calling InitWX(argc, argv);
17:41:57: Debug: User config file: /home/thales/.GinkgoUser
17:41:57: Debug: Global config file: /usr/bin/ginkgocadx.ini
17:41:57: Debug: Machine config file: /usr/bin/GinkgoMachine.ini
I: Starting Ginkgo CADx 3.8.8 64 bits
17:42:02: Debug: pTopLevel:isMaximized=1
17:42:02: Debug: Set windows size:(0, 0)

(ginkgocadx:11999): Gtk-CRITICAL **: 17:42:09.638: gtk_window_realize: assertion '!_gtk_widget_get_realized (widget)' failed
17:42:09: Debug: ClientToScreen cannot work when toplevel window is not shown
17:42:09: Debug: ClientToScreen cannot work when toplevel window is not shown
17:42:09: Debug: pTopLevel:isMaximized=0
17:42:09: Debug: Set windows size:(800, 728)
I: HL7 sender started
^C
thales@ubuntu:~$ exit
logout
Connection to 192.168.0.44 closed.
admin@pop-os:~$ ssh -X thales@192.168.0.44
thales@192.168.0.44's password: 
Welcome to Ubuntu 20.04 LTS (GNU/Linux 5.4.0-28-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

 * Ubuntu 20.04 LTS is out, raising the bar on performance, security,
   and optimisation for Intel, AMD, Nvidia, ARM64 and Z15 as well as
   AWS, Azure and Google Cloud.

     https://ubuntu.com/blog/ubuntu-20-04-lts-arrives


0 updates can be installed immediately.
0 of these updates are security updates.

Last login: Fri May  1 17:41:36 2020 from 192.168.0.20
thales@ubuntu:~$ chromium
X11 connection rejected because of wrong authentication.
[12285:12285:0501/174440.112437:ERROR:browser_main_loop.cc(1485)] Unable to open X display.
4 respostas

Thales, beleza ?

Tente o seguinte :

  • rm ~/.Xauth*
  • E depois reconecte.

Olá Thales, tudo bem? Você tentou a solução proposta pelo Igor? Qual o resultado? Fala pra gente!

Bom dia! Tudo bem, e vcs?

Nao deu certo, infelizmente =(

admin@pop-os:~$ ssh -X thales@192.168.0.44
thales@192.168.0.44's password: 
Welcome to Ubuntu 20.04 LTS (GNU/Linux 5.4.0-28-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

 * Ubuntu 20.04 LTS is out, raising the bar on performance, security,
   and optimisation for Intel, AMD, Nvidia, ARM64 and Z15 as well as
   AWS, Azure and Google Cloud.

     https://ubuntu.com/blog/ubuntu-20-04-lts-arrives


11 updates can be installed immediately.
11 of these updates are security updates.
To see these additional updates run: apt list --upgradable

Last login: Tue May  5 10:03:58 2020 from 192.168.0.20
/usr/bin/xauth:  file /home/thales/.Xauthority does not exist
thales@ubuntu:~$ chromium
X11 connection rejected because of wrong authentication.
[3730:3730:0505/100653.968123:ERROR:browser_main_loop.cc(1485)] Unable to open X display.
thales@ubuntu:~$ ls -la
total 184
drwxr-xr-x 24 thales thales  4096 mai  5 10:06 .
drwxr-xr-x  5 root   root    4096 mai  1 07:58 ..
-rw-rw-r--  1 thales thales     0 mai  1 09:00 .amiderc
drwxr-xr-x  7 thales thales  4096 mai  1 03:53 .atom
-rw-------  1 thales thales 25482 mai  5 10:06 .bash_history
-rw-r--r--  1 thales thales   220 abr 24 17:02 .bash_logout
-rw-r--r--  1 thales thales  3902 mai  1 08:22 .bashrc
drwxrwxr-x 18 thales thales  4096 mai  5 10:00 .cache
drwx------ 20 thales thales  4096 mai  1 18:49 .config
drwxr-xr-x  2 thales thales  4096 mai  1 18:47 Desktop
drwxr-xr-x  2 thales thales  4096 abr 24 17:50 Documents
drwxr-xr-x  2 thales thales  4096 mai  1 17:20 Downloads
-rw-rw-r--  1 thales thales   973 mai  1 11:15 .Ginkgo
drwxrwx---  3 thales thales  4096 mai  1 09:06 .ginkgocadx
-rw-------  1 thales thales     6 mai  1 17:41 Ginkgo-thales
-rw-rw-r--  1 thales thales 12713 mai  1 17:42 .GinkgoUser
drwx------  3 thales thales  4096 abr 24 17:50 .gnupg
drwxrwxr-x  5 thales thales  4096 mai  1 09:40 .invesalius
drwxrwxr-x  3 thales thales  4096 mai  1 18:48 .itksnap.org
-rw-------  1 thales thales    28 abr 30 21:16 .lesshst
drwx------  3 thales thales  4096 abr 24 17:50 .local
drwxr-xr-x  2 thales thales  4096 abr 24 17:50 Music
drwxr-xr-x  2 root   root    4096 abr 29 00:27 Network
drwxrwxr-x  2 thales thales  4096 mai  1 03:48 .parsec
drwxr-xr-x  2 thales thales  4096 mai  1 18:47 Pictures
drwx------  3 thales thales  4096 mai  1 03:52 .pki
-rw-r--r--  1 thales thales   807 abr 24 17:02 .profile
drwxr-xr-x  2 thales thales  4096 abr 24 17:50 Public
drwxrwxr-x  5 thales thales  4096 mai  1 14:25 Qt5.9.9
-rw-rw-r--  1 thales thales    66 abr 24 18:35 .selected_editor
drwxr-xr-x  8 thales thales  4096 mai  1 03:52 snap
drwx------  2 thales thales  4096 mai  1 17:23 .ssh
-rw-r--r--  1 thales thales     0 abr 24 18:28 .sudo_as_admin_successful
drwxr-xr-x  2 thales thales  4096 abr 24 17:51 Templates
drwxr-xr-x  2 thales thales  4096 abr 24 17:50 Videos
-rw-------  1 thales thales    52 mai  5 10:06 .Xauthority
-rw-------  1 thales thales  3858 mai  5 10:00 .xsession-errors
-rw-------  1 thales thales  3946 mai  1 16:53 .xsession-errors.old
thales@ubuntu:~$ chromium
X11 connection rejected because of wrong authentication.
[3921:3921:0505/100854.807515:ERROR:browser_main_loop.cc(1485)] Unable to open X display.
thales@ubuntu:~$ which chromium
/snap/bin/chromium

Thales, você poderia conectar na máquina via SSH e alterar o arquivo /etc/ssh/sshd_config e colocar a seguinte linha dentro desse arquivo:

X11Forwarding yes

E depois salvar o arquivo e desconectar e logo em seguida conectar e tentar abrir o chromium novamente.

E fala pra gente o resultado!

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software