vncserver

Hi,

I am trying to install vncserver on a fedora system.
I am wondering how can i get the vncserver rpm to install.
I am not having it in the yum repository. (by the way is vncserver free ?)
How could i download the rpm and install it ?
Please advice me on this.
Thanks in advance!

for example you can search vncserver in this site like below eg fedora 10..
(probably it requires xorg-x11-xauth for x11 forwarding to server)
and you can try it with vnc-client.

http://rpm.pbone.net/index.php3/stat/4/idpl/13677028/dir/fedora_10/com/vnc-server-4.1.3-1.fc10.i386.rpm.html

and then you can look to look Requires : section and then collect another dependencies packages.lastly install all packages and go on :b:

or

directly install from realvnc.com.this rpm has both server and client.

regards
ygemici

Hi ygemici, thanks for the reply with link.

I tried free edition of vncserver from realvnc and did following.

downloaded vnc-4_1_3-x86_linux[1].tar.gz from realvnc and winscp'ed to fedora box and untar it with following command

tar -zxvf vnc-4_1_3-x86_linux[1].tar.gz

this created a dir called "vnc-4_1_3-x86_linux[1]"
cd to that dir and

./vncinstall /usr/local/bin

this copied vncserver, vncpasswd,vncconfig etc files to /usr/local/bin
cd to /usr/local/bin and then the following

[root@testbox bin]# ./vncserver
You will require a password to access your desktops.
Password:
Verify:
xauth: creating new authority file /root/.Xauthority
New testbox.local:1 (root)' desktop is testbox.local:1
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/testbox.local:1.log
[root@testbox bin]# echo $?
0

But i haven't found /etc/sysconfig/vncservers file to edit.
And rpm -qa |grep vnc doesnt show the installed rpm.
(But it does created .vnc directory in /root )
What went wrong?

you dont see rpm list because of you dont install a rpm package..
i guess that packages comes where from realvnc.com does not includes vncservers file.
you must install vnc-server rpm alternative sources for this.

on the other hand you can resume with this package so.
(you should not use vnc for root user.there is may some securiy vulnerabilitys especially while in auth levels.)

firstly on the server start vncpasswd for create a vnc password for test user in server which connect on desktop.

$ su - test
$ vncpasswd
$ x0vncserver -PasswordFile /home/test/.vnc/passwd

and the on vncclient start vncviewer for example

# vncviewer -FullColour vncserver -ViewOnly -geometry 1024x768

regards
ygemici

Hi ygemici, thanks again.

I tried this

[vct@console-0124 ~]$ vncpasswd
Password:
Verify:
[vct@console-0124 ~]$ x0vncserver -PasswordFile /home/vct/.vnc/passwd
x0vncserver: unable to open display ""
~ImageCleanup called
[vct@console-0124 ~]$ echo $?
1
[vct@console-0124 ~]$

looks this was not successful.
when i opened vncviewer on windows laptop to connect i got

VNC viewer error: unable to connect to host: A socket operation was attempted to an unreachable host. (10065)

I still dint find /etc/sysconfig/vncservers file to edit and

[vct@console-0124 ~]$ vncserver
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

but

[vct@console-0124 ~]$ service vncserver status
vncserver: unrecognized service

Not sure where is the problem.
Please suggest me a solution to this.
Thanks in advance!

The version of vncserver you installed is not integrated with Fedora 10. it is a standalone version and has to be treated as such. Therefore commands such as

service vncserver status

will not work.

If you want a Fedora 10 enabled version, download and install the appropriate RPMs from /pub/archive/fedora/linux/releases/10. Look under "Everything/i386/os/Packages".

Hi fpmurphy,

Thanks for the reply.
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.
Is this because of my old incorrect rpm installations ?
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!

any help!!!!!!!

x0vncserver: unable to open display ""
you have to a DISPLAY for x11 forwarding to view data.
so you must x11 forward to a X11 source (if you work windows,use xming or xmanager..)
or you must connect a linux console.

for other problem
first remove "-nohttpd" from vncservers file.some versions does not support this.

# grep nohttpd /home/vct/.vnc/console-0124.local:1.log 

and then restart (probably this is not the main problem)

# service vncserver restart

after than can you write this log in forum after we can examine this.

# cat /home/vct/.vnc/console-0124.local:1.log

and you can check vnc service is running?

# x=$(sed -n 's/.*vncPort = \([0-9]*\).*/\1/p' /usr/bin/vncserver) ; nc -z `hostname -s` $x-$((x+110)) ; netstat --protocol=inet -lp|grep -i vnc

