Announcement

Collapse
No announcement yet.

vnc gives shows an xterm window, but not the desktop

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

    vnc gives shows an xterm window, but not the desktop


    I am setting up vnc so I can working on my primary desktop from other PCs on my LAN. I installed vnc4server on my primary and xtightvncviewer on my laptop. When I run vnc from the laptop, a window comes up that should be the desktop window and it contains one window in it. The inner window looks like an xterm window and it has a shell prompt in it. I can run shell commands in the window on my primary PC. My problem is that what should be a desktop window does not show the task bar nor can I right click in the window to bring up a menu as would be able to do if I was really on the desktop.

    Do I have to run the server or viewer with particular options to get the full features of the desktop in the vnc viewer? I used vnc a while back, maybe 5 years ago, and I don't remember having to run any special options to have the desktop come up as expected.

    And suggestions are appreciated.

    Jim Anderson

    #2
    Re: vnc gives shows an xterm window, but not the desktop

    hi. You need to edit .vnc/xstartup and change 'startx' to 'startkde'. If you don't want the terminal started, comment out the 'xterm' line.
    Registered Linux user #346571

    Comment


      #3
      Re: vnc gives shows an xterm window, but not the desktop


      Thank you for the pointer. I thought it would be easy once I saw your post, but I'm still having problems.
      When I bring up the vncviewer, I'm currently getting a blank window that is running X. The window has the
      'X' cursor, but no windows in it.

      I'm running vnc4server on my host using the command:

      vncserver :2

      and below is the xstartup script that is in my /root/.vnc/xstartup file:

      #!/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 &



      At this point, I'm confused as to the purpose of the xstartup script. It appears to me that the purpose of the script is to start up some sort of process, e.g. gnome, kde or xterm. But I don't really want to start a new process, I want to see the KDE desktop that is already running on my host PC. It has been several
      years since I used VNC, but I seem to remember the default mode was to share the X display running on the host.

      Comment


        #4
        Re: vnc gives shows an xterm window, but not the desktop

        I don't think you can share the current session using VNC. It always starts a new a session. Perhaps someone else with more knowledge can chime in on that?

        Also, you should probably not VNC into your system as root. A better idea is to go in as 'user' and su to root.

        To start KDE in VNC, I believe you also have to comment out the two lines

        Code:
        unset SESSION_MANAGER
        exec /etc/X11/xinit/xinitrc
        Registered Linux user #346571

        Comment


          #5
          Re: vnc gives shows an xterm window, but not the desktop


          I will have to double check with an old friend about how we used vnc.

          I agree about not running VNC as root. I only did that because of an article I read on the internet about getting VNC running. I was trying to mimic what they had done. I'm back to running as user. Thanks for commenting on that.

          You are right about commenting out the 'exec /etc/X11/xinit/xinitrc'. If this is not commented out,
          then xinitrc gets executed and the rest of the xstartup shell script never gets run. Unfortunately,
          when I comment the lines out, startkde runs and I get memory corruption messages:

          *** glibc detected *** ksplashx: double free or corruption (out): 0x09fe9480 ***
          ======= Backtrace: =========
          /lib/tls/i686/cmov/libc.so.6[0x248ff1]
          /lib/tls/i686/cmov/libc.so.6[0x24a6f2]
          /lib/tls/i686/cmov/libc.so.6(cfree+0x6d)[0x24d79d]
          /usr/lib/libX11.so.6[0x497669]
          ksplashx[0x8057871]
          ksplashx[0x805a8df]
          ksplashx[0x804a7f5]
          /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6)[0x1f4b56]
          ksplashx[0x804a631]
          ======= Memory map: ========
          00110000-00112000 r-xp 00000000 08:04 4872 /lib/tls/i686/cmov/libdl-2.10.1.so
          00112000-00113000 r--p 00001000 08:04 4872 /lib/tls/i686/cmov/libdl-2.10.1.so
          00113000-00114000 rw-p 00002000 08:04 4872 /lib/tls/i686/cmov/libdl-2.10.1.so
          00114000-00118000 r-xp 00000000 08:04 7858 /usr/lib/libXdmcp.so.6.0.0
          00118000-00119000 rw-p 00003000 08:04 7858 /usr/lib/libXdmcp.so.6.0.0
          00125000-00141000 r-xp 00000000 08:04 9785 /lib/libgcc_s.so.1
          00141000-00142000 r--p 0001b000 08:04 9785 /lib/libgcc_s.so.1


          I have experimented some but I have not been able to run startkde without getting the
          corruption. If anyone can help me with this, I would appreciate it. Otherwise, my next step
          is going to be to try a different vnc server. I'm currently using vnc4server.

          Jim

          Comment


            #6
            Re: vnc gives shows an xterm window, but not the desktop

            try vino the vnc server that comes w/ ubuntu
            Mark Your Solved Issues [SOLVED]
            (top of thread: thread tools)

            Comment


              #7
              Re: vnc gives shows an xterm window, but not the desktop

              Another good one is TightVNC.
              Registered Linux user #346571

              Comment


                #8
                Re: vnc gives shows an xterm window, but not the desktop

                Try Vino is an exelent remote desktop software compatible with windows

                -------------------
                linux ubuntu

                Comment

                Working...
                X