Find the answer to your Linux question:
Results 1 to 7 of 7
I'm relatively new to linux and am having trouble accessing my desktop remotely via vnc. The PC dual-boots Win XP and Debian and I can connect to the unit when ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2006
    Location
    NE Ohio
    Posts
    7

    Can't connect to vnc server -- locks up server


    I'm relatively new to linux and am having trouble accessing my desktop remotely via vnc. The PC dual-boots Win XP and Debian and I can connect to the unit when it's running Windows and vnc. On the linux side I'm running Debian Sarge 3.1 (kernel 2.6.8-2-686), KDE3.3, XFree86 4.0.3.1.

    When I try to connect (from inside my subnet), I get prompted for the password, which I key in, then I get the vnc viewer screen, but it's all black. Meanwhile, at this point the x-server is completely frozen.

    I've loaded vnc4server version 4.0 and it's installed as a module in XFree86.
    Code:
    Section "Module"
       ...
       Load "vnc"
    EndSection
    Section "Screen"
       ...
       Option "SecurityTypes" "VncAuth"
       Option "UserPasswdVerifier" "VncAuth"
       Option "PasswordFile" "/root/.vnc/passwd"
    EndSection
    Code:
    mycomputer: locate vnc.so
    /usr/X11R6/lib/modules/extensions/vnc.so
    The vnc log file looks like this...
    Code:
    cat ~/.vnc/mycomputer\:1.log
    
    Xvnc version 4.0 - built Jan 22 2005 17:23:07
    Underlying X server release 40200000, The XFree86 Project, Inc
    
    
    Tue Sep  5 22:10:33 2006
     vncext:      VNC extension running!
     vncext:      Listening for VNC connections on port 5901
     vncext:      created VNC server for screen 0
    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/Speedo/, 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!
    Option --login is no longer supported in this version of gnome-terminal; you might want to create a profile with the desired setting, and use the new --window-with-profile option
    
    (gnome-terminal:4483): Gdk-CRITICAL **: gdk_gc_get_colormap: assertion `GDK_IS_GC (gc)' failed
    Window manager warning: Log level 32: could not find XKB extension.
    A couple things about this confuse me:
    1. It says it's running on port 5901, but if I try to connect on "mytcpip:1" I get a "Connection refused" message, whereas connecting on "mytcpip" correctly prompts me for a password, and appears to validate it, taking me to the full-screen, albeit a plain black one.
    2. It says it's running for screen 0, but I thought the local display would be screen 0, and vnc would grab screen 1.

    xstartup looks like this:
    Code:
    #!/bin/sh
    
    [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
    xsetroot -solid grey
    vncconfig -iconic &
    x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
    x-window-manager &
    Any help would be appreciated!

    --Bryan

    Oh, yeah. I've set "Enable=true" in the [Xdmcp] section of my /etc/kde3/kdm/kdmrc file and left the rest at default.

  2. #2
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    Location
    The Sovereign State of South Carolina
    Posts
    4,628
    Don't know if this is the answer but I would try changing .vnc/xstartup from where it says "x-window-manager" to your prefered windows manager or desktop. It could be "gnome-session" or "icewm-session" or "twm" or whatever you prefer. A few xstartups I presently have that work...
    Code:
    #!/bin/sh
    
    xrdb $HOME/.Xresources
    xsetroot -solid grey
    xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
    twm &
    Code:
    #!/bin/sh
    
    xrdb $HOME/.Xresources
    xsetroot -solid grey
    xterm -geometry 64x48+9+9 -ls -title "$VNCDESKTOP Desktop" &
    icewm-session &
    Maybe this will help some too...

    Edit: The above edits to xstartup would only matter if you were connecting to the :1 instance of VNC. Since you have set your XF86Config for logging in to the :0 instance it won't matter. You'll be logging in to whatever desktop you presently run on that machine. I'm going to try and look into this some more. Meanwhile, maybe try editing for your preferred windows manager in xstartup and see if you can log into that with ":1". Might be a step closer. Sorry I couldn't help more...
    Last edited by Dapper Dan; 09-06-2006 at 03:43 AM.
    Linux Mint + IceWM Registered:#371367 New Members: click here

  3. #3
    Just Joined!
    Join Date
    Apr 2006
    Location
    NE Ohio
    Posts
    7
    Thanks for the idea. Unfortunately, changing "x-window-manager &" to "kdm &" didn't appear to make any difference.
    The above edits to xstartup would only matter if you were connecting to the :1 instance of VNC. Since you have set your XF86Config for logging in to the :0 instance it won't matter. You'll be logging in to whatever desktop you presently run on that machine.
    Is there a how-to for configuring it for the :1 instance? If I configure vnc to run out of inetd, would I remove the changes to XFree64 config? I wasn't certain that the vnc4server I installed could necessarily be run from inetd.

    P.S. I had previously installed x11vnc, and was able to start that manually after logging on. Trouble is, I really want to be able to have vnc start automatically and allow me to log in via the vnc session.

    --Bryan

    Edit: If I log in and issue "vnc4server" from a terminal window I can connect to "mycomputer:1", but all I get is a grey screen & X cursor. Also, I can still issue X11vnc, and take control of the active session, but that's not really what I'm after.

  4. #4
    Just Joined!
    Join Date
    Apr 2006
    Location
    NE Ohio
    Posts
    7
    Update: Once I log on my xserver I can issue a "vncserver" command. This attaches to display :1. When I vnc into "myip:1" I get a single terminal window and it says I'm signed on as myself.

    My ~/.vnc/xstartup looks like this:
    Code:
    #!/bin/sh
    
    xrdb $HOME/.Xresources
    xsetroot -solid grey
    xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
    
    /usr/bin/kdm &
    How can I get to a logon screen? And how can I get it to load automatically?

    --Bryan

  5. #5
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    Location
    The Sovereign State of South Carolina
    Posts
    4,628
    Hi bryan64,

    I keep reading over your post hoping I can give you some direction, but some of the things you are doing I'm not familiar with. Maybe if I just tell you what I do to get connected, that will hopefully in some way turn a light on for you...

    You've got your XF86Config edited where you can connect to the :0 instance of the vncserver, the desktop as it appears on the server machine when you sit at its monitor. By default, vnc connects to the :1 instance which usually logs you in to twm or another minimal windows manager. Maybe what you've been seeing is a minimal windows manager's background when you log in. To find out, re-connect and right click on that gray screen and see if a menu of some sort pops up. Gray is the default background color as defined in your .vnc/xstartup.

    Provided the vncserver is running, and port 5900 is not blocked by either machine, I log in to the server's IP. From the command line as regular user:
    Code:
    vncviewer 192.168.1.106:0
    The IP is the static IP I've given for the server machine. The :0 at the end is the instance of X I'm wanting to sign in to. I can also log into :1 which is also useful...
    Code:
    vncviewer 192.168.1.106:1
    Another thing to experiment with is logging in to your vncserver with your java enabled web browser. This is handy for getting into the server machine from any java enabled browser anywhere as long as your router forwards ports 5900 (vnc) and 5800 (java) to the vncserver machine. Just for now let's do it from within your network. Open your browser and type into the address window:
    Code:
    http://192.168.1.106:5801
    (Of course, change the IP above to what your server's IP actually is.)

    This will log you into :1. A box will come up with "1" at the end of the IP address. Back that out and change it to a "0." Press enter and it will ask for the vnc password. Enter it and press enter and you will have the server's desktop in your browser.

    By the way, I also noticed where you edited your XF86Config to point to root's password for VNC. I'd change that to point to the server's "regular user" vnc password since you started vnc as regular user and not as root. So it would instead be...
    Code:
      Option "PasswordFile" "/home/the_server's_regular_user's/.vnc/passwd"
    This may not be the "official" way of doing things, but it works for me. I hope something I've posted here will help. Sorry I couldn't provide you with more specific solutions...

    Dapper
    Last edited by Dapper Dan; 09-08-2006 at 01:22 PM.
    Linux Mint + IceWM Registered:#371367 New Members: click here

  6. #6
    Just Joined!
    Join Date
    Apr 2006
    Location
    NE Ohio
    Posts
    7
    Well, I'm not having any problems running the viewer. I can connect to all my windows systems, and I can connect to the linux one when I manually start the vnc server. How are you starting the vnc server? Inet.d? XF86Config-4? Are both required? I'd prefer having it listen on display :1 instead of :0, but I'm not finding much help in configuring it to run.
    --Bryan

  7. #7
    Just Joined!
    Join Date
    Apr 2006
    Location
    NE Ohio
    Posts
    7
    Two steps forward, one step back. Ok. I've uninstalled, removed all traces of, and re-installed vnc4server.

    At present, if I log on as my_id, start xterm and key "vncserver :2" I can vnc into this_machine:2 and get a separate session with kde & everything. However, I can't get it to work properly automatically.

    I've got the following in inetd.conf...
    5901 stream tcp nowait my_id /usr/bin/Xvnc Xvnc -inetd -once -geometry 800x600 -rfbauth /home/my_id/.vnc/passwd

    But when I connect to this machine:1, I just get the grey background and "X" cursor. Note that it *does* validate my password, I just can't do anything. It's like it's not finding the xstartup file or something.

    --Bryan

Posting Permissions

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