Can't get vnc to connect












0















I have a server and my laptop. I want to be able to start vnc server on the server and then connect from my laptop. Both are running ubuntu 11.10 64 bit desktop



On my server, i installed tightvncserver. I set it up with a password, no view only password. I ssh to the box and typed



vncserver :42


Now on my laptop, I installed gtkvncviewer and ran it. It popped up a box. I entered the picard:42 (the name of the server in my /etc/hosts file) and the password. I tried with and without the user. It always disconnects immediately.



Can anyone point out what I'm doing wrong? Is it because I'm not running a GUI session currently on picard? If so, how can I start the Xwindows session remotely to connect with vncserver?










share|improve this question

























  • i've added some hints how to proceed - does it work now?

    – tohuwawohu
    Apr 11 '12 at 9:08
















0















I have a server and my laptop. I want to be able to start vnc server on the server and then connect from my laptop. Both are running ubuntu 11.10 64 bit desktop



On my server, i installed tightvncserver. I set it up with a password, no view only password. I ssh to the box and typed



vncserver :42


Now on my laptop, I installed gtkvncviewer and ran it. It popped up a box. I entered the picard:42 (the name of the server in my /etc/hosts file) and the password. I tried with and without the user. It always disconnects immediately.



Can anyone point out what I'm doing wrong? Is it because I'm not running a GUI session currently on picard? If so, how can I start the Xwindows session remotely to connect with vncserver?










share|improve this question

























  • i've added some hints how to proceed - does it work now?

    – tohuwawohu
    Apr 11 '12 at 9:08














0












0








0


1






I have a server and my laptop. I want to be able to start vnc server on the server and then connect from my laptop. Both are running ubuntu 11.10 64 bit desktop



On my server, i installed tightvncserver. I set it up with a password, no view only password. I ssh to the box and typed



vncserver :42


Now on my laptop, I installed gtkvncviewer and ran it. It popped up a box. I entered the picard:42 (the name of the server in my /etc/hosts file) and the password. I tried with and without the user. It always disconnects immediately.



Can anyone point out what I'm doing wrong? Is it because I'm not running a GUI session currently on picard? If so, how can I start the Xwindows session remotely to connect with vncserver?










share|improve this question
















I have a server and my laptop. I want to be able to start vnc server on the server and then connect from my laptop. Both are running ubuntu 11.10 64 bit desktop



On my server, i installed tightvncserver. I set it up with a password, no view only password. I ssh to the box and typed



vncserver :42


Now on my laptop, I installed gtkvncviewer and ran it. It popped up a box. I entered the picard:42 (the name of the server in my /etc/hosts file) and the password. I tried with and without the user. It always disconnects immediately.



Can anyone point out what I'm doing wrong? Is it because I'm not running a GUI session currently on picard? If so, how can I start the Xwindows session remotely to connect with vncserver?







vnc






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 11 '12 at 10:03







Thom

















asked Apr 9 '12 at 17:41









ThomThom

61761130




61761130













  • i've added some hints how to proceed - does it work now?

    – tohuwawohu
    Apr 11 '12 at 9:08



















  • i've added some hints how to proceed - does it work now?

    – tohuwawohu
    Apr 11 '12 at 9:08

















i've added some hints how to proceed - does it work now?

– tohuwawohu
Apr 11 '12 at 9:08





i've added some hints how to proceed - does it work now?

– tohuwawohu
Apr 11 '12 at 9:08










1 Answer
1






active

oldest

votes


















0














Which is the default runlevel? AFAIK this is configured in /etc/init/rc-sysinit.conf. Setting DEFAULT_RUNLEVEL to 2 should make the server start the X environment.
Alternatively, you could use ssh to start a complete gnome session on the server, displaying it on the client, using ssh -X remote-user@server gnome-session. But this will require some bandwith, so it may be better to start the desired application directly.



EDIT: here's the x11vnc command line to start the vnc server and let the remote user log into a gnome session:



sudo x11vnc -safer -localhost -once -nopw -auth /var/lib/gdm/:0.Xauth -display :0


(From the Ubuntu Communitiy docs on VNC)






share|improve this answer


























  • Yes, 2 is the default run level and it is starting X Windows on the box. But I'm not sure why VNC is not working.

    – Thom
    Apr 10 '12 at 14:34











  • hmm - some points: if you've installed x11vnc, i would expect x11vnc -safer -display :0 as command to start the server. Then: Did you try to increase debug output using the -v option (x11vnc -v -display :0)? Finally: If the -voption doesn't give any errors, you can re-check if the server is running using sudo netstat -atpn. This will give you a list of services running and listening for connections.

    – tohuwawohu
    Apr 10 '12 at 16:04













Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f120387%2fcant-get-vnc-to-connect%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Which is the default runlevel? AFAIK this is configured in /etc/init/rc-sysinit.conf. Setting DEFAULT_RUNLEVEL to 2 should make the server start the X environment.
Alternatively, you could use ssh to start a complete gnome session on the server, displaying it on the client, using ssh -X remote-user@server gnome-session. But this will require some bandwith, so it may be better to start the desired application directly.



EDIT: here's the x11vnc command line to start the vnc server and let the remote user log into a gnome session:



sudo x11vnc -safer -localhost -once -nopw -auth /var/lib/gdm/:0.Xauth -display :0


(From the Ubuntu Communitiy docs on VNC)






share|improve this answer


























  • Yes, 2 is the default run level and it is starting X Windows on the box. But I'm not sure why VNC is not working.

    – Thom
    Apr 10 '12 at 14:34











  • hmm - some points: if you've installed x11vnc, i would expect x11vnc -safer -display :0 as command to start the server. Then: Did you try to increase debug output using the -v option (x11vnc -v -display :0)? Finally: If the -voption doesn't give any errors, you can re-check if the server is running using sudo netstat -atpn. This will give you a list of services running and listening for connections.

    – tohuwawohu
    Apr 10 '12 at 16:04


















0














Which is the default runlevel? AFAIK this is configured in /etc/init/rc-sysinit.conf. Setting DEFAULT_RUNLEVEL to 2 should make the server start the X environment.
Alternatively, you could use ssh to start a complete gnome session on the server, displaying it on the client, using ssh -X remote-user@server gnome-session. But this will require some bandwith, so it may be better to start the desired application directly.



EDIT: here's the x11vnc command line to start the vnc server and let the remote user log into a gnome session:



sudo x11vnc -safer -localhost -once -nopw -auth /var/lib/gdm/:0.Xauth -display :0


(From the Ubuntu Communitiy docs on VNC)






share|improve this answer


























  • Yes, 2 is the default run level and it is starting X Windows on the box. But I'm not sure why VNC is not working.

    – Thom
    Apr 10 '12 at 14:34











  • hmm - some points: if you've installed x11vnc, i would expect x11vnc -safer -display :0 as command to start the server. Then: Did you try to increase debug output using the -v option (x11vnc -v -display :0)? Finally: If the -voption doesn't give any errors, you can re-check if the server is running using sudo netstat -atpn. This will give you a list of services running and listening for connections.

    – tohuwawohu
    Apr 10 '12 at 16:04
















0












0








0







Which is the default runlevel? AFAIK this is configured in /etc/init/rc-sysinit.conf. Setting DEFAULT_RUNLEVEL to 2 should make the server start the X environment.
Alternatively, you could use ssh to start a complete gnome session on the server, displaying it on the client, using ssh -X remote-user@server gnome-session. But this will require some bandwith, so it may be better to start the desired application directly.



EDIT: here's the x11vnc command line to start the vnc server and let the remote user log into a gnome session:



sudo x11vnc -safer -localhost -once -nopw -auth /var/lib/gdm/:0.Xauth -display :0


(From the Ubuntu Communitiy docs on VNC)






share|improve this answer















Which is the default runlevel? AFAIK this is configured in /etc/init/rc-sysinit.conf. Setting DEFAULT_RUNLEVEL to 2 should make the server start the X environment.
Alternatively, you could use ssh to start a complete gnome session on the server, displaying it on the client, using ssh -X remote-user@server gnome-session. But this will require some bandwith, so it may be better to start the desired application directly.



EDIT: here's the x11vnc command line to start the vnc server and let the remote user log into a gnome session:



sudo x11vnc -safer -localhost -once -nopw -auth /var/lib/gdm/:0.Xauth -display :0


(From the Ubuntu Communitiy docs on VNC)







share|improve this answer














share|improve this answer



share|improve this answer








edited Apr 10 '12 at 16:10

























answered Apr 10 '12 at 9:43









tohuwawohutohuwawohu

5,73131931




5,73131931













  • Yes, 2 is the default run level and it is starting X Windows on the box. But I'm not sure why VNC is not working.

    – Thom
    Apr 10 '12 at 14:34











  • hmm - some points: if you've installed x11vnc, i would expect x11vnc -safer -display :0 as command to start the server. Then: Did you try to increase debug output using the -v option (x11vnc -v -display :0)? Finally: If the -voption doesn't give any errors, you can re-check if the server is running using sudo netstat -atpn. This will give you a list of services running and listening for connections.

    – tohuwawohu
    Apr 10 '12 at 16:04





















  • Yes, 2 is the default run level and it is starting X Windows on the box. But I'm not sure why VNC is not working.

    – Thom
    Apr 10 '12 at 14:34











  • hmm - some points: if you've installed x11vnc, i would expect x11vnc -safer -display :0 as command to start the server. Then: Did you try to increase debug output using the -v option (x11vnc -v -display :0)? Finally: If the -voption doesn't give any errors, you can re-check if the server is running using sudo netstat -atpn. This will give you a list of services running and listening for connections.

    – tohuwawohu
    Apr 10 '12 at 16:04



















Yes, 2 is the default run level and it is starting X Windows on the box. But I'm not sure why VNC is not working.

– Thom
Apr 10 '12 at 14:34





Yes, 2 is the default run level and it is starting X Windows on the box. But I'm not sure why VNC is not working.

– Thom
Apr 10 '12 at 14:34













hmm - some points: if you've installed x11vnc, i would expect x11vnc -safer -display :0 as command to start the server. Then: Did you try to increase debug output using the -v option (x11vnc -v -display :0)? Finally: If the -voption doesn't give any errors, you can re-check if the server is running using sudo netstat -atpn. This will give you a list of services running and listening for connections.

– tohuwawohu
Apr 10 '12 at 16:04







hmm - some points: if you've installed x11vnc, i would expect x11vnc -safer -display :0 as command to start the server. Then: Did you try to increase debug output using the -v option (x11vnc -v -display :0)? Finally: If the -voption doesn't give any errors, you can re-check if the server is running using sudo netstat -atpn. This will give you a list of services running and listening for connections.

– tohuwawohu
Apr 10 '12 at 16:04




















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f120387%2fcant-get-vnc-to-connect%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to make a Squid Proxy server?

Is this a new Fibonacci Identity?

19世紀