vncserver, rc.local, and blackbox problem

Scott I. Remick scott at sremick.net
Tue Oct 21 13:10:12 PDT 2003


Ok, for today's edition of Show Scott What Stupid Thing He Missed...

Trying to set up a dedicated VNC/ethereal server, so I'm trying to have
vncserver run from rc.local (using su to run it as a user and not root).

Ran into some path issues to make vncserver happy, which I resolved, but
for some reason blackbox won't run and it doesn't _seem_ to be paths.

Strangely enough, ethereal (which is loaded from the same ~/.vnx/xstartup
file as blackbox) DOES launch (I just have no wm). So I know that file is
being used. And if I launch vncserver manually as the user. both blackbox
and ethereal launch fine.

(for those of you wondering, I don't use fluxbox because of cosmetic
quirks, or openbox because it doesn't play nice over vnc)

Anyhow, my /etc/rc.local file is:

PATH=$PATH:/usr/X11R6/bin:/usr/local/bin
HOME=/home/ben
su ben -c "/usr/local/bin/vncserver -depth 8 -geometry 1024x768"

And /home/ben/.vnc/xstartup is currently:

#!/bin/sh

#PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/b
in:/usr/X11R6/bin:/home/ben/bin

HOME=/home/ben

[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &
/usr/X11R6/bin/ethereal &
/usr/X11R6/bin/blackbox &

(note the commented-out path declaration... that was my attempt to see if
making the path match what it is when ben is just logged in would make
blackbox happy, which it didn't).

The :1.log file only offers a vague clue. When I normally start vncserver
manually as ben, it looks like this:

21/10/03 15:28:53 Xvnc version 3.3.7 - built Oct 21 2003 11:01:44
21/10/03 15:28:53 Copyright (C) 2002-2003 RealVNC Ltd.
21/10/03 15:28:53 Copyright (C) 1994-2000 AT&T Laboratories Cambridge.
21/10/03 15:28:53 All Rights Reserved.
21/10/03 15:28:53 See http://www.realvnc.com for information on VNC
21/10/03 15:28:53 Desktop name 'X' (aaa.bbb.ccc.com:1)
21/10/03 15:28:53 Protocol version supported 3.3
21/10/03 15:28:53 Listening for VNC connections on TCP port 5901
21/10/03 15:28:53 Listening for HTTP connections on TCP port 5801
21/10/03 15:28:53   URL http://aaa.bbb.ccc.com:5801
BScreen::BScreen: managing screen 0 using visual 0x22, depth 16

But when I try and start vncserver from bootup, it looks like this:

21/10/03 15:32:22 Xvnc version 3.3.7 - built Oct 21 2003 11:01:44
21/10/03 15:32:22 Copyright (C) 2002-2003 RealVNC Ltd.
21/10/03 15:32:22 Copyright (C) 1994-2000 AT&T Laboratories Cambridge.
21/10/03 15:32:22 All Rights Reserved.
21/10/03 15:32:22 See http://www.realvnc.com for information on VNC
21/10/03 15:32:22 Desktop name 'X' (aaa.bbb.ccc.com:1)
21/10/03 15:32:22 Protocol version supported 3.3
21/10/03 15:32:22 Listening for VNC connections on TCP port 5901
21/10/03 15:32:22 Listening for HTTP connections on TCP port 5801
21/10/03 15:32:22   URL http://aaa.bbb.ccc.com:5801
BScreen::BScreen: managing screen 0 using visual 0x22, depth 8
21/10/03 15:32:32 Xvnc version 3.3.7 - built Oct 21 2003 11:01:44
21/10/03 15:32:32 Copyright (C) 2002-2003 RealVNC Ltd.
21/10/03 15:32:32 Copyright (C) 1994-2000 AT&T Laboratories Cambridge.
21/10/03 15:32:32 All Rights Reserved.
21/10/03 15:32:32 See http://www.realvnc.com for information on VNC
21/10/03 15:32:32 Desktop name 'X' (aaa.bbb.ccc.com:1)
21/10/03 15:32:32 Protocol version supported 3.3
X connection to :1.0 broken (explicit kill or server shutdown).
Gdk-ERROR **: X connection to :1.0 broken (explicit kill or server
shutdown).

It's almost as if it's getting called twice (???) and there's some sort of
collision. And/or maybe that broken connection is blackbox dying somehow.
Any advice? Thanks



More information about the freebsd-questions mailing list