[SOLVED] Help with X forwarding please

    • [SOLVED] Help with X forwarding please

      Hi everyone, hoping someone might be able to give me some advice please. I have been trawling help guides, forums and FAQs for days now and cannot resolve this issue.

      I now have my HP N40L setup and configured with OVM. Raid setup and everything running really smoothly. Very impressed with it. I have happily been working away using SSH to connect in and use the box remotely as I work, however I have stumbled on my next step. I have never played around much with X11 forwarding over SSH till now and I can't seem to get it to work in the same way that everyone else has.

      I basically have a handful of packages I have installed which have GUI frontends which I want to be able to access over SSH using X11 forwarding. I have installed Putty on the N40L and Xming on my Windows 7 PC. Both have been configured as per the guides I found online, all of which are pretty much identical and seem very simple. I can provide the exact config if needed, but I haven't deviated at all on the guides for this. I have enabled SSH on OVM.

      However, try as I might I have been unable to get anything through. I have a selection of error messages but I can't work how to resolve them and trawling online has either confused me further, not changed the situation at all or left me blankly staring at some slightly over-zealous "THOU SHALT ONLY USE COMMAND LINE!" responses to some others who have had similar questions.

      The message I get back everytime is "Can't open display". Running "echo $DISPLAY" returns no result whatsoever, just a blank line. Running "startx" results in an error as follows:

      Source Code

      1. (==) Log file: "/var/log/Xorg.0.log", Time: Mon Jan 28 22:52:54 2013
      2. (==) Using system config directory "/usr/share/X11/xorg.conf.d"
      3. (II) [KMS] Kernel modesetting enabled.
      4. (EE) open /dev/fb0: No such file or directory
      5. (EE) RADEON(0): No modes.
      6. (EE) Screen(s) found, but none have a usable configuration.
      7. Fatal server error:
      8. no screens found


      I installed packages xorg and xfce4 in an attempt to try and get this to work, though I have no idea if they were additionally needed or not. From what I can tell, it seems that, as I have it currently configured, Debian is not able to detect any X server display listening on my Windows 7 end so cannot forward the data anywhere. I don't know why not though, as everything seems to match how others have it on their guides, so I am not sure what I am missing.

      Having been about to post this and give up till someone could advise me, I stumbled across this post in the last few minutes: forums.openmediavault.org/view…225&p=860&hilit=xorg#p860. Following the steps this person posted for their Crashplan setup under "Set up X11 forwarding", I have actually managed to get it to work, so my SpiderOak GUI now displays through Xming on my Windows 7 PC. However, "Spideroak £" fails everytime and just hangs and I have to ctrl-C it. I only seem to be able to run one programme at a time currently.

      I'm still not satisfied with the result, as it seems like a clumsy fix in editing various files at both ends, where others seems to be able to use the tools as they are. Can anyone please assist and advise me as to what I might be doing wrong and how I can go about fixing it? I would really appreciate it, so that I can understand the problem and be able to correct it in the future. Thank you for any responses.
    • Re: Help with X forwarding please

      I have always had better luck with NoMachine's NX (link). It is over ssh as well but the bandwidth and response have always felt better. The windows client is very easy to install and works great. If you don't like non-open packages then there is freenx as well. I have it open xterm when logging in and run everything from there. Not much to install either. If you interested, I can give you more info.
      omv 4.1.19 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.15
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • Re: Help with X forwarding please

      Did you test the desktop you installed with keyboard and mouse attached? You should do this before you even try the x11 forwarding.
      1) Did you enable x11 forwarding in the sshd_config? You need to make sure the line in /etc/ssh/sshd_config where it says xll forwarding says "yes".

      2) You need to add this line at the end of the sshd_config: (FYI, you get display message cuz you need to specify IPv4. use inet6 for IPv6)

      AddressFamily inet

      3) restart ssh with:

      /etc/init.d/ssh restart

      4) You need to exit ssh and start new session before it will work.

      5) Then in Putty make sure you put checkmark at Connection/SSH/X11 in the enable X11 forwarding. I save separate configs in Putty
      for use with X11.

      PS- Easy way to do this is install Debian Squeeze w/ Gnome2. Then install OMV, link how to install on preinstalled system in the How/Tos. Then workout X11 Forwarding with above instructions. You don't have to guess if any, or what, packages are missing this way. Your XFCE install is lacking from what I see above. Gnome2 works great. I have XFCE, just to test, on a vm but I way prefer Gnome2. Gnome3 is a resource pig. Don't waste any time on it.
    • Re: Help with X forwarding please

      "tekkbebe" wrote:

      Did you test the desktop you installed with keyboard and mouse attached? You should do this before you even try the x11 forwarding.


      Yes, it works fine with keyboard and mouse and a display attached to it. I can also SSH in the command line fine, it is just the GUI forwarding which is failing.

      "tekkbebe" wrote:

      1) Did you enable x11 forwarding in the sshd_config? You need to make sure the line in /etc/ssh/sshd_config where it says xll forwarding says "yes".


      Yes, enabled X11 forwarding in config from the start

      "tekkbebe" wrote:

      2) You need to add this line at the end of the sshd_config: (FYI, you get display message cuz you need to specify IPv4. use inet6 for IPv6) AddressFamily inet


      No, I didn't have this and hadn't seen this instruction anywhere else, so have added it now and will see how it works.

      "tekkbebe" wrote:

      3) restart ssh with:

      /etc/init.d/ssh restart

      4) You need to exit ssh and start new session before it will work.


      Yes, always have been restarting SSH and a new session when making changes.

      "tekkbebe" wrote:

      5) Then in Putty make sure you put checkmark at Connection/SSH/X11 in the enable X11 forwarding. I save separate configs in Putty
      for use with X11.


      Yes, have this already as well and use separate configs too.

      "tekkbebe" wrote:

      PS- Easy way to do this is install Debian Squeeze w/ Gnome2. Then install OMV, link how to install on preinstalled system in the How/Tos. Then workout X11 Forwarding with above instructions. You don't have to guess if any, or what, packages are missing this way. Your XFCE install is lacking from what I see above. Gnome2 works great. I have XFCE, just to test, on a vm but I way prefer Gnome2. Gnome3 is a resource pig. Don't waste any time on it.


      Haha, I asked before I set it all up about whether OMV standalone or Debian Squeeze with OMV would be better and was told standalone and add packages :P I'll see if I can solve this without a full reinstall and if it proves easier doing a full Debian install I will give it a go.

      Thanks for the advice, very appreciated!
    • Re: Help with X forwarding please

      "Supay" wrote:

      Haha, I asked before I set it all up about whether OMV standalone or Debian Squeeze with OMV would be better and was told standalone and add packages :P


      I probably told you that. I prefer not to have the entire desktop environment installed and running on my servers. Just a preference :)
      omv 4.1.19 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.15
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • Re: Help with X forwarding please

      Having to specify this " AddressFamily inet" is a bug in the debian Open SSH package. The default is "any" but not working correctly.

      I've gone both routes. I've built up desktop environments package by package and done the full debian install with with a desktop, adding OMV later. Of the 2 methods the 2nd method is by far the easiest. Also, pigs will fly before I take time to guide someone thru the 1st method.
    • Re: Help with X forwarding please

      "ryecoaaron" wrote:

      I probably told you that. I prefer not to have the entire desktop environment installed and running on my servers. Just a preference :)


      It's ok, I'll forgive you. Luckily, this is having the side effect of teaching me some skills I had yet to acquire, so it's all good for me. I see you two answering questions everywhere, so thank you and keep up the good work, I'm really enjoying OMV so far and hope to learn a lot more.
    • Re: Help with X forwarding please

      The AddressFamily option will be automatically restricted to IPv4 in openmediavault 0.4.17, see sourceforge.net/p/openmediavault/code/455/.
      Absolutely no support through PM!

      I must not fear.
      Fear is the mind-killer.
      Fear is the little-death that brings total obliteration.
      I will face my fear.
      I will permit it to pass over me and through me.
      And when it has gone past I will turn the inner eye to see its path.
      Where the fear has gone there will be nothing.
      Only I will remain.

      Litany against fear by Bene Gesserit