I am trying to connect to a redhat server from a macos client, using ssh and openvpn. Command line commands work fine (eg vim), but displays dont get displayed, eg while running firefox or gvim, and I get the error:
No protocol specified
E233: cannot open display
I did "xhost +" and "export XAUTHORITY=~/.Xauthority" on the macos client, and "export DISPLAY=:0.0" on the redhat server, but that did not solve the problem.
However, it is working when the client is ubuntu, so I guess the problem is on the macos client side.
BTW, when I run ssh after I did "xhost +", I get the warning:
Warning: untrusted X11 forwarding setup failed: xauth key data not generated
Any suggestions?
Answer is given here: instead of doing "ssh -X", do "ssh -Y". This is the short solution (which worked for me on Catalina + XQuartz), other longer solutions are also provided at this link.
Related
when i run the command on administrator settings on my windows 11
wsl --install
it shows me the following error
a connection with the server could not be established
I searched youtube too for the fixes but none worked
Hi I was having same error. I am Indian using Jio Fiber. I connected to VPN to solve the error. It seems that Jio prevents connection to certain url such as https://raw.githubusercontent.com/microsoft/WSL/master/distributions/DistributionInfo.json which are needed for wsl linux installation. You can check by trying to open above link in chrome and running network diagnostics. Basically the above url gets called at the end when you do wsl --install.
I tried to install it with VPN and it works. Using VPN may work for you.
I can't open the GUI of Stata running on local macOS machine from remote Ubuntu server.
I have installed stata-se on my local machine, I can open X11 apps like xclock and xeyes. I'm using the following command to connect to the server:
ssh -X username#servername -p XXXX
Is there any to resolve this issue?
Since the distinction is a little unclear in the question:
According to the documentation the command to launch the Stata SE GUI is:
xstata-se
while
stata-se
launches the console version.
Since these are not working you can confirm the syntax diagram with:
stata -h
which will tell you the correct syntax, if Stata is actually installed.
If you are seeing something like:
$ command not found: Stata
then you may, similar to this, need to make sure that the path to Stata is properly set in your path file. Exactly how you do this depends on your terminal and operating system.
I am trying to run any GUI container I can on MacOS. With every container I try (firefox, chrome, tor, spotify, etc) I always get the error Error: cannot open display. And it's not specific to the docker run command where I pass the environment flag with my $DISPLAY. When I try to run xhost + I get the same error.
I have a fresh XQuartz installation. It is up and running. I have turned on "allow connections from network" under security. I've tried building my own images and pulling jessie frazelle's images. I do not suspect it is a docker issue or the Dockerfiles. It is something on the host, my laptop. I can't seem to figure out what it is.
MacOS Sierra 10.12.5
Docker 17.12.0 Stable
XQuartz 2.7.11 (xorg-server 1.18.4)
My local's $DISPLAY is set to :0.0
So I finally got this to work. And it seems it was pretty simple. I am not certain how this actually fixes the issue, but now the containers work.
How I fixed it was opening up XQuartz and then opening up the "Terminal" app from the "Applications" menu. Then running the command export DISPLAY=192.168.1.X:0, then xhost +. It outputted something like this "access control disabled, clients can connect from any host". After that I was able to run my docker run commands to launch the desired GUI containers.
I am still uncertain how this works and not running them from my laptops Terminal app, but it worked. It must be something I have set in my local env. Hopefully this helps someone else out who may be running into the same issues.
Based on #Byron's answer, I've found out that I could get it to work by running these 2 commands in the normal terminal:
export DISPLAY=:0
/opt/X11/bin/xhost +
I have this error while trying to launch the command ./runInstaller
Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
From Oracle help docs:
sudo yum install xorg-x11-utils -y
worked for me.
If you are executing this via Putty, then I suggest you have a look at Xming, this allows you to have a Putty remote ssh session, and forward your display to you Windows machine...
If you're executing this from a Linux server without a gui, you will either need to connect remotely with a pc with a GUI installed (Gnome, KDE, etc) or you'll need to install the Gui directly on the server.
Check if it's not already installed by using the command on the terminal
$ startx
Error is reproducible thus:
$ export DISPLAY=:0.0
$ ./runInstaller
ERROR: Unable to verify the graphical display setup. This application requires X display. Make sure that xdpyinfo exist under PATH variable.
Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
OP's X server was Hummingbird Exceed. Xming will work as well.
The actual solution depends on:
whether you are su'd to oracle from a different login account.
whether you are using X11 forwarding.
the actual port used by X11 forwarding, which could be 6010 or a different port.
If you logged in and then su'd to oracle, then copy ~/.Xauthority to the oracle account.
If you are using X11 forwarding and the forwarding port is 6010, then DISPLAY=localhost:10.0 is correct.
If you are not using X11 forwarding, and if port 6000 on your PC is reachable from the oracle server, then export DISPLAY=your.pc.ip.address:0.0 is correct.
Install xterm and use xterm to test X windows.
Be sure to install xdpyinfo.
For more details, please refer to my article X windows for Oracle DBAs
I am on a Windows7 machine and I'm trying to get firefox to open on the centOS machine, but be displayed on my current screen.
When typing firefox in terminal, I am getting the following error:
Error: cannot open display: localhost:0.0
To setup the display I used the command
$ export DISPLAY=localhost:0.0
Some site suggested using the following, but it didn't work either:
$ export DISPLAY=:0.0
I am using PuTTY and I have the Enable X11 forwarding check box checked and XMing is running on Windows. Additionally, the sshd_config on centOS file seems to be setup properly as well:
$ cat /etc/ssh/sshd_config |grep -i x11
#X11Forwarding no
X11Forwarding yes
#X11DisplayOffset 10
X11UseLocalhost yes
I've looked over numerous pages and searched StackOverflow as well, but none have managed to help me in any way.
Thank you in advance.
So, it turns out that X11 wasn't actually installed on the centOS. There didn't seem to be any indication anywhere of it not being installed. I did the following command and now firefox opens:
yum groupinstall 'X Window System'
Hope this answer will help others that are confused :)
I faced this issue once and was able to resolve it by fixing of my /etc/hosts. It just was unable to resolve localhost name... Details are here: http://itvictories.com/node/6
In fact, there is 99% that error related to /etc/hosts file
X server just unable to resolve localhost and all consequent actions just fails.
Please be sure that you have a record like
127.0.0.1 localhost
in your /etc/hosts file.
I had this error message:
Error: Can't open display: localhost:13.0
This fixed it for me:
export DISPLAY="localhost:10.0"
You can use this too:
export DISPLAY="127.0.0.1:10.0"
before start make sure of installation:
yum install -y xorg-x11-server-Xorg xorg-x11-xauth xorg-x11-apps
start xming or cygwin
make connection with X11 forwarding (in putty don't forget to set localhost:0.0 for X display location)
edit sshd.cong and restart
cat /etc/ssh/sshd_config | grep X
X11Forwarding yes
X11DisplayOffset 10
AddressFamily inet
Without the X11 forwarding, you are subjected to the X11 SECURITY and then you must:
authorize the remote server to make a connection with the local X Server using a method (for instance, the xhost command)
set the display environment variable to redirect the output to the X server of your local computer.
In this example:
192.168.2.223 is the IP of the server
192.168.2.2 is the IP of the local computer where the x server is installed. localhost can also be used.
blablaco#blablaco01 ~
$ xhost 192.168.2.223
192.168.2.223 being added to access control list
blablaco#blablaco01 ~
$ ssh -l root 192.168.2.223
root#192.168.2.223s password:
Last login: Sat May 22 18:59:04 2010 from etcetc
[root#oel5u5 ~]# export DISPLAY=192.168.2.2:0.0
[root#oel5u5 ~]# echo $DISPLAY
192.168.2.2:0.0
[root#oel5u5 ~]# xclock&
Then the xclock application must launch.
Check it on putty or mobaxterm and don't check in remote desktop Manager software.
Be careful for user that sudo in.
In my case the issue was caused due to mismatch in .Xauthority file. Which initially showed up with "Invalid MIT-MAGIC-COOKIE-1" error and then "Error: cannot open display: :0.0" afterwards
Regenerating the .Xauthorityfile from the user under which I am running the vncserver and resetting the password with a restart of the vnc service and dbus service fixed the issue for me.