Announcement

Collapse
No announcement yet.

KDE won't run under tightvncserver

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    KDE won't run under tightvncserver

    I'm trying to get tightvncserver to run on my home system. I want to be able to remote in from another location and see the KDE desktop. My home system is a fairly generic 64-bit install - aside from dual-screen I'm not doing anything fancy inside KDE.

    I've installed tightvncserver and setup a startup script as follows:

    Code:
    #!/bin/sh -e
    
    ### BEGIN INIT INFO
    # Provides: tightvncserver
    # Required-Start: networking
    # Default-Start: S
    # Default-Stop: 0 6
    ### END INIT INFO
    
    PATH="$PATH:/usr/X11R6/bin/"
    
    # The Username:Group that will run VNC
    export USER="*****"
    #${RUNAS}
    
    # The display that VNC will use
    DISPLAY="1"
    
    # Color depth (between 8 and 32)
    DEPTH="16"
    
    # The Desktop geometry to use.
    #GEOMETRY="x"
    #GEOMETRY="800x600"
    #GEOMETRY="1024x768"
    #GEOMETRY="1280x1024"
    GEOMETRY="1280x800"
    
    # The name that the VNC Desktop will have.
    NAME="homesys-vnc"
    
    OPTIONS="-name ${NAME} -depth ${DEPTH} -geometry ${GEOMETRY} :${DISPLAY}"
    
    . /lib/lsb/init-functions
    
    case "$1" in
    start)
    log_action_begin_msg "Starting tightvncserver for user '${USER}' on localhost:${DISPLAY}"
    su ${USER} -c "/usr/bin/tightvncserver ${OPTIONS}"
    ;;
    
    stop)
    log_action_begin_msg "Stopping tightvncserver for user '${USER}' on localhost:${DISPLAY}"
    su ${USER} -c "/usr/bin/tightvncserver -kill :${DISPLAY}"
    ;;
    
    restart)
    $0 stop
    $0 start
    ;;
    
    esac
    
    exit 0
    My ~/.vnc/xstartup file is:

    Code:
    #!/bin/sh
    
    # Uncomment the following two lines for normal desktop:
    unset SESSION_MANAGER
    exec /etc/X11/xinit/xserverrc
    
    [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
    [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
    xsetroot -solid grey
    vncconfig -iconic &
    xterm -geometry 80x24+50+50 -sb 1000 -ls -title "$VNCDESKTOP" &
    startkde &
    When I run the startup script the local log files contains:

    Code:
    01/02/12 14:51:39 Xvnc version TightVNC-1.3.9
    01/02/12 14:51:39 Copyright (C) 2000-2007 TightVNC Group
    01/02/12 14:51:39 Copyright (C) 1999 AT&T Laboratories Cambridge
    01/02/12 14:51:39 All Rights Reserved.
    01/02/12 14:51:39 See http://www.tightvnc.com/ for information on TightVNC
    01/02/12 14:51:39 Desktop name 'homesys-vnc' (homesys:1)
    01/02/12 14:51:39 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t
    01/02/12 14:51:39 Listening for VNC connections on TCP port 5901
    
    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 startup vncviewer on the remote machine I get a blank desktop with no window manager. Does anyone have any suggestions on how to get KDE to work here?

    Thanks,

    John

    #2
    Originally posted by jcoxen View Post
    Code:
    startkde &
    Dose startkde want to be backgrounded? Don't know about vnc startup scripts but I know xsession scripts should not return until the user wants to log out (normally by waiting for the window manager or desktop environment to return).

    Comment


      #3
      I've tried it both ways and it doesn't seem to make a difference.

      Comment


        #4
        What happens if you run the command manually? And what do you get if you echo the command in the script (remember to escape the quotes)?

        Comment


          #5
          I ran the vncserver command from the command line and the log output was exactly the same. I echoed the command in the script and it showed the following...

          Code:
          su ***** -c "/usr/bin/tightvncserver -name homesys-vnc -depth 16 -geometry 1280x800 :1"

          Comment


            #6
            OK, I figured some of it out with the help of this thread http://en.gentoo-wiki.com/wiki/XVNC_Server

            I trimmed my ~/.vnc/xstartup file down to this
            Code:
            #!/bin/sh
            /usr/bin/kwin &
            /usr/bin/startkde
            and KDE started working...sort of. KDE starts up but then locks up partway through the init screen.

            Comment


              #7
              Personally I have always liked X11VNC better. I use it many times a day (and have for years) on many computers without a problem.

              UbuntuGuide/KubuntuGuide

              Right now the killer is being surrounded by a web of deduction, forensic science,
              and the latest in technology such as two-way radios and e-mail.

              Comment


                #8
                X11vnc worked. No muss, no fuss. Thank you very much for the suggestion.

                Comment

                Working...
                X