LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-20-2009, 07:20 AM   #1
harry_uk
Member
 
Registered: Mar 2009
Posts: 36

Rep: Reputation: 16
Remote Desktop Equivalent


Hi friends,

Just a little background:

1) Im a power user in windows, trying to become the same in linux
2) I use rdp in windows for logging to my other systems in the network
3) Im trying to RDP to my linux CENT OS 5 box from my windows box.

VNC works fine as long as a user is logged in the linux box, like root etc.

But if no user is logged in VNC does not work.

I have checked that VNC is installed as a service by typing using root

# service vncserver start
# chkconfig vncserver on

Both me and my bro can ssh into the box.

My need is that, either me or my bro has to log into the linux box and use it remotely with GUI access.

I have searched a lot, Im just not doing something right.. please help friends.

Thanks in advance,

Harry.
 
Old 03-20-2009, 08:36 AM   #2
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware
Posts: 1,135

Rep: Reputation: 277Reputation: 277Reputation: 277
The whole purpose of VNC in Linux is that you're able to log in from a remote location, rather than having to already be logged in, so something must be amiss in your VNC setup.

Bear in mind, that unlike windows, VNC doesn't give you access to an existing desktop, rather, it creates a new session on the remote machine.

In order to establish a VNC connection with an existing desktop, you'll need something like x11vnc.

That being said, since you and your bro are able to ssh to the machine, why not ssh using X forwarding?

Code:
ssh -X(or -Y) <target_machine>
This enables you to run individual target_machine programs on your desktop. You'll have to enable X forwarding in the target's sshd.conf.

cheers,
 
Old 03-21-2009, 02:32 AM   #3
harry_uk
Member
 
Registered: Mar 2009
Posts: 36

Original Poster
Rep: Reputation: 16
x11 forwarding is enabled in the server sshd config file by default.

On the client side im using putty, i enabled x11 forwarding and chose remote x11 authentication protocol as XDM-Authorisation-1 ( I tried MIT-Magic-cookie-1)...

Both give me an error when i type #xclock when i log in..

The error is "x connection to localhost:10.0 host broken (explicit kill or server shutdown)"

Im unable to get beyond this....

Let me try the vnc route parallel.

Last edited by harry_uk; 03-21-2009 at 02:34 AM.
 
Old 03-21-2009, 02:35 AM   #4
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Have you tried the solution given on the CentOS wiki?
http://wiki.centos.org/HowTos/VNC-Server
 
Old 03-21-2009, 05:28 AM   #5
harry_uk
Member
 
Registered: Mar 2009
Posts: 36

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by billymayday View Post
Have you tried the solution given on the CentOS wiki?
http://wiki.centos.org/HowTos/VNC-Server
Yeah im trying just that..... I came back here to say that the solution there is partially working....


Now i can add my username and login remotely without having to log into the computer also to use vnc...


But the problem is im unable to add my bro...

It never shows any error when i try to add, but when i type

192.168.*.70:2 for display 2 in vncviewer, it connects to port 5902... but the service is only running on 5901... I just dont understand why its doing like this...


I have edited the /etc/sysconfig/vncserver

and changed values

#################################################################33

# Use "-localhost" to prevent remote VNC clients connecting except when
# doing so through a secure tunnel. See the "-via" option in the
# `man vncviewer' manual page.

VNCSERVERS="1:Harry 2:Ray"
VNCSERVERARGS[1]="-geometry 800x600"
VNCSERVERARGS[2]="-geometry 800x600"


##################################################################

I went into ray's login and typed vncpasswd

Then logged into root using su root

Restarted the service, and then edited the xstartup script to uncomment two lines and again restarted the service

But still i am unable to do 192.168.*.70:2 and i get the login screen, when i put ray's password, it says vnc authentication failed.


I need help beyond this please.

Last edited by harry_uk; 03-21-2009 at 05:33 AM.
 
Old 03-21-2009, 07:00 AM   #6
harry_uk
Member
 
Registered: Mar 2009
Posts: 36

Original Poster
Rep: Reputation: 16
Friends i finally cracked it:


There is a bug either in the viewer im using, i have tried both Uvnc viewer and RealVnc viewer... but the same error comes...

So i found a workaround....

The setting is changed like this:

VNCSERVERS="1:Harry 2:root 3:Ray"
VNCSERVERARGS[1]="-geometry 800x600"
VNCSERVERARGS[2]="-geometry 800x600"
VNCSERVERARGS[3]="-geometry 800x600"


If i use viewer, i can use both Harry and Ray, but if i try root using 192.168.*.70:2, it wont work, and it will try connecting to 192.168.*.70:8902, though application is running on 8901.

But in other displays this problem is not there.

Again i dont know whether this is centos issue or viewer issue.

But i was screwed until i found out the workaround.

Other findings:

The centos page talks about vnc-ts which will give you login screen, the screen comes, but its not usable.

The centos page talks about various resolutions, but only 800x600 works. Dont waste time with other resolutions.

Also dont waste time with gnome vnc-vino by activating it from the menu---preferences--remote-desktop--- This is a total time waste.

Also I tried x11vnc, and no luck with centos, beleive me.....

Thanks again to all those who helped.

I wanted to document this here, so that somebody like me who is suffering need not suffer again.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenSource Desktop equivalent for Solaris braghu_ram Solaris / OpenSolaris 1 11-26-2008 04:18 PM
Scripting Remote Logon - Starting Remote Gnome Desktop klmukp Linux - Newbie 1 09-21-2008 01:13 AM
Google Desktop Search equivalent Drone4four Slackware 43 06-28-2007 05:12 PM
Linux equivalent of Palm desktop? Odyssey1942 Linux - Newbie 6 07-12-2006 10:53 AM
Desktop Manipulation Software Equivalent? ac402 Linux - Software 0 12-25-2003 02:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration