Find the answer to your Linux question:
Results 1 to 7 of 7
I got my VNC up and running, but is there a way to make it a service that restarts itself upon boot? For example, I install or update something remotely ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2007
    Posts
    9

    Question about VNC


    I got my VNC up and running, but is there a way to make it a service that restarts itself upon boot? For example, I install or update something remotely that requires a reboot and I go ahead and do that, is there a way that I could log back in to VNC after the system is done rebooting?

  2. #2
    Linux User DOllaBillz217's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    263
    You can probably make it boot by putting something like "chkconfig vncserver on" in your rc.local file. Not sure if this is the exact syntax you would use, but I know rc.local it where you place startup scripts and things similar
    $Billz

    How much wood would a wood chuck chuck if a wood chuck could chuck wood? None they eat plants!

    Dell Optiplex GX260, LTSP Diskless Workstation, Fedora Core 6

  3. #3
    Just Joined!
    Join Date
    Jun 2007
    Posts
    9
    Thank you for your response.

    I have several users on my system and was wondering if the syntax could be expanded to start a VNC server under a particular user. At the moment I haven't found the exact syntax to start the server in the rc.local file, but as it is, even if I did figure it out with something simple like that I am afraid it will start a VNC server under the root user and I do not want to give my VNC users access to root.

  4. #4
    Linux User DOllaBillz217's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    263
    You can start the vnc server on a per user basis, but then every workstation would have to be a vnc server. It is more common to have the vnc server running on the actual server than have it done on a per user basis, but that is also just my setup not everyone because I use LTSP (diskless workstations) so the workstations connect to the server for everything. To answer the question about expanding the syntax, I dont believe you would have to expand it any further, rather you would probably place it in a different location other than your rc.local because that is a system wide setting.

    Additonal comments:

    You should be able to configure the server to start in the file /etc/sysconfig/vncservers as well. This will start VNC before the login screen, before a user logs in. To get it to start put this line in the, as mentioned, /etc/sysconfig/vncservers:
    VNCSERVERS="8:ken"

    Where ken is the username

    And this command sets up the needed symbolic links under the subdirectories of /etc/rc.d:
    # chkconfig --add vncserver

    I chose to specify X server #8, so on the remote machine (or even on the local) I specifiy myhost:8 on the command line to connect.

    To better suit you I am obtaining this information from a previous post, you can look at it here http://www.linuxforums.org/forum/lin...re-5-boot.html
    $Billz

    How much wood would a wood chuck chuck if a wood chuck could chuck wood? None they eat plants!

    Dell Optiplex GX260, LTSP Diskless Workstation, Fedora Core 6

  5. #5
    Just Joined!
    Join Date
    Jun 2007
    Posts
    9
    Again thank you for your help.

    I was always planning on having them connect directly to the server, I just wanted to be able to start say... 3 VNC servers from boot, one for each user so they can directly log in to their account on the server. This way they can always access the files they need while not having access to other people's files or have root functionality.

    I think I got it though, thanks to you. Instead of the one line I would just have to add 3

    VNCSERVERS="1:example_user1"
    VNCSERVERS="2:example_user2"
    VNCSERVERS="3:example_user3"

    One last question. I am running gnome but am going to run the VNC servers on Icewm to keep the server from having to do too much work. Will I have to set up a vncserver config file for each individual user or is there a place that contains an overarching config file for vncservers? Before when I was doing my testing it seemed I had to have one in each user's home directory otherwise it would boot gnome but maybe I am missing something. Again, thank you very much for your help.

  6. #6
    Linux User DOllaBillz217's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    263
    I personally make one for each individual user, but that is just my flavor because it makes it easier for me to make changes to specific users other than system wide. You can make changes in /etc/sysconfig/vncservers and /usr/bin/vncserver. I use LTSP and diskless workstations so mine is set up differently than others so for you I would suggest running locate vnc and seeing if you can find any other vnc config files to help you since all mine are done system wide. If you need anything else feel free to contact me
    $Billz

    How much wood would a wood chuck chuck if a wood chuck could chuck wood? None they eat plants!

    Dell Optiplex GX260, LTSP Diskless Workstation, Fedora Core 6

  7. #7
    Just Joined!
    Join Date
    Jun 2007
    Posts
    9
    Thank you very much for all your help, everything is working great.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •