Jump to content
  • Advertisement
Sign in to follow this  
Kaze

CentOs remote desktop help

This topic is 2898 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a server running CentOs thats hosted remotely so I would like to be able to connect with a remote desktop from a windows machine, right now I can only use a ssh console. I used [yum groupinstall "X Window System" "GNOME Desktop Environment"] on the linux server and installed Cygwin on the windows client but now have no idea what to do.

Share this post


Link to post
Share on other sites
Advertisement
The way I've done it in the past (the hard way, probably ;)): Your server needs to have an X application or desktop manager installed and SSH up and running and accessible, as you've already done.

You will need a X server running on your Windows desktop. So, install X in Cygwin, open a terminal and start up a X server on your desktop (xinit). Make sure DISPLAY is set properly; echo $DISPLAY should show something like :0.0. In the terminal, we'll forward X to the server via SSH, just like you'd normally log on with ssh, but with a -X added: e.g., ssh -X 123.456.789.0. In the SSH session, execute a X application (gnome-session, gdm, anything) and it should show up in your desktop's X server.

Share this post


Link to post
Share on other sites
Alternatively Xming, which I think I found easier..

There might also be a thing with XDMCP:
http://lists.centos.org/pipermail/centos/2008-October/065617.html

Also you may need to set appropriate firewall rules [but maybe not if you use the approach above which goes over ssh]. That was something I never figured out, but since my server is on my local network I just log in with ssh and disable the firewall when necessary (services iptables stop). That could be a bad idea though.

Also you may need to run "init 5" from ssh to start graphical mode before you can log in.

Share this post


Link to post
Share on other sites
When I tried startx I got

Fatal server error:
PAM authentication failed, cannot start X server.
Perhaps you do not have console ownership?

How do I fix it and why do I need authentication when I'm already using ssh


Also why do I need a password to download Xming

EDIT:

Why can't I copy/paste from Cygwin


Whats the point in having a graphical interface if you have to master the console commands, edit config files and set bash variables before your allowed to use it.


EDIT2:
Is X automatically installed on cygwin? Every tutorial on how to install cygwin/x shows how to install cygwin and nothing else.


[Edited by - Kaze on July 13, 2010 1:41:24 PM]

Share this post


Link to post
Share on other sites
Quote:
Original post by Kaze
When I tried startx I got

Fatal server error:
PAM authentication failed, cannot start X server.
Perhaps you do not have console ownership?

How do I fix it and why do I need authentication when I'm already using ssh

Did you enter that on your server? (I'm guessing so, since I don't think PAM is usually available in Cygwin.) If so, it is trying to start a new X server on your server, rather than connect to the X server on your desktop. Since the X server is already running (on your desktop of course), try an X application or desktop environment (xterm, gnome-session).

Share this post


Link to post
Share on other sites
I figured out how to install x on cygwin, now:

1: how do I use gnome instead of the default x

2: how do I connect to a remote computer

3: what port will it use or can I use ssh

Share this post


Link to post
Share on other sites
Quote:
Original post by Kaze
I figured out how to install x on cygwin, now:

1: how do I use gnome instead of the default x

GNOME must be installed on the server, start it with gnome-session.
Quote:
Original post by Kaze
2: how do I connect to a remote computer

Using SSH? ssh -X your_server's_hostname_or_ip_address

Perhaps I'm misunderstanding the question.

Quote:
Original post by Kaze
3: what port will it use or can I use ssh

The SSH daemon will by default listen to port 22. Usually, SSH defaults to disallowing root logins but allowing other accounts access with a password. As far as I remember, the X communication is tunneled through the SSH connection.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!