Find the answer to your Linux question:
Results 1 to 2 of 2

Thread: vnc problem

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2005

    vnc problem

    I have installed Vnc server in debian server.

    I want to know how to set a new port for VNC, how to autostart VNC server at the bootup,How to check that the VNC server is running, where error logs are located

    how we can set the KDE graphical environment to be started when X server is launched.

    Pls reply !!!!!.

  2. #2
    Just Joined!
    Join Date
    Jun 2005
    berkeley, ca
    There are two ways to change the ports for your vncservers. You can specify the port when you start the server:
    vncserver :4
    This starts a server on 5904.
    Or, you can edit the config file: /etc/sysconfig/vncservers. Here is mine:

    # The VNCSERVERS variable is a list of display:user pairs.
    # Uncomment the lines below to start a VNC server on display :2
    # as my 'myusername' (adjust this to your own).  You will also
    # need to set a VNC password; run 'man vncpasswd' to see how
    # to do that.  
    # DO NOT RUN THIS SERVICE if your local area network is
    # untrusted!  For a secure way of using VNC, see
    # <URL&#58;http&#58;//>.
    VNCARGS="-geometry 1280x1024 -depth 16 -alwaysshared"
    This allows you do specify the users and ports for any number of vncservers.

    I haven't configured debian startup files, but a little research tells me that adding a link in
    Go ahead and look around in there. The startup script for vncserver (at least in redhat) is in /etc/init.d/ .

    The answer to your last questions is all in the same directory: ~/.vnc . If you look in there, you should see "xstartup". You can edit this to determine which desktop environment loads for the vncserver. For example:
    # Uncomment the following two lines for normal desktop&#58;
    # exec /etc/X11/xinit/xinitrc
    &#91; -x /etc/vnc/xstartup &#93; && exec /etc/vnc/xstartup
    &#91; -r $HOME/.Xresources &#93; && xrdb $HOME/.Xresources
    #xsetroot -solid grey
    #vncconfig -iconic &
    #xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
    startkde &
    The "startkde &" will give you a KDE environment. If you comment that, and uncomment /usr/bin/fluxbox, then you get fluxbox. I leave both in there so I can switch easily.

    When you start vncserver, it creates two files in your ~/.vnc directory, <hostname><port>.pid and <hostname><port>.log. So, if your hostname is "host" and the vnc port is 5904, you get:
    The pid file contains the process information about the server, and the log is, well, a logfile.

    Hope that helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts