Discussion:
FreeBSD 10.1 - Xt error: Can´t open display :0
Luciano Rottava da Silva
2014-11-24 11:53:14 UTC
Permalink
Hello,

I am facing a problem with X in FreeBSD 10.1. Don´t seem to be complicated
but can´t figure out what´s wrong.

I´ve managed to install the binary for olvwm, compiled inside a jail
running 10.1 i386. Host is running 10.1 amd64.

X is started from 'startx', and .xinitrc has a simply call to olvwm.

# cat .xinitrc
olvwm

X is launched successfully but, I unable to open a xterm terminal or any
other client.

Switching to the console (ctrl + alt + f1) I see a message which says "Xt
error: Can´t open display :0"

Then I logged in to console 2 (ctrl + alt + f2) and run a "xterm -display
:0". Coming back o X session (ctrl + alt + f*), my xterm was there, I was
able to launch all necessary programs.

Important to hightlight this is done in the localhost, no X11 forwarding,
nothing, console only since this is my desktop machine.

Advise are most welcome.

Thanks,
Luciano.
Luciano Rottava da Silva
2014-11-25 00:48:20 UTC
Permalink
Hello,

Anyone?

I am still unable to launch any program from X running olvwm. Message in
the console (vt0 for instance) is always the same: "xterm: Xt error: Can`t
open display .0"

But if I switch to vt1 and run: "xterm -display localhost:0", then a xterm
window pop up in the X/olvwm, allowing me to launch everything else from
this shell. But of course, would like to be able to do it using the menu I
am building in the "openwin-menu".

#cat /etc/hosts
...
127.0.0.1 localhost localhost.mydomain
127.0.0.1 desktop desktop.rottava.home
...

#echo $DISPLAY
localhost:0

What possibily could be wrong?

Regards,
Luciano.
Post by Luciano Rottava da Silva
Hello,
I am facing a problem with X in FreeBSD 10.1. Don´t seem to be complicated
but can´t figure out what´s wrong.
I´ve managed to install the binary for olvwm, compiled inside a jail
running 10.1 i386. Host is running 10.1 amd64.
X is started from 'startx', and .xinitrc has a simply call to olvwm.
# cat .xinitrc
olvwm
X is launched successfully but, I unable to open a xterm terminal or any
other client.
Switching to the console (ctrl + alt + f1) I see a message which says "Xt
error: Can´t open display :0"
Then I logged in to console 2 (ctrl + alt + f2) and run a "xterm -display
:0". Coming back o X session (ctrl + alt + f*), my xterm was there, I was
able to launch all necessary programs.
Important to hightlight this is done in the localhost, no X11 forwarding,
nothing, console only since this is my desktop machine.
Advise are most welcome.
Thanks,
Luciano.
Polytropon
2014-11-25 10:24:16 UTC
Permalink
Post by Luciano Rottava da Silva
#echo $DISPLAY
localhost:0
What possibily could be wrong?
Maybe try setting DISPLAY=":0.0" or ="localhost:0.0", or
not manually setting DISPLAY at all, because I think X
should do this. From xterm here:

% echo $DISPLAY
:0.0

That should be the default.
--
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
Charles Swiger
2014-11-26 16:05:27 UTC
Permalink
Hi, Luciano--
Post by Luciano Rottava da Silva
#cat /etc/hosts
...
127.0.0.1 localhost localhost.mydomain
127.0.0.1 desktop desktop.rottava.home
This part isn't right. You should have only one line per IP in /etc/hosts; try using this:

127.0.0.1 localhost localhost.mydomain desktop desktop.rottava.home

...instead.

Regards,
--
-Chuck
Luciano Rottava da Silva
2014-11-26 21:23:59 UTC
Permalink
Hello Charles,

Yes, I realized that after some time.

I've replaced the second 127* by the real IP address, 192.168.1.10, removed
$DISPLAY env var from my dot files and just fired olvwm from .xinitrc with
"-display :0.0" option.

Sorted. (-:

Thanks a lot,
Luciano.
Post by Charles Swiger
Hi, Luciano--
Post by Luciano Rottava da Silva
#cat /etc/hosts
...
127.0.0.1 localhost localhost.mydomain
127.0.0.1 desktop desktop.rottava.home
127.0.0.1 localhost localhost.mydomain desktop desktop.rottava.home
...instead.
Regards,
--
-Chuck
Loading...