# X11 Forwarding.

## Xar

Hello people. First of all, I apologise for my poor english. I'm from spain and understand quite well english but I have problems writing it. Second, I always try to only use google to help me out, but this time it wasn't effective. After that, i'm gonna explain my problem in my capacities. 

I'm considerating to remove mi debian server and convert it in a gentoo server. For that reason, I'm practising on another computer for testing purposes. All seems to work perfectly except one thing, the X server. I can connect remotely to the computer with the gentoo installed but I can't execute X aplications, in exemple: Firefox.

I don't know if it's because of the flags that i used compiling or the configuration of X server, but I don't know what to do now. I tried two gentoo installations in different computers and the result is the same. Now I try simply to connect to localhost by ssh.

These are my flags:

 *Quote:*   

> 
> 
> EquipajeP root # emerge xorg-x11 -vp
> 
> These are the packages that I would merge, in order:
> ...

 

When I try:

 *Quote:*   

> 
> 
> bash-2.05b$ ssh -X localhost
> 
> 

 

then

 *Quote:*   

> 
> 
> xar@EquipajeP xar $ firefox
> 
> xdpyinfo: unable to open display "".
> ...

 

This is my /etc/ssh/ssh_config:

 *Quote:*   

> 
> 
> Host *
> 
> # ForwardAgent no
> ...

 

I tried the following commands once connected, too:

 *Quote:*   

> 
> 
> bash-2.05b$ export DISPLAY=localhost:0.0
> 
> bash-2.05b$ xhost +
> ...

 

Any ideas?

Thanks in advance.

----------

## Rene-dev

I think you want to connect to your server and run firefox.

you can do this, firefox will run on the remote mashine, but the gui is forwardet to the client

put

```
X11Forwarding yes
```

in you sshd config.

I think you dont need x on the remote side. :Question: 

connect with

```

ssh -X user@host

```

to enable X forwarding

of course you need x on the local mashine, and you must run the ssh command from an xterm.

http://www.gentoo.org/doc/en/xorg-config.xml

rene

----------

## bec

Hello Xar, here you can solve your problem:

https://forums.gentoo.org/viewtopic-t-307111-highlight-x11+forwarding+ssh.html

----------

## Xar

 *bec wrote:*   

> Hello Xar, here you can solve your problem:
> 
> https://forums.gentoo.org/viewtopic-t-307111-highlight-x11+forwarding+ssh.html

 

Yeah!! It worked!! Thank you both!! It was that I was configuring the wrong file. I was configuring ssh_config instead of sshd_config.

And I promise that i tried the Advanced Search many times. I don't know why I haven't found the post.

Well, again, Thank you!  :Smile: 

----------

## Goeland86

hey guys, I tried everything mentioned above, but it still doesn't work.

Firefox or thunderbird don't work...

```
X Error of failed request:  BadAtom (invalid Atom parameter)

  Major opcode of failed request:  20 (X_GetProperty)

  Atom id in failed request:  0x17e

  Serial number of failed request:  925

  Current serial number in output stream:  925

Unable to connect to X server

The program 'firefox-bin' received an X Window System error.

This probably reflects a bug in the program.

The error was 'BadAtom (invalid Atom parameter)'.

  (Details: serial 930 error_code 5 request_code 20 minor_code 0)

  (Note to programmers: normally, X errors are reported asynchronously;

   that is, you will receive the error a while after causing it.

   To debug your program, run it with the --sync command line

   option to change this behavior. You can then get a meaningful

   backtrace from your debugger if you break on the gdk_x_error() function.)

firefox-bin exited with non-zero status (1)

```

Do you know if that's a bug, or what?

EDIT: I take that back... Found a forum that explained it all... Here: https://forums.gentoo.org/viewtopic-t-181178-highlight-gdk+forwarding.html

Sorry to bug you guys, I should've searched more thoroughly.

----------

