• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

[SuSE 9.1] vnc via Xinetd, xstartup-Problem

Hallo Ihr,

hab mich seit langem wieder mal an vnc über xinetd versucht.

Dabei habe ich die tolle Anleitung hier abgearbeitet, es funktioniert auch soweit alles: vnc startet, vnc-Authentication kommt, Session+Prozeß wird gestartet - nur ist dann das allseits bekannte graue Fenster mit dem Kreuz zu sehen.

Also wird xstartup nicht gestartet, was aber seltsam ist, da es sehr wohl startet, wenn ich den Vncserver manuell anstarte.

User soll root sein, er hat alles in seinem home (.vnc;vncpasswd, xstartup)


das ist die /etc/init.d/vncserver:
Code:
#! /bin/sh
#
# Author: Guenther Zander <g.zander@hamburg.de>
#
# /etc/init.d/vncserver         this Script
# /usr/sbin/rcvncserver         Root-Link to this Script
# /usr/X11R6/bin/vncserver      Program
#
#
### BEGIN INIT INFO
# Provides: vncserver
# Required-Start: $remote_fs $syslog
# Required-Stop:  $remote_fs $syslog
# Default-Start:  3 5
# Default-Stop:   0 1 2 6
# Description:    Start vncserver for remote control
#
### END INIT INFO

# test -r /etc/rc.config && . /etc/rc.config

PATH=$PATH:/usr/X11R6/bin
LOGNAME=root
export LOGNAME
USER=root
export USER

# Geometry der Clientrechner
# GEO=" -geometry 1024x768" # Fullscreen
# GEO=" -geometry 796x576" # Default
GEO=" -geometry 800x640" # Eigene Auswahl


# Check for missing binaries
FOO_BIN=/usr/X11R6/bin/vncserver
test -x $FOO_BIN || exit 5

# Set HOME of Root-User
HOME="/root"
export HOME

# Set ID for Connections
FOO_ID=1
# Shell functions sourced from /etc/rc.status:
#      rc_check         check and set local and overall rc status
#      rc_status        check and set local and overall rc status
#      rc_status -v     ditto but be verbose in local rc status
#      rc_status -v -r  ditto and clear the local rc status
#      rc_failed        set local and overall rc status to failed
#      rc_failed <num>  set local and overall rc status to <num><num>
#      rc_reset         clear local rc status (overall remains)
#      rc_exit          exit appropriate to overall rc status
#      rc_active        checks whether a service is activated by symlinks
. /etc/rc.status

# First reset status of this service
rc_reset

# Return values acc. to LSB for all commands but status:
# 0 - success
# 1 - generic or unspecified error
# 2 - invalid or excess argument(s)
# 3 - unimplemented feature (e.g. "reload")
# 4 - insufficient privilege
# 5 - program is not installed
# 6 - program is not configured
# 7 - program is not running
#

case "$1" in
    start)
        echo -n "Starting Vnc-Server with Terminal-ID $FOO_ID "

        # Delete old PIDs
        rm -f $HOME/.vnc/$HOSTNAME:$FOO_ID.pid

        if [ -e $HOME/.vnc/$HOSTNAME:$FOO_ID.log ]; then
           cat $HOME/.vnc/$HOSTNAME:$FOO_ID.log >> /var/log/vncserver.log 2>&1
           rm -f $HOME/.vnc/$HOSTNAME:$FOO_ID.log
        fi
        $FOO_BIN $GEO :$FOO_ID 2>&1
        rc_status -v6
        ;;
    stop)
       echo -n "Shutting down Vnc-Server "
       $FOO_BIN -kill :$FOO_ID 2>&1

       cat $HOME/.vnc/$HOSTNAME:$FOO_ID.log >> /var/log/vncserver.log 2>&1
       rm -f $HOME/.vnc/$HOSTNAME:$FOO_ID.log

       rc_status -v2
      ;;
    restart)
        $0 stop
        $0 start
        rc_status
        ;;
    status)
        echo -n "Checking for service Vnc-Server on Terminal-ID $FOO_ID: "
        ## Check status with checkproc(8), if process is running
        ## checkproc will return with exit status 0.

        # Return value is slightly different for the status command:
        # 0 - service running
        # 1 - service dead, but /var/run/  pid  file exists
        # 2 - service dead, but /var/lock/ lock file exists
        # 3 - service not running

        # NOTE: checkproc returns LSB compliant status values.
        checkproc $FOO_BIN
        rc_status -v
        ;;
    *)
        echo "Usage: $0 {start|stop|status|restart}"
        exit 1
        ;;
esac
rc_exit

das die /etc/xinetd.d/vnc
Code:
# default: off
# description: This serves out a VNC connection which starts at a KDM login \
#       prompt. This VNC connection has a resolution of 1024x768, 16bit depth.
service vnc1
{
        port = 5901
        bind = 192.168.1.2
        socket_type = stream
        protocol = tcp
        user = root
        server = /usr/X11R6/bin/Xvnc
        server_args = :42 -inetd -once -query localhost -geometry 1024x768 -depth 16 -desktop X -auth /root/.Xauthority -rfbwait 120000 -rfbauth /root/.vnc/passwd -fp /usr/X11R6/lib/X11/fonts/misc:unscaled,/usr/X11R6/lib/X11/fonts/local,/usr/X11R6/lib/X11/fonts/75dpi:unscaled,/usr/X11R6/lib/X11/fonts/100dpi:unscaled,/usr/X11R6/lib/X11/fonts/Type1,/usr/X11R6/lib/X11/fonts/URW,/usr/X11R6/lib/X11/fonts/Speedo,/usr/X11R6/lib/X11/fonts/truetype,/usr/X11R6/lib/X11/fonts/uni,/usr/X11R6/lib/X11/fonts/CID
        type = UNLISTED
        wait = no
        instances = 5
        only_from = 127.0.0.1 192.168.1.2 192.168.1.10 192.168.1.20 192.168.1.30
}
# default: off
# description: This serves out a VNC connection which starts at a KDM login \
#       prompt. This VNC connection has a resolution of 1280x1024, 16bit depth.
service vnc2
{
        port = 5902
        socket_type = stream
        protocol = tcp
        user = peter
        server = /usr/X11R6/bin/Xvnc
        server_args = :42 -inetd -once -query localhost -geometry 1024x768 -depth 16
        type = UNLISTED
        wait = no
        disable = yes
}
# default: off
# description: This serves out a VNC connection which starts at a KDM login \
#       prompt. This VNC connection has a resolution of 1600x1200, 16bit depth.
service vnc3
{
        type            = UNLISTED
        port            = 5903
        socket_type     = stream
        protocol        = tcp
        wait            = no
        user            = nobody
        server          = /usr/X11R6/bin/Xvnc
        server_args     = :42 -inetd -once -query localhost -geometry 1600x1200 -depth 16
        disable         = yes
}
# default: off
# description: This serves out the vncviewer Java applet for the VNC \
#       server running on port 5901, (vnc port 1).
service vnchttpd1
{
        disable         = yes
        socket_type     = stream
        protocol        = tcp
        wait            = no
        user            = nobody
        server          = /usr/X11R6/bin/vnc_inetd_httpd
        server_args     = 1024 768 5901
        type = UNLISTED
        port = 5801
}
# default: off
# description: This serves out the vncviewer Java applet for the VNC \
#       server running on port 5902, (vnc port 2).
service vnchttpd2
{
        type            = UNLISTED
        port            = 5802
        socket_type     = stream
        protocol        = tcp
        wait            = no
        user            = nobody
        server          = /usr/X11R6/bin/vnc_inetd_httpd
        server_args     = 1280 1024 5902
        disable         = yes
}
# default: off
# description: This serves out the vncviewer Java applet for the VNC \
#       server running on port 5902, (vnc port 3).
service vnchttpd3
{
        type            = UNLISTED
        port            = 5803
        socket_type     = stream
        protocol        = tcp
        wait            = no
        user            = nobody
        server          = /usr/X11R6/bin/vnc_inetd_httpd
        server_args     = 1600 1200 5903
        disable         = yes
}
Das die ~/.vnc/xstartup
Code:
#!/bin/sh

xrdb $HOME/.Xresources
xsetroot -solid grey
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
icewm &
icewmbg &

... nun weiß ich nicht mehr richtig weiter ... Ihr vielleicht?

Gruß
KB
 
Oben