Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run vncserver on Linux server

Status
Not open for further replies.

lamsf

Technical User
Jul 27, 2003
103
US
Hi,
What is the correct command to start and stop vncserver in a Redhat Linux server? I use "kill" to stop it, but I don't think it is the correct way. Can't seem to find the info in the web either.

Another question, currently, it allows only 1 vnc client to connect to the vncserver. I tried to use command "vncserver -alwaysshared", but it seems that with this command, even tho' it allows 2 clients to connect to the vnc server, both sessions are the same, i.e. they are not 2 separate individual vnc sessions to the vnc server. Is it possible that I can hv more than 2 vnc clients connect to the vnc server and all vnc clients can hv separate, independent sessions?

I hope you all can understand my questions.

Thanks a lot.
 
Hi,
Just found from the web...

To allow many vnc clients to connect to the vnc servers, use command:

vncserver :1
vncserver :2
etc

To stop the vncserver:

vncserver -kill :1
vncserver -kill :2
etc

I hope this is correct, though...
 
you may have to setup the GUI vnc as well, I don't know why, but most of the time they set vnc to a cmd prompt as default (really stupid, why vnc to cmd line when there is ssh). you will need to edit your xstartup file in $HOME/.vnc directory, the file tells you what to do.
 
Hi lamfs,

To set VNC up you need to edit the /etc/sysconfig/vncservers file to allow the multiple users connections:

VNCSERVERS="1:user1"
VNCSERVERS="2:user2"
VNCSERVERS="3:user3"

The above allows 3 different vnc sessions, each in their own environment.

You'll also need to run vncpasswd to configure a password for each user connecting.

When the Client connects using vncviewer:

yourServerIP:1 (for user1, then the PW for user1)
yourServerIP:2 (for user2, then the PW for user2)
yourServerIP:3 (for user3, then the PW for user3)


Also as w33mhz mentioned, you might want to edit $HOME/.vnc/xstartup to set the GUI interface.
Mine looks like:

#!/bin/sh

# Red Hat Linux VNC session startup script
vncconfig -nowin&
exec /etc/X11/xinit/xinitrc



You would start VNC: /etc/init.d/vncserver start

You would stop VNC: /etc/init.d/vncserver stop

Good luck
DrD
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top