LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-15-2013, 10:58 AM   #1
mkesling
Member
 
Registered: Feb 2010
Posts: 31

Rep: Reputation: 0
How many vnc users on Red hat 5.0


I have an enginerring application on a Red hat 5.0 workstation.
I need several people to access and use it from pcs with vnc.
They connect using the ip address followed by a screen # so each can have there own work environment. Not all the screen numbers work. 0,2,3,4,6,8,11,12,15 work fine. Only 5 people are connected all the time. The rest connect as required. I assign each user a screen # and now I need a few more.

How do I know which screen #s to use? Are some reserved? Is there a limited number?
 
Old 02-15-2013, 11:16 AM   #2
mkesling
Member
 
Registered: Feb 2010
Posts: 31

Original Poster
Rep: Reputation: 0
More info: I tried again adding screen 5 and it worked fine this time. I dont know why it didnt last time. Can anyone give me some info on vnc rules and an idea of what considerations might be. I'm clueless and just adding users.
 
Old 02-15-2013, 11:35 AM   #3
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
Hello,

You can add more VNC sessions for users to use X of your VNC server, by creating VNC ports for them. Or even remote users can themselves connect to your system and create VNC port for themselves as :
Code:
~$ su - username
~$ vncserver -depth 24 -geometry 1280x1024
It will automatically generate a port for the user 'username'.

Further, you can check no. of existing VNC ports, including port no. under :
Code:
~$ cd /tmp/X11/.X11-unix; ls -la
It will list all lock files (e.g. X1, X4, X43... etc, where the no. is VNC port no. for corresponding user). These files get created when a new VNC port is created, so same port cannot be assigned to any other user.
By counting these files you can find total no. of VNC sessions on the machine.
Code:
~$ ls -l /tmp/X11/.X11-unix | wc -l
Moreover, I would suggest you to go to manuals of vncserver and vncconfig for more details.

Last edited by shivaa; 02-15-2013 at 11:36 AM.
 
Old 02-15-2013, 11:52 AM   #4
mkesling
Member
 
Registered: Feb 2010
Posts: 31

Original Poster
Rep: Reputation: 0
Currently after boot up we run a script containing the lines below.

vncserver :2 -geometry 1400x1000 -depth 24 -name tom
vncserver :3 -geometry 1400x1000 -depth 24 -name sam
vncserver :4 -geometry 1400x1000 -depth 24 -name wendy
vncserver :5 -geometry 1400x1000 -depth 24 -name cody
vncserver :6 -geometry 1400x1000 -depth 24 -name jesse
vncserver :8 -geometry 1400x1000 -depth 24 -name tara
vncserver :11 -geometry 1400x1000 -depth 24 -name wayne
vncserver :12 -geometry 1400x1000 -depth 24 -name harry
vncserver :15 -geometry 1400x1000 -depth 24 -name tinh

The users connect with real vnc, enter a password and a window pops up and they all go from there. It just all seems too easy. Wondering if there are limits to how many connections I can create or screen numbers I shouldn't use. Not sure why I had trouble with some screen numbers initially. I'll look at the manuals you suggest.
 
Old 02-15-2013, 12:07 PM   #5
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
As I said above, you can check number of ports (also called sessions or screens) under /tmp/X11/.X11-unix by counting no. of files. Those are lock files.
Allowing more users on your system might cause load on system, so you can restrict users for creation of anymore sessions by manually creating lock files.
 
Old 02-15-2013, 12:29 PM   #6
mkesling
Member
 
Registered: Feb 2010
Posts: 31

Original Poster
Rep: Reputation: 0
I use
ps -ef | grep vnc
to see how many and what # in use. Also kill the process id to get rid of any of them. Wasn't aware of the X11-unix in tmp. Will play with using the lock files to control access more. I read the man pages you suggested. I'm surprised at the lack of rules for using vnc. Perhaps system load is the only concern.
 
Old 02-15-2013, 07:04 PM   #7
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
The simple concept is, each user working on your system (through a VNC session), is using some part of your system resources. So load will keep increasing with number of users you will allow on your system.

As a admin, you can create such lock files, so no user will not be allowed to create new VNC session, because of presence of corresponding lock file(s) in /tmp, which they cannot delete.

On the other hand, do not kill a VNC session by killing it's corresponding process. This is not a recommended way and may lead to creation of defunct processes. Use standard way to killing a session:
Code:
~$ vncserver -kill :<port_no>
--- Example ----
~$ vncserver -kill :33
 
Old 02-15-2013, 07:05 PM   #8
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
The simple concept is, each user working on your system (through a VNC session), is using some part of your system resources. So load will keep increasing with number of users you will allow on your system.

As a admin, you can create such lock files, so no user will not be allowed to create new VNC session, because of presence of corresponding lock file(s) in /tmp, which they cannot delete.

On the other hand, do not kill a VNC session by killing it's corresponding process. This is not a recommended way and may lead to creation of defunct processes. Use standard way to kill a session:
Code:
~$ vncserver -kill :<port_no>
--- Example ----
~$ vncserver -kill :33
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
memory allocation errors on red hat 6.2 with multiple users using vnc mkesling Red Hat 2 04-17-2012 07:39 PM
memory allocation errors on red hat 6.2 with multiple users using vnc mkesling Linux - Newbie 1 04-17-2012 07:33 PM
memory allocation errors on red hat 6.2 with multiple users using vnc mkesling Linux - Virtualization and Cloud 1 04-17-2012 01:54 PM
LXer: Red Hat invites users to help create the next Red Hat Enterprise Linux LXer Syndicated Linux News 0 09-01-2011 02:30 AM


All times are GMT -5. The time now is 04:47 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration