LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 08-28-2006, 10:43 PM   #1
Micro420
Senior Member
 
Registered: Aug 2003
Location: Berkeley, CA
Distribution: Mac OS X Leopard 10.6.2, Windows 2003 Server/Vista/7/XP/2000/NT/98, Ubuntux64, CentOS4.8/5.4
Posts: 2,986

Rep: Reputation: 45
setting up vncserver for different users


I have a main computer and I would like users to VNC into it so that they can have the graphical desktop.

The VNC software is installed and running fine, however, I would like joe to have his own vncserver display. I would like jane to have her own vncserver display. And I would like tom, dick, and harry to have their own vncserver display. How can I set this up for them, under their accounts? Currently I created a "global" vnc user and created displays :1-9, all the with the same password. As you can see, if a user forgot his or her display, they would end up on another person's desktop!

Also, how do I set it so that the vncserver will start itself when the computer boots up? Imagine if a power outage happened and I rebooted the computer. Vncserver should start itself, ideally under each user's account.

Last edited by Micro420; 08-28-2006 at 10:44 PM.
 
Old 08-29-2006, 10:18 AM   #2
Quigi
Member
 
Registered: Mar 2003
Location: Cambridge, MA, USA
Distribution: Ubuntu (Dapper and Heron)
Posts: 377

Rep: Reputation: 31
To summarize, your users have separate displays, and you want them to have separate passwords. They will still all be running under your user ID, i.e., in a shell in an xterm, they can do anything you could (including setting everyone's VNC passwords). Is that what you want?

According to man vnc, the password is in $HOME/.vnc/passwd; so you need vary $HOME. I'd set up some directory VNC where they live, e.g., assuming bash,
Code:
export VNC=~/vnc
mkdir $VNC/{,joe,jane,tom,dick,harry}
Then you can start them up like this,
Code:
HOME=$VNC/joe vncserver :1
HOME=$VNC/jane vncserver :2
HOME=$VNC/tom vncserver:3
And so on. The first time it will ask you for passwords, which you can all make different. Or you could set them first using vncpasswd (supplying the same fake HOME).

I'm not sure what's the best technique to have it always available, and I haven't done this.

In man Xvnc, read the section on usage with inetd -- it might solve your needs, without actually starting vncserver when the computer boots. I'd try that first, because apparently it's supposed to work this way.

To have some service running whenever my computer is up, I generally use daemontools. It supervises the program and restarts it if it accidentally dies. But I haven't done this with vncserver.

Yet another approach would be to write a new script in /etc/init.d (take an existing script as template) and symlink it to the appropriate /etc/rc?.d. Beware that those scripts are executed by root (at startup), and you will want to run the vncserver as a harmless user. You could even create separate Unix users for Joe, Jane etc.
 
  


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
Robust vncserver startup file (rc.vncserver) arobinson74 Slackware 4 05-14-2005 05:33 AM
Setting up Nethack for users TidyKiller Linux - Games 0 08-12-2004 10:07 PM
setting up users matt412 Linux - Newbie 2 07-10-2004 09:12 AM
Setting Up Users in APOP hubergeek Linux - Networking 2 05-01-2002 11:27 AM
Xwindows setting for VNCserver? pmlabrier Linux - General 2 12-19-2000 12:25 PM


All times are GMT -5. The time now is 11:28 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration