LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   vncserver (https://www.linuxquestions.org/questions/linux-newbie-8/vncserver-882505/)

linuxandtsm 05-24-2011 03:11 PM

vncserver
 
I am trying to install vnc server on fedora 10.
I downloaded & installed vnc-server-4.1.2-35.fc10.x86_64.rpm as root.
and made following change in /etc/sysconfig/vncservers file
VNCSERVERS="1:vct"
VNCSERVERARGS[1]="-geometry 800x600 -nolisten tcp -nohttpd -localhost"

as vct user set vncpasswd
and as root user started vncserver by
service vncserver start

[root@console-0124 .vnc]# service vncserver start
Starting VNC server: 1:vct
New 'console-0124.local:1 (vct)' desktop is console-0124.local:1
Starting applications specified in /home/vct/.vnc/xstartup
Log file is /home/vct/.vnc/console-0124.local:1.log
[ OK ]

then started vncviewer and tried to connect as console-0124.local:1
then i got error as
unable to resolve host by name: the requested name is valid and was found in the database, but it does not have the correct associated data being resolved for. (11004).

and when i tried to connect via ip address then i got

unable to connect to host: A socket operation was attempted to an ureachable host (10065)

what is wrong.
xstart file in /home/vct/.vnc is as follows

[vct@console-0124 .vnc]$ more xstartup
#!/bin/sh
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &

here i did not find following lines to uncomment

unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc

and xstartup file in roots home dir is also same.
what went wrong.
Thanks in advance!

bathory 05-25-2011 02:04 PM

Hi,

Use:
Code:

VNCSERVERARGS[1]="-geometry 800x600"
so vncserver listens on 5901 tcp port
Or have a look here for more details on how to use a tunnel to connect remotely to vncserver

Regards

linuxandtsm 05-26-2011 10:49 AM

Thank you bathory,

I changed it to VNCSERVERARGS[1]="-geometry 800x600".
Now i added 5901 port to iptables and restarted iptables service.
[root@console-0124 ~]# cat /etc/sysconfig/iptables |grep 5901
-A INPUT -m state --state NEW -m tcp -p tcp --dport 5901 -j ACCEPT

But when i use netstat command i am not finding 5901 port open.

[root@console-0124 ~]# netstat -tulpn |grep 59
tcp 0 0 0.0.0.0:5984 0.0.0.0:* LISTEN 3209/beam.smp
tcp 0 0 :::5900 :::* LISTEN 4414/vino-server
udp 0 0 0.0.0.0:59640 0.0.0.0:* 2698/rpc.statd

I am not sure but i think because of this i am getting following error when i tried to connect.

VNC viewer: Error Unable to connect to host:Connection refused (10061)

bathory 05-26-2011 11:02 AM

Did you restart vncserver too?
Code:

service vncserver restart

linuxandtsm 05-26-2011 12:54 PM

yes, i did.
but when i check status of the service it says Xvnc stopped.

[root@console-0124 ~]# service vncserver restart
Shutting down VNC server: 1:vct [ OK ]
Starting VNC server: 1:vct
New 'console-0124.local:1 (vct)' desktop is console-0124.local:1

Starting applications specified in /home/vct/.vnc/xstartup
Log file is /home/vct/.vnc/console-0124.local:1.log

[ OK ]
[root@console-0124 ~]# service vncserver status
Xvnc is stopped
[root@console-0124 ~]#

bathory 05-26-2011 02:12 PM

You should take a look at /home/vct/.vnc/console-0124.local:1.log to see if you can find the reason vncserver is not running or it crashes right after startup.
Also a look at the log files in /var/log may be of help on this.


All times are GMT -5. The time now is 04:56 PM.