most importantly you must be sure you have access to vncserver!
..you maybe access to vnc port but following the data transfer is problem because of blocked your 3way hand-shake level while before beginning communication via tcp sockets.therefore appropriate sockets do not pass the establish state and kernel network layer genarates an error message to vnc and vnc convert it to own message and echoes ur tty..

you can check access to vncserver via vncPort that defined above

# telnet vncserver vncPort

regards
ygemici

Hi ygemici,

Below are the outputs for the commands

[root@console-0124 ~]# grep nohttpd /home/vct/.vnc/console-0124.local:1.log
[root@console-0124 ~]# echo $?
1
 
[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 ~]# cat /home/vct/.vnc/console-0124.local:1.log
Couldn't open RGB_DB '/usr/X11R6/lib/X11/rgb'
Xvnc Free Edition 4.1.3 - built Oct 15 2008 12:55:42
Copyright (C) 2002-2008 RealVNC Ltd.
See RealVNC - VNC remote control software for information on VNC.
Underlying X server release 40201000, The XFree86 Project, Inc

Thu May 26 13:51:41 2011
 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on port 5901
 vncext:      created VNC server for screen 0
error opening security policy file /usr/X11R6/lib/X11/xserver/SecurityPolicy
Could not init font path element /usr/X11R6/lib/X11/fonts/misc/, removing from l                                                                                                 ist!
Could not init font path element /usr/X11R6/lib/X11/fonts/Speedo/, removing from                                                                                                  list!
Could not init font path element /usr/X11R6/lib/X11/fonts/Type1/, removing from                                                                                                  list!
Could not init font path element /usr/X11R6/lib/X11/fonts/CID/, removing from li                                                                                                 st!
Could not init font path element /usr/X11R6/lib/X11/fonts/75dpi/, removing from                                                                                                  list!
Could not init font path element /usr/X11R6/lib/X11/fonts/100dpi/, removing from                                                                                                  list!
Fatal server error:
could not open default font 'fixed'
xrdb: Connection refused
xrdb: Can't open display 'console-0124.local:1'
xmodmap:  unable to open display 'console-0124.local:1'
imsettings information
==========================
Is DBus enabled: yes
Is imsettings enabled: yes
Is GTK+ supported: no
Is Qt supported: no
DESKTOP_SESSION:
DISABLE_IMSETTINGS:
IMSETTINGS_DISABLE_DESKTOP_CHECK:
DBUS_SESSION_BUS_ADDRESS: unix:abstract=/tmp/dbus-moeyekcgK0,guid=6088ec8248f40e                                                                                                 fa902ffca44dde9330
GTK_IM_MODULE: gtk-im-context-simple
QT_IM_MODULE:
XMODIFIERS: @im=imsettings
IMSETTINGS_MODULE: none

(imsettings-start:18653): IMSettings-WARNING **: Failed to invoke a method `GetV                                                                                                 ersion' on com.redhat.imsettings:
  Launch helper exited with unknown return code 1
Waiting for reloading the process...
(imsettings-start:18653): IMSettings-WARNING **: Failed to invoke a method `GetV                                                                                                 ersion' on com.redhat.imsettings:
  Launch helper exited with unknown return code 1
Mismatch the version of im-settings-daemon.
** (gnome-session:18664): WARNING **: Cannot open display:


[root@console-0124 ~]# x=$(sed -n 's/.*vncPort = \([0-9]*\).*/\1/p' /usr/bin/vncserver)
[root@console-0124 ~]# echo $?
0
[root@console-0124 ~]# nc -z `hostname -s` $x-$((x+110))
Connection to console-0124 5900 port [tcp/vnc-server] succeeded!
Connection to console-0124 5984 port [tcp/couchdb] succeeded!
[root@console-0124 ~]# netstat --protocol=inet -lp|grep -i vnc
[root@console-0124 ~]# echo $?
1
[root@console-0124 ~]#
 
 
[root@console-0124 ~]# telnet vncserver 5901
telnet: vncserver: Name or service not known
vncserver: Unknown host
[root@console-0124 ~]#

hi lramsb4u

can you write this.

# cat /home/vct/.vnc/xstartup
# cat /etc/redhat-release
  • you must install "fonts-xorg-base" package for fonts that needed to run Xserver.
  • you must install "xorg-x11-xfs" package for running font server that provides fonts to Xserver.

after that

# vncserver -kill :1
# service vncserver restart

and then let we look again for log file

# cat /home/vct/.vnc/console-0124.local:1.log

regards
ygemici

Hi ygemici,
The following are the contents

Code:

