[NBLUG/talk] Problems with X and VNC

Mitch Patenaude mrp at sonic.net
Mon May 19 09:14:01 PDT 2003


vncserver doesn't use the stardard X startup scripts.  It uses the file 
$HOME/.vnc/xstartup.

By default, this uses a very old-fashioned window manager twm, and a 
very spartan desktop, that
includes a gray backgound.  By default it also starts up an Xterm 
though, so that at least be working.  You can modify the xstartup 
script to start Gnome or KDE, but if the Xterm isn't running, then 
chances
are that they won't work either.  A good first diagnostic step is to 
check the log file at $HOME/.vnc/<hostname>:N.log  where <hostname> is 
the name of the machine, and N is the display number assigned to it.  
Any startup error messages should appear there.

Some likely problems to check:   Make sure that you haven't hardcoded a 
value for "DISPLAY" in one of your shell rc scripts.   Check to see if 
your PATH includes /usr/X11R6/bin.  Use the error messages in the 
logfile as guidance from there.  If you can't figure it out, post the 
log file here and maybe somebody else can spot the problem.

Once you have gotten twm and the xterm to start up properly, you can 
modify the xstartup file to launch KDE or Gnome.  This is done by 
commenting out the calls to the xterm and twm, and replacing them with 
a call to startkde or startgnome.  Make sure you end the command with 
an & to put it into the background.

#!/bin/sh

xrdb $HOME/.Xresources
xsetroot -solid grey
startgnome &
# startkde &

A caveat here:  it's been my experience that having a single user with 
more than one desktop in either KDE or Gnome causes problems.  You can 
either use one in the default X server, and another in the VNC server 
or you can have the VNC server run under a different user id.   Maybe 
there is a more elegant solution, but I'm not aware of it.

There are also ways to have the entire default X server (gdm and all) 
run through vnc, but I haven't done it.  Google around and you can 
probably find some good HOWTOs.

A final practical note.  If you're actually planning to use this over 
any network slower than 100 Mbits/sec, don't use the fancy themes or 
pretty window decorations.   Simple window decorations and solid color 
backgrounds will make updates across the net MUCH faster, since it's 
simple compression scheme deals very efficiently with large areas of 
solid color, but very poorly with pictures and gradients.

    -- Mitch


On Monday, May 19, 2003, at 00:32 US/Pacific, Andrew wrote:

> Note: This is a re-posting of a message I sent through my regular
> email account about 7 hours ago. That one seems to have
> disappeared. I've noticed that SoftHome.net can be a bit dodgy at
> times, so don't be surprised if the original appears in the
> not-too-distant future. Sorry.
>
> =======================================================
>
> I'm having some problems setting up vncserver. Well, actually,
> setting up X to work with vncserver. The machine which will be
> running the server is a Debian Woody box with XFree86 3.3.6 and
> WindowMaker + Gnome. When I run "startx" from the command line, X
> starts up just fine, so my X setup seems to be OK. I've been
> running it this way for a year. A few days ago I installed the
> vncserver package and, after wrangling with a font problem for a
> short while, got the server running. The problem shows up when I
> connect to the server with vncviewer. All I get is plain X and
> nothing more. Just the standard grey background and the ugly "X"
> cursor. Nothing else... not even an Xterm. So with no pretty
> icons to click on and no terminal to type into, I'm dead in the
> water. Nothing else can happen in that window.
>
> I'm guessing the problem lies in how vncserver processes the X
> startup files. I've been looking through whatever files I can
> find that seem to control the startup of X, but since I'm only
> vaguely familiar with the process, I haven't gotten very far.
> Normally, I'd tinker with this myself a bit longer before asking
> on the list, but I'm heading out of town on Wednesday and I'd
> like to get it running before then. Can anyone give me a nudge in
> the right direction?
>
> Thanks.
>
> A.
>
> apt-get moo
> _______________________________________________
> talk mailing list
> talk at nblug.org
> http://nblug.org/mailman/listinfo/talk
>




More information about the talk mailing list