LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-13-2007, 09:31 PM   #1
Brian5
Member
 
Registered: Dec 2006
Posts: 34

Rep: Reputation: 15
Getting X to work through tunneled VNC over SSH connection


Hello,

I finally got my old laptop running as a server after much soldering (the power cord snapped during install) and time messing with grub to boot kubuntu.

I'm trying to create a connection through VNC running over SSH, however, I want to be able to create a connection that uses X on the local computer that I will be sshing (verb???) from.

When I sign in through shh, I see this:

/usr/bin/X11/xauth: /home/merlin/.Xauthority not writeable, changes will be
ignored

However, I keep getting this error when I try the command startx:

xauth: creating new authority file /home/merlin/.serverauth.6299
xauth: error in locking authority file /home/merlin/.Xauthority
xauth: error in locking authority file /home/merlin/.Xauthority
xauth: error in locking authority file /home/merlin/.Xauthority
xauth: error in locking authority file /home/merlin/.Xauthority

X: user not authorized to run the X server, aborting.
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

giving up.
xinit: unable to connect to X server
xinit: No such process (errno 3): unexpected signal 2.
xauth: error in lcoking authority file /home/merlin/.Xauthority
Couldnt get a file descriptor referring to the console


I tried 'sudo xauth -b quit' because I found on one link from google that this may remove the Xauthority locks, however, I don't believe it does.

When I try 'startx' after that command I get:

xauth: creating new authority file /home/merlin/.serverauth.6404
xauth: error in locking authority file /home/merlin/.Xauthority
xauth: error in locking authority file /home/merlin/.Xauthority
xauth: error in locking authority file /home/merlin/.Xauthority
xauth: error in locking authority file /home/merlin/.Xauthority
X: user not authorized to run the X server, aborting.
xinit: Server Error
xauth: error in locking authority file /home/merlin/.Xauthority
Couldnt get a file descriptor referring to the console


Any help on the subject would be greatly appreciated!

Oh, right, one more thing, I'm starting the connection from a windows computer (school, home, etc) on putty, X11 forwarding is enabled.
 
Old 09-15-2007, 06:42 AM   #2
kstan
Member
 
Registered: Sep 2004
Location: Malaysia, Johor
Distribution: Dual boot MacOS X/Ubuntu 9.10
Posts: 851

Rep: Reputation: 31
try this command?
xhost +
 
Old 09-15-2007, 06:56 AM   #3
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Quote:
Oh, right, one more thing, I'm starting the connection from a windows computer (school, home, etc) on putty, X11 forwarding is enabled.
Do you have an X environment installed on the Windows computer? You need something like Cygwin for X forwarding to a Windows computer to work. Windows itself simply doesn't understand X. If you use VNC instead, you'll need just a VNC client on the Windows machine.

As for the Xauthority file, who owns it and what are the permissions?
 
Old 09-15-2007, 12:37 PM   #4
Brian5
Member
 
Registered: Dec 2006
Posts: 34

Original Poster
Rep: Reputation: 15
I actually changed the ownership of Xauthority. I don't know if I should have... I followed a link from a google search; with chown, I changed the ownership from root, to user. Still didn't seem to fix anything.

I've tried xhost +

Here's the error I received from it:

Xlib: connection to "localhost:10.0" refused by server
Xlib: PuTTY X11 proxy: wrong authentication protocol attempted
xhost: unable to open display "localhost:10.0"

Actually my error messages have been varying since I've started using different commands to hopefully get it to work, sometimes the "wrong authentication protocol attempted" doesn't appear. Sometimes when I use MIT-Magic-Cookie-1 the error does not appear, however, it always seems to appear when I use XDM-Authorization-1.

I'll try using an x-environment on windows, I actually never thought about an error in windows trying to receive X.

Thanks so much!
 
Old 09-15-2007, 01:19 PM   #5
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Quote:
Xlib: connection to "localhost:10.0" refused by server
Xlib: PuTTY X11 proxy: wrong authentication protocol attempted
xhost: unable to open display "localhost:10.0"
In X, the "server" is the computer actually responsible for performing the display functions. When you're forwarding X, that means that the local machine (in your case the Windows box) is the X server. And since Windows doesn't understand X, until you get an X environment installed, you are going to continue to get these errors.

Now VNC works differently. In essence, it is sending a snapshot of the remote X desktop to a local VNC client. As long as the local end has a VNC client, it doesn't need X installed. And on the remote end, the VNC server has its own X server it uses to create a desktop (at least I think it does).

So keep in mind that X forwarding and VNC are two very, very different beasties with different requirements on the local end. About the only thing they have in common is that you can run both through an SSH tunnel.
 
Old 09-19-2007, 04:08 AM   #6
kstan
Member
 
Registered: Sep 2004
Location: Malaysia, Johor
Distribution: Dual boot MacOS X/Ubuntu 9.10
Posts: 851

Rep: Reputation: 31
Quote:
Originally Posted by Hangdog42 View Post
In X, the "server" is the computer actually responsible for performing the display functions. When you're forwarding X, that means that the local machine (in your case the Windows box) is the X server. And since Windows doesn't understand X, until you get an X environment installed, you are going to continue to get these errors.

Now VNC works differently. In essence, it is sending a snapshot of the remote X desktop to a local VNC client. As long as the local end has a VNC client, it doesn't need X installed. And on the remote end, the VNC server has its own X server it uses to create a desktop (at least I think it does).

So keep in mind that X forwarding and VNC are two very, very different beasties with different requirements on the local end. About the only thing they have in common is that you can run both through an SSH tunnel.
As Hangdog42 mentioned, if you want to view linux screen from Windows, the easier way is use vnc.

Simple way is install vncserver in Linux computer, start it, then run following command:-
vncserver :1 (it probably ask you to input password)

Install any vncsoftware at windows PC (example tightvnc), then open a session to linux-ip-address:1

It should ask you to input password.

To further secure the traffic, the better way is do a ssh tunneling.

If you insist want to use X environment in Windows, you need to purchase it (If I'm not mistaken it is commercial).

Regards,
KS

Last edited by kstan; 09-19-2007 at 04:09 AM.
 
  


Reply



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
ssh: connection to host port: 22: Connection timed out lost connection cucolin@ Linux - Server 4 11-22-2011 06:15 AM
VNC connection to SUSE Linux 10 from a Windows XP VNC Viewer determin2excel Linux - Software 13 10-03-2007 09:38 AM
finally got vnc/ssh connection - questions though babag Linux - Networking 1 07-15-2007 02:05 PM
Keep losing connection to remote machine through SSH/VNC cav Linux - Networking 3 04-23-2006 07:12 PM
Chrooted tunneled cvs server with rw acces zedek Programming 0 01-17-2002 03:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:45 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