2

I am trying to vnc into my server. On my actual server, when I type startx, it boots into gnome. It is at this point that my server will allow me to remote desktop into it.

My problem is right now my server is not booted into gnome by running startx and just sitting at a command prompt. I am not with it and cannot type the startx command. If I ssh into it, and type startx I get the following output:

dan@dvserver:~$ startx

X: user not authorized to run the X server, aborting.
^CInvalid MIT-MAGIC-COOKIE-1 keyxinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: unexpected signal 2
dan@dvserver:~$ sudo startx
[sudo] password for dan:


Fatal server error:
Server is already active for display 0
        If this server is no longer running, remove /tmp/.X0-lock
        and start again.


Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.

 ddxSigGiveUp: Closing log

And when i try to VNC into it, it fails. Is there a way that I cant start my x session via ssh and still connect through vnc? Maybe im jsut going about this remote desktop thing all wrong. Also, I am using TightVNC.

1 Answer 1

2

In your server do this:

sudo -i

then

vncserver

then do this in your machine

ssh -L 5902:localhost:5901 server 

then you can run your vncviewer as always

vncviewer localhost:2

If you want to read more about it use this link

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .