Anyway, start an xterm and run
Main Topics
Browse All Topicscan someone give me some example steps on this?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
to connect to a machine, first you enable X forwarding on the remote machine
sudo nano /etc/ssh/sshd_config:
# X11 tunneling options
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes
Then, in Putty enable X forwarding (Connection->SSH->X11, check "Enable X11 forwarding") and the compression.
Finally, connect with Putty to remote host, launch Xming and you should be done
Ah OK this might be good. I'm new to linux though and a little unsure how to decipher it.
in response to the following, please see my questions following the arrow -->
to connect to a machine, first you enable X forwarding on the remote machine
sudo nano /etc/ssh/sshd_config: --> can I execute these from the cygwin command line on the windows machine? If so, how do I first connect to the machine?
# X11 tunneling options
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes
Then, in Putty enable X forwarding (Connection->SSH->X11, check "Enable X11 forwarding") and the compression.
Finally, connect with Putty to remote host, launch Xming and you should be done"
Can I do this using cygwin
ai,
I REALLY appreciate your help but I am having some difficulty following your steps. Here is what I have so far.
Task: Connect to GUI Login and subsequent GNOME desktop via SSH (now using the suggested xming product and putty)
Steps:
>choose one window
>presented with start no client, start a program, or open session via xdmcp
you should choose the third, session via xdmcp (and that's another thing that has to be enabled on the remote box)
>In this thread, in post #24427286, you say that "Xming has too many bugs", and to use cygwin.
>Then you say, in post #24431521, to "launch Xming and you should be done".
>Just a little confused.
I don't like Xming because it has(had) some problems in XDMCP protocol. I find myself more comfortable with Cygwin/X.
Anyway, as you chose to stick with Xming I respect your will and go ahead.
After you started a ssh connection if you launch Xming you are done in your goal of connecting because you can launch remote box's apps or an entire desktop (via xdmcp)
>choose start a program --> is this correct so far?, what program do I choose?
It's up to you. If you connect to a remote box is because you want to do something, right? But maybe you don't want to fire up an entire desktop window, so Xming lets you start a single app on your Windows desktop to save resources
You say that you "don't like Xming because it has(had) some problems in XDMCP protocol. I find myself more comfortable with Cygwin/X."
I am beginning to agree though am having some issues when trying to portabilize cygwin. When I use xdmcp with xming, i get a black window where I do not with cygwin. I agree with you that xming has xdmcp issues.
Suppose I wanted to go with Cygwin, would you like me to open another question?
How would you suggest I proceed to connect to the desktop over ssh with cygwin? Previously I have done the following, and the below was my result:
ssh -x root@server
gnome-session &
result: Gtk-WARNING **: cannot open display
That is to say,
1) xming - ssh + xdmcp returns a black window (despite recommended preparations to the sshd_config file)
2) cygwin - ssh + gnome-session or kdestart returns the Gtk warning
<font id="linkPlaceHolder">http:
Let's do it from the beginning
-Start your Cygwin command shell.
- Give "xinit -- -clipboard" in the command line. You will see a bare X window show with a command prompt in it. You will also see something like "Cygwin/X - 0:0" on the left-top of the window. This tells you the display in which the X server is listening for incoming connections.
- Give "xhost +" in the command prompt. This is to let the server accept all the incoming connections. Remember: if you are concerned about the security, refer to the man page of xhost on how to give a list of hosts instead of wild card "+".
- Start an ssh connection to your Linux box.
- Once logged in, set the display variable with "export DISPLAY=x.x.x.x:0.0" where x.x.x.x is the IP address of your Windows box.
- Start your Gnome session by giving "gnome-session"
This should work
When you say "- Give "xinit -- -clipboard" in the command line", you mean to type the command: xinit -clipboard ??
When you say "-Give "xhost +" in the command prompt, you mean to simply type the command: xhost + with no variable after the space +, correct?
When you say "start an ssh connection", you mean to type ssh -X root@server and then enter the password
When you say "set the display variable with..." you mean to type the command: export DISPLAY=windows_ip:0.0
Then
Please confirm and I will try in the A/M.
1) I typed: xinit -clipboard, got some flashing, and a return of the command prompt; so that appears to have done something.
2) I typed: xhost + as well as xhost, and xhost+ which all returned command not found.
3) Login via ssh -X root@server was successful.
4) I typed: export DISPLAY=windows_ip:0.0 and that appears to have worked
5) I typed: gnome-session and got the same Gtk-WARNING **: cannot open display
Perhaps it is step2 that I am missing?
OK very interesting. In step 2 I still got command not found but i continued with the rest of it and did get a gnome-session!
The session did return significant error text though in both the command window, and the window from which gnome-session GUI was successfully launched. Here are those screenshots.
Very encouraging but it appears the X11 isn't tunneling 100% correctly via ssh. The plan is to be able to turn off XDMCP and complete the connections 100% securely via SSH.
I think we are almost there and your suggestions would be very helpful.
error1.png reports no important errors, just some minor glitches more than tolerable for a Win->Lin connection (remember that Windows is not interoperable even with itself, figure out the difficult of making it possible to Linux).
error2.png reports some warnings that should not be fatal. Did you experience any sudden stop of the transmission, or any crash of the Gnome session?
Ssh is indeed cyphering the transmission. If you don't belive it, sniff the traffic with a packed inspector and see if you can read the traffic (tip: you won't)
You can hide those, if you want, by redirecting the output of the command by appending "&2>1 >mylogfile.log &" at the end of a command, so that it's all logged
And remember that warnings are common and are a blessing. If you want slick software that obscures warnings and error messages to appear just cooler and that when something goes wrong just crashes without reasons you should turn to MS products...
Thanks for the suggestion regarding redirection of the log. Perhaps you are right that there is some debugging to do first. I decided try this on a CentOS box at home with xcygwin, to see what I would run into that might be different from the errors at work. They were largely the same. Here are those results.
It is important to note that as far as I can tell, neither 1) modifying the sshd_config to include X11Forwarding yes, X11DisplayOffset 10, X11UseLocalhost yes, or 2) changing the remote and security tabs to reflect 'remote login same as local', and 'allow remote system administrator logins', did not seem to have any effect. As at work, despite the errors, I was able to get a gnome-session.
The path I followed was as follows:
You can't, because there's nothing to fix.
The first time it asks for yes/no it's telling you "hey, you want me to connect to an unknown host. It's fingerprint is this. What do you want to do? "
The other warnings are because you use password authentication, instead on the key based one; as it prefers key based auth it says "hey, you are not giving me keys, the key based auth can't go, I'll try something else". It's not a concern. If you really want to suppress those use -Y instead of -X, but I discourage you: warning messages are good. Groping and stumbling in the dark is not
Great job getting me through this! At least I can get to the gnome-session using cygwin which is what I wanted. The primary goal has been accomplished. I still need to debug the errors I am getting but it works. The steps I am taking are now narrowed to the following:
xinit
xhost +
ssh -X root@server
gnome-session
done!
Business Accounts
Answer for Membership
by: ai_ja_naiPosted on 2009-05-19 at 15:46:03ID: 24427286
Xming has some serious bugs in xdmcp, I suggest you using Cygwin/X