# export DISPLAY and SSH -X (neither work)

## kiss-o-matic

Can't figure this out.  I have a new install, and everything seems to be working fine except for this.

I do xhost +, and then try to do export DISPLAY=mynode:0.0 from another machine, but it always says "can't open display".

I also try SSH -X to forward xpackets, but the same error is returned.  I have uncommented the "X11 Forwarding yes" line in the ssh_config and sshd_config (and restarted).  Still no love.

Any suggestions?

----------

## subrahmanyan

Maybe you need to modify the default server arguments in /usr/X11R6/bin/startx.

Try to replace the following line:

```

defaultserverargs="-nolisten tcp"

```

by this:

```

defaultserverargs=""

```

Exporting the display should work now.

----------

## kiss-o-matic

Yep - that worked, thanks!

Now to figure out why SSH -X doesn't work.

----------

## fleed

For ssh -X check your /etc/ssh/ssh_config on the client and /etc/ssh/sshd_config on the server for ForwardX11 yes and X11Forwarding yes respectively.

----------

## kiss-o-matic

yes, as per before, I set that in both config files, and it still doesn't work.

EDIT:  I re-emerged openssh.  Now, I get:

 *Quote:*   

> 
> 
> Xlib: extension "GLX" missing on dipslay "localhost:11.0"
> 
> X Error: BadAtom (invalid Atom parameter) 5
> ...

 

Yucky

----------

## jdgill0

You might try the following ... I have had to use it on occasion for running certain opengl base programs.

```
ssh -Y ... 
```

----------

## anshul

 *subrahmanyan wrote:*   

> Maybe you need to modify the default server arguments in /usr/X11R6/bin/startx.
> 
> Try to replace the following line:
> 
> ```
> ...

 

i am having the same problem and after trying this as well i am not being able to export display.

could anyone tell me the solution.

regards

Anshul

----------

## kiss-o-matic

do 

 *Quote:*   

> ps -ef |grep x

 

and see if you see the "nolisten tcp" argument in there.  I just built a new machine, and see this.

 *Quote:*   

> cmtd      6284  6272  0 13:03 tty1     00:00:00 xinit /home/cmtd/.xinitrc -- -nolisten tcp -br -deferglyphs 16
> 
> 

 

You need to figure out how X is starting, and make sure that that argument is not there.  I asked the specific question (how to change the arguments if starting from xdm/kdm) and it was answered... search for posts I've made, and you should find it, it wasn't long ago.

EDIT: 

Here

https://forums.gentoo.org/viewtopic.php?t=237410&highlight=

----------

## anshul

 *kiss-o-matic wrote:*   

> do 
> 
>  *Quote:*   ps -ef |grep x 
> 
> and see if you see the "nolisten tcp" argument in there.  I just built a new machine, and see this.
> ...

 

i checked at this link and made changes my file. and now its working... :Smile: 

thanks

anshul

----------

