Thinking Out Loud

April 15, 2023

Configure X11 For Vagrant Box

Filed under: Vagrant,VirtualBox,Windows,X11 — mdinh @ 9:29 pm

I had blogged about this many years and ago and for some reason it’s not working.

https://blog.pythian.com/how-to-configure-x11-for-vagrant-box

Luckily, I was able to find a simple version https://www.centlinux.com/2019/01/configure-x11-forwarding-putty-xming-windows.html

I know. Real DBA use silent install. However, Oracle can be FUBAR at times.

Here is an example.

Advertisement

August 21, 2015

X-Window Fun

Filed under: X11 — mdinh @ 8:43 pm

When ssh -X to another host, I am able to use X-Windows.

[dinh@ca01ts~]$ ssh -X dinh@192.168.1.137
dinh@192.168.1.137's password:
Last login: Fri Aug 21 11:55:47 2015 from 10.237.102.38
/usr/bin/xauth: creating new authority file /home/dinh/.Xauthority
[dinh@arrow ~]$ xclock
Warning: Missing charsets in String to FontSet conversion
^C

However, sudo to another user and X-Windows breaks.

[dinh@arrow ~]$ sudo su - oracle
[sudo] password for dinh:
[oracle@arrow ~]$ xclock
X11 connection rejected because of wrong authentication.
X connection to localhost:10.0 broken (explicit kill or server shutdown).
[oracle@arrow ~]$

Work Around:

Just list the xauth.

[dinh@arrow ~]$ xauth list
arrow/unix:10 MIT-MAGIC-COOKIE-1 8dfb6c468329ff0d5f5d962b094a82d3

Magic is here.

[dinh@arrow ~]$ xauth list | grep unix`echo $DISPLAY | cut -c10-12` > /tmp/xauth
[dinh@arrow ~]$ sudo su - oracle
[sudo] password for dinh:
[oracle@arrow ~]$ xauth add `cat /tmp/xauth`
xauth: creating new authority file /home/oracle/.Xauthority
[oracle@arrow ~]$ xclock
Warning: Missing charsets in String to FontSet conversion
^C

BINGO!

Blog at WordPress.com.