Are you able to open ANY other X programs at all? What if you try xclock? The Command line defaults its X display output to expect "displays" created on the machine you are remoted into. The error leads you to provide the forwarding info so it can send the display window to your local X11 system. If you don't already have X11 running in your local system, then skip to the end of this post for an alternative.
I think forwarding is not done automatically for you with just the X11Forwarding in /etc/sshd_config from discussion in your first answer. So follow the guide here to use the display command-line option (must be done every time):
emacs sample -display your-actual-hostname-or-ip:0.0
If all that fails, use the text-only workaround while you're remoted in: emacs -nw sample
If you're using this, keep in mind that nothing, even the menus can be clickable. You may need to do [F8] and then follow the text-based menu guidance to get at the menu options. There may be a .emacs workaround for that.
Knowing emacs, you can tackle this the other way around if you have downloaded a local version of emacs (I suggest xemacs) --Tramp mode for emacs will INITIATE ssh sessions to your remote host and edit files seamlessly. There's open Stack Exchange questions like one about such slave ssh shells. Here is one with a few more details about eshell and tramp mode. Having options is great for the right moment.
Also, is sshd on the server configured to allow X forwarding? Check
X11Forwarding
in/etc/sshd_config
; it defaults tono
. – legoscia – 2012-08-10T09:42:57.290So if I ssh into server b, and it does not allow X11 forwarding according to its /etc/sshd_config, can I just update it to yes? – Kevin Meredith – 2012-08-10T14:59:40.567
Yes, assuming you have root privileges on the server. – Sean Goller – 2012-08-10T16:27:11.973