LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   99 VNC process (https://www.linuxquestions.org/questions/linux-software-2/99-vnc-process-443896/)

bjimmyb 05-11-2006 03:38 PM

99 VNC process
 
I seem to be having a few problems with VNC.

When I do a ps U root it lists 99 processes.

Obviously I'd like it to stop making so many, anybody have any idea of why its runnig the vncserver so many times and more importantly how to stop it.





sample ps U root output
// ====================================
3000 pts/21 S+ 0:00 Xvnc :21 -desktop localhost.localdomain:21
(root) -httpd /usr/share/vnc/classes -auth /root 3005 pts/21 S+
0:00 vncconfig -iconic
3006 pts/21 S+ 0:00 xterm -geometry 80x24+10+10 -ls -title
localhost.localdomain:21 (root) Desktop
3007 pts/21 S+ 0:00 twm
3009 pts/22 Ss+ 0:00 -bash
3036 pts/22 S+ 0:00 Xvnc :22 -desktop localhost.localdomain:22
(root) -httpd /usr/share/vnc/classes -auth /root 3040 pts/22 S+
0:00 vncconfig -iconic
3041 pts/22 S+ 0:00 xterm -geometry 80x24+10+10 -ls -title
localhost.localdomain:22 (root) Desktop
3042 pts/22 S+ 0:00 twm
3044 pts/23 Ss+ 0:00 -bash
3071 pts/23 S+ 0:00 Xvnc :23 -desktop localhost.localdomain:23
(root) -httpd /usr/share/vnc/classes -auth /root 3075 pts/23 S+
0:00 vncconfig -iconic
3076 pts/23 S+ 0:00 xterm -geometry 80x24+10+10 -ls -title
localhost.localdomain:23 (root) Desktop
3077 pts/23 S+ 0:00 twm
3079 pts/24 Ss+ 0:00 -bash
3106 pts/24 S+ 0:00 Xvnc :24 -desktop localhost.localdomain:24
(root) -httpd /usr/share/vnc/classes -auth /root 3111 pts/24 S+
0:00 vncconfig -iconic
3112 pts/24 S+ 0:00 xterm -geometry 80x24+10+10 -ls -title
localhost.localdomain:24 (root) Desktop
3113 pts/24 S+ 0:00 twm
3115 pts/25 Ss+ 0:00 -bash
3135 pts/25 S+ 0:00 perl /usr/bin/vncserver -geometry 1280x1024
-depth 24:9
3142 pts/25 S+ 0:00 Xvnc :25 -desktop localhost.localdomain:25
(root) -httpd /usr/share/vnc/classes -auth /root 3143 pts/8 R+
0:00 ps U root

gilead 05-11-2006 05:42 PM

How are you starting VNC? Normally you have to set up the number of VNC instances that you require. On my box I have 3. For example, my startup code is:
Code:

unset VNCSERVERARGS
VNCSERVERS="1:pkitest 2:steve 3:oracle"
VNCSERVERARGS[1]="-geometry 1152x864"
VNCSERVERARGS[2]="-geometry 1152x864"
VNCSERVERARGS[3]="-geometry 1024x768"

start() {
    echo -n $"Starting VNC server: "
    ulimit -S -c 0 >/dev/null 2>&1

    if [ ! -d /tmp/.X11-unix ]
    then
        mkdir -m 1777 /tmp/.X11-unix || :
    fi
    for display in ${VNCSERVERS}
    do
        echo -n "${display} "
        unset BASH_ENV ENV
        DISP="${display%%:*}"
        export USER="${display##*:}"
        export VNCUSERARGS="${VNCSERVERARGS[${DISP}]}"
        su - ${USER} -c "cd ~${USER} && [ -f .vnc/passwd ] && vncserver :${DISP} ${VNCUSERARGS}"
    done
}


slackjames 05-12-2006 12:10 AM

Why not use /etc/inetd.conf

vnc-xga stream tcp nowait nobody /usr/sbin/tcpd /usr/local/bin/Xvnc :1 -inetd -query localhost -geometry 1015x711 -depth 24 -once
vnc-big stream tcp nowait nobody /usr/sbin/tcpd /usr/local/bin/Xvnc :1 -inetd -query localhost -geometry 1268x967 -depth 24 -once
vnc-dul stream tcp nowait nobody /usr/sbin/tcpd /usr/local/bin/Xvnc :1 -inetd -query localhost -geometry 800x600 -depth 8 -once

and services

vnc-xga 5900/tcp # jamie added vnc
vnc-big 5901/tcp # jamie added vnc
vnc-dul 5902/tcp # jamie added vnc

Then the are none running unless they are being used.

bjimmyb 05-12-2006 11:35 AM

As far as I know I'm not even starting VNC.
I used to use it alot on Fed Core 4, but since I reinstalled (not upgraded) to FC5 I don't remember ever using it (I acquired a KVM swithch at the same time). I took a look in the service via the start bar and it shows vncserver as not being checked. However it says that its unning and listeds the pids.

bjimmyb 05-29-2006 01:54 PM

How do I kill all of these process's and stop them from restrating?

Just noticed this before all the processes start.

/bin/sh /root/.vnc/xstartup

Not sure exactly what it does, but I'm guessing that someone will.

hold_breal 09-16-2006 06:23 AM

i only use the xstartup script to change the type of desktop on the vnc session (kde, gnome etc.) and the programs it automatically starts, though i do imagine it can also be used for other things. the script in the root directory does the same thing for root, i imagine. what does the script look like on your computer? when are the sessions started? can you track back a ppid?

(you probably know this already, but to kill a vnc process, enter

vncserver -kill :21

provided you wish to kill process number 21)


All times are GMT -5. The time now is 08:57 AM.