[vct@console-0124 .vnc]$ cat /home/vct/.vnc/xstartup
#!/bin/sh
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &
#exec gnome-session &
 
[vct@console-0124 .vnc]$ cat /etc/redhat-release
Fedora release 10 
[vct@console-0124 .vnc]$ cat /home/vct/.vnc/console-0124.local:1.log
Couldn't open RGB_DB '/usr/X11R6/lib/X11/rgb'
Xvnc Free Edition 4.1.3 - built Oct 15 2008 12:55:42
Copyright (C) 2002-2008 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Underlying X server release 40201000, The XFree86 Project, Inc
 
Thu May 26 13:51:41 2011
vncext:      VNC extension running!
vncext:      Listening for VNC connections on port 5901
vncext:      created VNC server for screen 0
error opening security policy file /usr/X11R6/lib/X11/xserver/SecurityPolicy
Could not init font path element /usr/X11R6/lib/X11/fonts/misc/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/Speedo/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/Type1/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/CID/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/75dpi/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/100dpi/, removing from list!
Fatal server error:
could not open default font 'fixed'
xrdb: Connection refused
xrdb: Can't open display 'console-0124.local:1'
xmodmap:  unable to open display 'console-0124.local:1'
imsettings information
==========================
Is DBus enabled: yes
Is imsettings enabled: yes
Is GTK+ supported: no
Is Qt supported: no
DESKTOP_SESSION:
DISABLE_IMSETTINGS:
IMSETTINGS_DISABLE_DESKTOP_CHECK:
DBUS_SESSION_BUS_ADDRESS: unix:abstract=/tmp/dbus-moeyekcgK0,guid=6088ec8248f40efa902ffca44dde9330
GTK_IM_MODULE: gtk-im-context-simple
QT_IM_MODULE:
XMODIFIERS: @im=imsettings
IMSETTINGS_MODULE: none
 
(imsettings-start:18653): IMSettings-WARNING **: Failed to invoke a method `GetVersion' on com.redhat.imsettings:
 Launch helper exited with unknown return code 1
Waiting for reloading the process...
(imsettings-start:18653): IMSettings-WARNING **: Failed to invoke a method `GetVersion' on com.redhat.imsettings:
 Launch helper exited with unknown return code 1
Mismatch the version of im-settings-daemon.
** (gnome-session:18664): WARNING **: Cannot open display:
 

your xstartup file is seem correct.but some required files are missing or couldnot find.
therefore you must be sure installed packages called xorg-x11-fonts* and xorg-x11-xfs.

at now , can you write output of below comma?

# rpm -qa|grep xorg-x11-fonts

and

# getenforce
# iptables -L
# which twm
# ls -l /usr/ share/X11/fonts/
# find / -name "75dpi" -type d

if there are `/usr/share/X11/fonts/[misc|75dpi|100dpi ...]` and then

mkdir -p /usr/X11R6/lib/X11/fonts/{100dpi,75dpi,CID,Type1,Speedo,misc}
ln -sf /usr/share/X11/fonts/75dpi /usr/X11R6/lib/X11/fonts/75dpi
ln -sf /usr/share/X11/fonts/100dpi /usr/X11R6/lib/X11/fonts/100dpi
ln -sf /usr/share/X11/fonts/misc /usr/X11R6/lib/X11/fonts/misc
ln -sf /usr/share/X11/fonts/Type1 /usr/X11R6/lib/X11/fonts/Type1
ln -sf /usr/share/X11/fonts/100dpi /usr/X11R6/lib/X11/fonts/100dpi
## and others that whatever folder as fonts type , you can link same way 

and others same way

if this process`s fails then try to add your /etc/X11/xorg.conf to below lines

    Fontpath   "/usr/share/fonts/X11/misc"
    FontPath   "/usr/share/fonts/X11/Type1/"
    FontPath   "/usr/share/fonts/X11/75dpi/"
    FontPath   "/usr/share/fonts/X11/100dpi/"

and

# service xfs restart

if there is not anything in "/usr/share/fonts/X11/, you must install xorg-x11-fonts* rpms.

after all process then retry
on server

# service vncserver restart

on client

# vncviewer :1 -FullScreen

if you get still error

try this with xstartup

#!/bin/sh
# Uncomment the following two lines for normal desktop:
#unset SESSION_MANAGER
#exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
#xsetroot -solid grey
#vncconfig -iconic &
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &
startkde &

or

 
#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
#xsetroot -solid grey
#vncconfig -iconic &
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &
startx &

or you must try TigerVNC instead of RealVNC.

regards
ygemici