LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-11-2006, 08:05 AM   #1
openbysource
Member
 
Registered: Oct 2005
Location: Rajasthan
Distribution: RHEL 4 ES
Posts: 66

Rep: Reputation: 15
starting vnc for multiple users in fedora core 4


Hi

I want to start the vnc-service at boot time for multiple users in my fedora core 4 system.
That what I did:

went into /etc/sysconfig/vncservers

and wrote this:

VNCSERVERS="1:narendra 2rakash 3:root"
VNCSERVERARGS[2]="-geometry 800x600 -alwaysshared"

and my /etc/init.d/vncserver file read like this:

#!/bin/bash
#
# chkconfig: - 91 35
# description: Starts and stops vncserver. \
# used to provide remote X administration services.

# Source function library.
. /etc/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

unset VNCSERVERARGS
VNCSERVERS=""
[ -f /etc/sysconfig/vncservers ] && . /etc/sysconfig/vncservers

prog=$"VNC server"

start() {
echo -n $"Starting $prog: "
ulimit -S -c 0 >/dev/null 2>&1
RETVAL=0
if [ ! -d /tmp/.X11-unix ]
then
mkdir -m 1777 /tmp/.X11-unix || :
restorecon /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}]}"
runuser -l ${USER} -c "cd ~${USER} && [ -f .vnc/passwd ] && vncserver :${DISP} ${VNCUSERARGS}"
RETVAL=$?
[ "$RETVAL" -ne 0 ] && break
done
[ "$RETVAL" -eq 0 ] && success $"vncserver startup" || \
failure $"vncserver start"
echo
[ "$RETVAL" -eq 0 ] && touch /var/lock/subsys/vncserver
}

stop() {
echo -n $"Shutting down $prog: "
for display in ${VNCSERVERS}
do
echo -n "${display} "
unset BASH_ENV ENV
export USER="${display##*:}"
runuser ${USER} -c "vncserver -kill :${display%%:*}" >/dev/null 2>&1
done
RETVAL=$?
[ "$RETVAL" -eq 0 ] && success $"vncserver shutdown" || \
failure $"vncserver shutdown"
echo
[ "$RETVAL" -eq 0 ] && rm -f /var/lock/subsys/vncserver
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
sleep 3
------------------------------------------------------------

Now when I issue the following command:

service vncserver start

It gives me failed message and service doesn't start.
I have given each user vnc-password also by issuing vncpasswd command for each of them.

Can anybody help me out !!

Regards
 
Old 02-11-2006, 08:55 AM   #2
openbysource
Member
 
Registered: Oct 2005
Location: Rajasthan
Distribution: RHEL 4 ES
Posts: 66

Original Poster
Rep: Reputation: 15
Hi Guys,

I somehow solved the problem by creating .vnc directory in each user's home directory and creating the xstartup file also changing the permissions of this file.
Now I gave all the three users different passwords using vncpasswd
command.
But when I access the vnc through IE browser (JAVA) the password is not accepted and the password which I had given for the first time I runned vnc-server as root is accepted for all users.
All users lend into there respective desktop but the password for all of them is same. I need that they have different password but I am not getting it.
Please if somebody can help !

Hey just now I got this file in each user's .vnc directory that is passwd.
The contents of this file are encrypted and these contents for all three users is same.
Please help!
Regards
Deependra

Last edited by openbysource; 02-11-2006 at 08:59 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
VNC on fedora core 2 psa Linux - Newbie 3 09-11-2004 12:19 AM
VNC on Fedora core 2 inventorriz Linux - Networking 7 06-21-2004 07:42 AM
Fedora Core 2 Installation using VNC dodgydodgy Fedora - Installation 2 06-20-2004 09:16 AM
VNC on Fedora Core 2 ofergal Linux - Newbie 1 06-16-2004 07:46 AM
Dual head (monitor) and multiple users setup in Fedora Core 2 the theorist Fedora 0 06-03-2004 11:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration