Question

start gdm over portable ssh (xming and portable putty)

Asked by: rtod2

can 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.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-05-19 at 15:25:44ID24422765
Topics

X-Windows Window Manager

,

Linux

,

Linux Administration

Participating Experts
1
Points
500
Comments
49

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

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.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

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.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

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.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. ssh with putty and pagent - does not work
    I am trying to configure putty for use with public key authentication. After I load my private key into pagent, then try to connect using putty, I still get prompted for login/password. I have adjusted sshd_config to allow for public key authentication, but it still does not...
  2. Plink / putty and cached SSH host keys
    I am trying to establish an SSH tunnel through plink and it works just fine. However, if I am connecting to a server or IP I have not connected to yet, I get this message: ----------------- The server's host key is not cached in the registry. You have no guarantee that the s...
  3. Server Key not Found : Error ---> ssh with Putty
    uname -a Linux tc79vmos104 2.6.9-55.0.12.ELsmp #1 SMP Fri Nov 2 11:19:08 EDT 2007 i686 i686 i386 GNU/Linux Step1: created a directory .ssh under /home Step2: chmod 700 .ssh step3:generated the keys on the server by this command: ssh-keygen -t rsa step4:Enter file in whic...
  4. putty errors
    I get the following errors when trying to use x11 programs from both xlaunch and putty: * Xlib: extension "Generic Event Extension" missing on display "localhost:11.0". * (nautilus:15337): Eel-CRITICAL **: eel_preferences_get_boolean: assertion `preferen...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

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.

Join the Community

Answers

 

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

 

by: ai_ja_naiPosted on 2009-05-19 at 15:48:25ID: 24427303

Anyway, start an xterm and run

/etc/gdm/Xsession default

                                              
1:

Select allOpen in new window

 

by: rtod2Posted on 2009-05-19 at 15:50:44ID: 24427324

I don't want the XDM of XDMCP  I want only the dashboard.

 

by: rtod2Posted on 2009-05-19 at 15:52:59ID: 24427341

ai_ja_nai
I had some real issues with cygwin as well and could not locate you.
I would be pleased for your further assistance.  can you contact me at anonsce at gmail

 

by: ai_ja_naiPosted on 2009-05-19 at 16:00:58ID: 24427390

of course NOT. Your solution has to be available in future to others.

Did what I suggested you earlier work?

 

by: rtod2Posted on 2009-05-19 at 16:07:44ID: 24427422

no, it did not

 

by: ai_ja_naiPosted on 2009-05-20 at 00:17:51ID: 24429199

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

 

by: rtod2Posted on 2009-05-20 at 06:18:46ID: 24431521

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

 

by: ai_ja_naiPosted on 2009-05-20 at 06:25:40ID: 24431600

No, of course you have to make sure those settings are already settled in the remote machine

 

by: rtod2Posted on 2009-05-20 at 06:27:43ID: 24431614

"of course", i would have no need to ask these questions here if I were familiar with linux

 

by: rtod2Posted on 2009-05-20 at 06:32:33ID: 24431654

From start to finish where I end up with a GUI login via ssh and cygwin, would you mind laying it out step-by-step.  Your process doesn't quite get me what I was after.

1.
2.
3.

 

by: ai_ja_naiPosted on 2009-05-20 at 06:33:11ID: 24431665

(It wasn't meant to be uneducated, just to put a stress on it)
Actually, you can normally ssh to the remote box and change the settings via command line

 

by: rtod2Posted on 2009-05-20 at 06:35:14ID: 24431687

OK perfect,
so 1.2.3 from the beginning, using the windows box for the commands, can you provide the steps?

 

by: ai_ja_naiPosted on 2009-05-20 at 06:46:49ID: 24431790

Connect with putty to the remote host (I assume you know how to do that) and double click on the Xming logo in the desktop

 

by: rtod2Posted on 2009-05-20 at 07:11:33ID: 24432029

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:
 

ssh X root@vz1 (enter password when prompted)  
sudo nano /etc/ssh/sshd_config (to edit the sshd_config file)  
You will see the # X11 tunneling options within that file  
Enter the following at the top of the config file above the first #  
X11Forwarding yes (enter to move to the next line)
X11DisplayOffset 10 (enter to move to the next line)
X11UseLocalhost yes (enter to move to the next line)  
(ctrl-x to save; type y? and enter to confirm changes; enter again to confirm the correct file name)
putty.exe (single, fully portable executable from http://www.putty.org/ )  
xlaunch.exe
choose one window
presented with start no client, start a program, or open session via xdmcp
choose start a program --> is this correct so far?, what program do I choose?
then do choose Using PuTTY (plink.exe which I have), using SSH (ssh.exe), or with compression which is greyed out?




 

by: rtod2Posted on 2009-05-20 at 07:23:12ID: 24432159

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.  Thank you very very much for your assistance.  You appear to be the only one who has figured any of this out.

 

by: ai_ja_naiPosted on 2009-05-20 at 07:30:09ID: 24432241

>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

 

by: rtod2Posted on 2009-05-20 at 07:49:47ID: 24432495

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

 

by: ai_ja_naiPosted on 2009-05-20 at 08:28:44ID: 24432987

may I have a look at your /etc/X11/gdm/gdm.conf?

 

by: rtod2Posted on 2009-05-20 at 08:38:04ID: 24433106

<font id="linkPlaceHolder">http://drop.io/n3psslw </font>

 

by: rtod2Posted on 2009-05-20 at 08:40:23ID: 24433123

Note that I can connect via xdmcp and cygwin but I wish to use ssh as above.

To recap:
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

 

by: ai_ja_naiPosted on 2009-05-20 at 09:14:29ID: 24433505

Are you on Gnome?

Issue

setenv DISPLAY youripaddress:0.0

before launching the gnome-session command

 

by: rtod2Posted on 2009-05-20 at 10:51:42ID: 24434429

returns: -bash: setenv: command not found

 

by: ai_ja_naiPosted on 2009-05-20 at 15:09:45ID: 24436775

DISPLAY=yourip:0.0

 

by: rtod2Posted on 2009-05-20 at 15:57:13ID: 24437035

I can only try this during the day at work.  Just noticing the error though, it would appear that it is the setenv command that appears to not be found.

 

by: rtod2Posted on 2009-05-21 at 06:24:34ID: 24441081

Thanks for the suggestion.  That got us a little closer.  

I typed only DISPLAY=IP_OF_WINDOWS_MACHINE:0.0
It returned a prompt where I typed gnome-session.

Unfortunately, I still get the same Gtk warning while using cygwin and the same black screen following initial login using xming.

 

by: ai_ja_naiPosted on 2009-05-21 at 15:39:27ID: 24446527

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

 

by: rtod2Posted on 2009-05-21 at 16:14:32ID: 24446717

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 type the command: gnome-session, correct?

Please confirm and I will try in the A/M.

 

by: rtod2Posted on 2009-05-22 at 06:17:28ID: 24450526

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?

 

by: ai_ja_naiPosted on 2009-05-22 at 09:23:52ID: 24452691

no, it's step one... try xinit without the --clipboard switch

 

by: rtod2Posted on 2009-05-22 at 09:45:55ID: 24452868

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.

 

by: ai_ja_naiPosted on 2009-05-24 at 07:42:39ID: 24461770

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)

 

by: rtod2Posted on 2009-05-24 at 12:50:51ID: 24462745

understood
The problem is that I have to sell this procedure for accessing the GUIs to my department.  All those errors are far from acceptable.

 

by: ai_ja_naiPosted on 2009-05-24 at 13:00:23ID: 24462785

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...

 

by: rtod2Posted on 2009-05-24 at 13:13:18ID: 24462852

fact remains that i know i cant sell this if errors are popping up

 

by: rtod2Posted on 2009-05-24 at 13:17:06ID: 24462870

So let's say I was comfortable with the errors, and wanted to accomplish the following:

  • suppress the errors to a log file  
  • allow copy and paste to/from the cmd window  
  • and allow each history to be recorded to local log files 

Using serverx as an example, how would I re-write the cygwin.bat file?

 

by: ai_ja_naiPosted on 2009-05-24 at 15:27:28ID: 24463279

>fact remains that i know i cant sell this if errors are popping up
Wrong. Does it work? It is salable. Does it crash? It's not. Period. All the rest is just debug output

> how would I re-write the cygwin.bat file?
what bat file?

 

by: rtod2Posted on 2009-05-24 at 19:22:20ID: 24464029

cygwin setup is downloaded from x.cygwin.com and the default cygwin is set to start from cygwin.bat

In other words, how would I accomplish the above post with a single click for a server named serverx?

 

by: ai_ja_naiPosted on 2009-05-25 at 02:30:25ID: 24465399

post here the batch

 

by: rtod2Posted on 2009-05-25 at 08:02:08ID: 24466968

Here is the batch file.

 

by: ai_ja_naiPosted on 2009-05-25 at 08:16:25ID: 24467030

@echo off
 
C:
chdir C:\cygwin\bin
 
bash --login -i &2>1 >mylog.txt

                                              
1:
2:
3:
4:
5:
6:

Select allOpen in new window

 

by: rtod2Posted on 2009-05-25 at 19:54:00ID: 24469940

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:

xinit (without the -clipboard)
xhost + (seems to have resolved the previous Gtk error recieved after typing gnome-session)
ssh -X root@192.168.230.106
export DISPLAY=192.168.230.103:0.0
gnome-session

Attached here are my screenshot results of those steps
with the final error appearing within a gnome-session.


 

by: rtod2Posted on 2009-05-25 at 19:57:59ID: 24469954

Screenshot 6 above should be removed as the Gtk error referenced in it is no longer relevant.  Screenshot labeled 3, 4, 5 includes the remaining relevant errors.

 

by: ai_ja_naiPosted on 2009-05-26 at 06:38:14ID: 24473102

Screenshot 3-4-5 are not errors, just the system that warns you about things that you have to know. They are not a problem. BTW, 4-5 appear only the first time you connect to that host

 

by: rtod2Posted on 2009-05-26 at 06:46:06ID: 24473186

#5 is of particular concern.  I'm trying to 'deploy' this tool to be used by others in the department.  Something that says insecure, warning, authenticity issues, etc raise red flags.

I need to know how to 'fix' them, not just bypass them.

 

by: ai_ja_naiPosted on 2009-05-26 at 08:27:32ID: 24474237

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

 

by: rtod2Posted on 2009-05-26 at 14:30:56ID: 24477917

If it prefers key based authentication, how can I provide what it wants?

 

by: rtod2Posted on 2009-05-26 at 14:45:39ID: 31583274

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!

 

by: ai_ja_naiPosted on 2009-05-26 at 14:48:54ID: 24478053

By creating and exchanging RSA keys between the two hosts. In this way, you don't need anymore a password to log in into the machine (and this can be a vulnerability). It's a matter of tastes. Personally, I don't use keys. I just enter yes the first time and the pass all the others

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...