LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 10-27-2010, 03:27 PM   #1
ortizmj
LQ Newbie
 
Registered: Oct 2010
Distribution: RH/Ubuntu
Posts: 5

Rep: Reputation: 0
Starting VNC upon boot-up using specific user


So right now VNC is starting a session using :1. When I connect to that session, the terminal is logged in as root. I'd like for the terminal to be logged in as a different user as some of my end users are going to be using this and don't require such privileges. I found that I can "su" to a different user and start a new VNC daemon on :2 and when I connect to that session, the terminal is logged in as that user. What I want to do is get that to run at boot-up.

Any help in this matter is greatly appreciated!
 
Old 10-27-2010, 03:36 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
Well firstly VNC is awful. I'd personally suggest avoiding it like the plague. Try nx instead, at nomachine.org, it's great.

as for what you're actually asking, you're already doing it if you're su-ing... just add that command to /etc/rc.local
 
Old 10-29-2010, 12:01 PM   #3
ortizmj
LQ Newbie
 
Registered: Oct 2010
Distribution: RH/Ubuntu
Posts: 5

Original Poster
Rep: Reputation: 0
I've heard of NX before, but have yet to check it out. I will though... As for this problem though, I'm on a deadline and would like to just get VNC working haha.

I'm not quite sure I follow what you're saying though. What command should I add to /etc/rc.local? I've tried:
Code:
su user; vncserver :2
I've testing the command and it'll su to the user account, but until I type "exit," it won't run the vncserver command - and even then it starts that display using the root account again.
 
Old 10-29-2010, 12:20 PM   #4
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
Code:
su - $USER -c "vncserver :2"
 
1 members found this post helpful.
Old 10-29-2010, 12:30 PM   #5
ortizmj
LQ Newbie
 
Registered: Oct 2010
Distribution: RH/Ubuntu
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks pwc101! Not that you don't know, but in case anybody else comes across this thread and needs help...that worked like a charm!
 
  


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
Kill specific vnc user from joint session jo4 Linux - Newbie 1 05-07-2011 04:08 AM
starting tomcat as a specific user kidswipe Linux - General 1 08-24-2007 12:57 AM
starting vnc at boot Seawolf1 Linux - Newbie 7 01-31-2007 05:38 AM
Starting processes as a specific user? Loonyjuice Linux - Newbie 6 01-04-2007 03:17 AM
Starting programs at boot (RedHat specific?) damion Linux - General 1 12-18-2001 07:33 AM


All times are GMT -5. The time now is 09:56 AM.

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