LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Running vncserver at startup?? (https://www.linuxquestions.org/questions/linux-server-73/running-vncserver-at-startup-655667/)

syntacticalerror 07-14-2008 10:40 AM

Running vncserver at startup??
 
to all,

So here is the situation:

As of now, if i want to vnc into the console of my linux box......

1) I first must log into the box and invoke vncserver command so xvnc process starts.
2) Then from vncviwer from another box make connection with IP:0(0for console)
3) Dialog opens on vncserver box and i need to confirm.


I want to eliminate steps 1 & 3......
I noticed that Vncserver script is located in /etc/init.d, so i thought since the vncserver script starts a xvnc process, i naturally added vncserver to startup by using Chkconfig. However, even with vncserver added to runlevels 2-5 at startup, no xvnc processes are started.

I know i can accomplish by using Inetd or Xinetd, but i really want to know why this method doesn't seem to work. My xstartup script starts xvnc so why does the vncserver script therefore not start xvnc? thx

tredegar 07-14-2008 11:14 AM

I start a vnc server on my server by putting the following commands into /etc/rc.local so it is started at boot, and then just keeps running.

Code:

# Start a vnc server for tredegar
su - tred -c "cd /home/tred/ && vncserver :1 -geometry 1024x768 -depth 24" 2>/dev/null &

Note that the server is started as my username, not root's.
Then I can connect to it with vncviewer server:1

syntacticalerror 07-15-2008 09:08 AM

thx for the prompt reply, i'm going to have to try that later, right now i just have vncserver start for the specific account by editing /etc/sysconfig/vncservers. I am able to log in fine, however, the environments amongst the connected accounts are inconssitent, eg some with different geometry.

Since as of now i cannot find where to config vncserver to start the corrosponding XVNCs at certain specs, your method is more precise. During init, vncserver sets up the XVNCs for the accounts.......are these setup under root or the associated accounts?


All times are GMT -5. The time now is 04:22 PM.