# SSH X11 Forwarding Problem, It doesn't even try

## Nolegs99

I'm having some problems.  I recently did an emerge -a world, and updated my servers.  Before i updated all of the servers, i updated one, then tested to make sure that the web server and most important applications were working.  I finished the upgrades, and set sshd_config to yes for X11Forwarding.

Now when logging in, and i attempt to run a simple program like xemacs, i don't get the display on my computer anymore, it doesn't even give me an error that it couldn't connect to the address or anything.  It just displays xemacs in the ssh window.  I have also SSH'd to the machine from a different computer where i can do verbose login, and it shows the correct message of: "debug 1: Requesting X11 forwarding with authentication spoofing." Yet it doesn't give an error message or anything.  I even tried the 

```
export DISPLAY=ip.address:0.0
```

  and also made sure the variable was set correctly by 

```
echo $DISPLAY
```

 Yet ssh never even attempts to send the display to my client machine.

Please help.  Thanks.

----------

## barophobia

try -X option

----------

## Nolegs99

I tried that from my Mac in my office, I tried 

```
ssh -v -X user@server.edu
```

 and i got the correct debug message as i listed above, yet xemacs would still only show up inside the ssh window, and not in a separate window on my client machine.

----------

## Nolegs99

Correction to the problem, the machine somehow only doesn't forward emacs and xemacs windows.  Every other x app that i've tried works; xbiff, xclock, xterm.  Does anyone know why emacs and xemacs won't forward the window?

Thanks.

----------

## barophobia

try the -d <display name> option in emacs.

man emacs to see what it needs.

----------

## Nolegs99

No go on the -d.  Just loads the emacs app inside the ssh window still.  Is there an error log for emacs somewhere that may shed light on the issue?

----------

## Nolegs99

Apparently from what i have learned, emacs or portage has for some reason changed the way emacs and xemacs install and have a default -X set.  So, when i emerge emacs with a USE="X" it works and i am able to view the window.  This is quite strange that they would just suddenly change that flag for just that program.

----------

## eccerr0r

I think it has something to do with the default make profile so people could choose whether to build with X or not.  Recently I suddenly got wine to build without the X use flag, which made wine fairly useless...

----------

## jcornez

You said yourself that your old config was 3 years old.  So it doesn't quite seem fair to claim things have "suddenly" changed...  Also, it may not be that the old way was to set "X" and now set "-X".  It might be that the old emacs ebuild (from 3 years ago) didn't have the X use flag as an option at all - meaning that X support was always built.  Now the system is more flexible and lets the user choose whether to include X or not.  The default is no, which actually seems quite reasonable.

----------

## Nolegs99

It's not as if i've never done an emerge world and updated emacs within those 3 years. You totally misunderstand. If i hadn't done an update in 3 years, i would expect almost everything to break. My last update was only a few month ago, it wasn't that big of a change between versions. I regularly emerge world in order to keep the apps and web server up to date. I'm not an incompetent server administrator.

My previous comment about setting up the machines 3 years ago was to show that during the initial set-up I didn't need to set the X flag, and i have proof about that. And on top of that, from my earlier post, i had stated that i've had these machines running fine for 3 years, which would mean that i have had them running securely for 3 years. Why would i run a linux server without making sure it was secure. And when you make sure it's secure, usually that requires to have the most up to date application packages with all the security fixes installed. Which should mean that i have been doing regular world builds in order to easily update all relevant packages. My servers were NOT running on 3 year old software, that is just ridiculous.

Since i have been doing regular world builds, I assumed someone might know if portage or emacs have changed the default flags for emacs recently to not include X. Which for people that regularly use emacs, would know that without the X flag it makes the program almost useless. So, if anyone could tell me why they would change the default flags, or who changed them, or something so that I can hear a logical reason, or so that i can see if this can be changed in the next release of portage or emacs that would be extremely appreciated. Thanks.

----------

## Hu

I skimmed the ChangeLog all the way back to mid-2006 without seeing any obvious indication of making X support configurable.  If you are really curious, you could pull the CVS logs for the emacs ebuilds to find when the change was made.

----------

