Starting a program at startup. - Mandriva

This is a discussion on Starting a program at startup. - Mandriva ; I want to start tightvnc server at startup. How do I go about doing this? What I am trying to do is wake up on lan, I got that working, and then have the computer start tightVNC server when it ...

+ Reply to Thread
Results 1 to 11 of 11

Thread: Starting a program at startup.

  1. Starting a program at startup.

    I want to start tightvnc server at startup.

    How do I go about doing this?

    What I am trying to do is wake up on lan, I got that working, and then have
    the computer start tightVNC server when it starts up.

    thanks

    Klutzier than most.

  2. Re: Starting a program at startup.

    On 20 May 2007 23:59:38 GMT, Klutz the Clown wrote:
    > I want to start tightvnc server at startup.
    > How do I go about doing this?


    I would think you would get into the Mandriva Control Center and click
    the box next to On Boot

    > What I am trying to do is wake up on lan, I got that working, and then have
    > the computer start tightVNC server when it starts up.


    Well that is different. I would have to guess, creating a script in

    /etc/sysconfig/network-scripts/ifup.d/
    to execute the command
    service vncserver start

    and in
    /etc/sysconfig/network-scripts/ifdown.d
    to execute the command
    service vncserver stop

    when the device comes up or goes down or is restarted.

    Here is the vpn script in /etc/sysconfig/network-scripts/ifup.d
    for you to start hacking away at.

    #!/bin/sh

    if [ -r /etc/sysconfig/network-scripts/ifcfg-$1 ]; then
    . /etc/sysconfig/network-scripts/ifcfg-$1
    if [ -n "$VPN_TYPE" ] && [ -n "$VPN_NAME" ]; then
    /usr/sbin/vpn-start $VPN_TYPE $VPN_NAME
    fi
    fi

  3. Re: Starting a program at startup.

    Klutz the Clown wrote:

    > I want to start tightvnc server at startup.
    >
    > How do I go about doing this?
    >
    > What I am trying to do is wake up on lan, I got that working, and then
    > have the computer start tightVNC server when it starts up.


    You could set up the computer to log you in automatically (using
    the 'convenience' tab in KDE control centre - System Administration -->
    Login Manager --> Convenience) and then put a link to vncserver in your
    ~/.kde/Autostart directory. (Using Konqueror you would need to check "Show
    Hidden Files" in the View menu to see the .kde directory). Just putting the
    word "vncserver" on a line of its own in /etc/rc.d/rc.local ought to work,
    but you will get a root vncserver which most people will vociferously
    advise you is not a good idea (and may not be what you want anyway).

    Rob

    --
    Rob Kemp
    rpkemp@postmaster.co.uk

  4. Re: Starting a program at startup.

    Klutz the Clown wrote:

    > I want to start tightvnc server at startup.
    >
    > How do I go about doing this?
    >
    > What I am trying to do is wake up on lan, I got that working, and then
    > have the computer start tightVNC server when it starts up.
    >

    Have a look in /etc/sysconfig/vncservers

  5. Re: Starting a program at startup.

    Rob Kemp wrote:

    >
    >> I want to start tightvnc server at startup.

    >
    > You could set up the computer to log you in automatically (using
    > the 'convenience' tab in KDE control centre - System Administration -->
    > Login Manager --> Convenience) and then put a link to vncserver in your
    > ~/.kde/Autostart directory. (Using Konqueror you would need to check "Show
    > Hidden Files" in the View menu to see the .kde directory). Just putting
    > the word "vncserver" on a line of its own in /etc/rc.d/rc.local ought to
    > work, but you will get a root vncserver which most people will
    > vociferously advise you is not a good idea (and may not be what you want
    > anyway).


    What a load of rubbish.

    Benny Nielsen wrote:

    > Have a look in /etc/sysconfig/vncservers


    Much better.

    Rob

    --
    Rob Kemp
    rpkemp@postmaster.co.uk

  6. Re: Starting a program at startup.

    On Mon, 21 May 2007 16:59:40 +0200, Benny Nielsen wrote:

    > Klutz the Clown wrote:
    >
    >> I want to start tightvnc server at startup.
    >>
    >> How do I go about doing this?
    >>
    >> What I am trying to do is wake up on lan, I got that working, and then
    >> have the computer start tightVNC server when it starts up.
    >>

    > Have a look in /etc/sysconfig/vncservers


    Please let me clarify...

    I want to start up a computer from another room in my house. I have Wakeup
    on lan allready running on this computer. This computer loggs itself in
    and boots directly to a KDE desktop.

    All I need to do now is to have the VNCserver startup when I wake up the
    computer.

    Have a look in /etc/sysconfig/vncservers. I went there and there was
    nothing that I saw would turn it on when the computer booted..

    thanks for your input.

    Klutzier than most.

  7. Re: Starting a program at startup.

    On 22 May 2007 00:19:21 GMT, Klutz the Clown wrote:

    > All I need to do now is to have the VNCserver startup when I wake up the
    > computer.
    >
    > Have a look in /etc/sysconfig/vncservers. I went there and there was
    > nothing that I saw would turn it on when the computer booted..


    Your servers/service/daemons scripts in /etc/rc.d/init.d have links to
    them in the different runlevels found in /etc/rc.d/rcX.d directories.

    If you into the Mandriva Control Center and look under
    System-->Serivces you can indicate if you want the
    service/server/daemon to start On Boot or not.
    That will place the links in the /etc/rc.d/rcX.d directories
    based on the information found in the header of the scrip in
    /etc/rc.d/init.d

    So if your wake on lan is bringing up the system as a cold start, then
    vncservers will be started if you have the On Boot checked in System Services

  8. Re: Starting a program at startup.

    On Tue, 22 May 2007 00:35:13 +0000, Bit Twister wrote:

    > On 22 May 2007 00:19:21 GMT, Klutz the Clown wrote:
    >
    >> All I need to do now is to have the VNCserver startup when I wake up the
    >> computer.
    >>
    >> Have a look in /etc/sysconfig/vncservers. I went there and there was
    >> nothing that I saw would turn it on when the computer booted..

    >
    > Your servers/service/daemons scripts in /etc/rc.d/init.d have links to
    > them in the different runlevels found in /etc/rc.d/rcX.d directories.
    >
    > If you into the Mandriva Control Center and look under
    > System-->Serivces you can indicate if you want the
    > service/server/daemon to start On Boot or not.
    > That will place the links in the /etc/rc.d/rcX.d directories
    > based on the information found in the header of the scrip in
    > /etc/rc.d/init.d
    >
    > So if your wake on lan is bringing up the system as a cold start, then
    > vncservers will be started if you have the On Boot checked in System Services


    I went into MCC and looked in System-- > services and clicked the radio
    button to start at boot. I then rebooted and tried to log into the computer
    using several different VNC clients with no luck. I then went back into
    MCC and clicked on the Start button that is to the right of the on boot
    radio button. This should have started the VNCserver right away. I then
    tried to log into the computer again with no luck. I then went to the
    computer and started X0rfbserver, which is one of the programs I have on
    this computer. I then went back to the other computers and could log into
    it with all the Client VNC paackages that I have.

    I also found a post that said to go to etc/sysconfig/vncserver and edit
    this file in root. Change the name that is in "quotes" to the login name
    that starts up at boot and this will start the vncserver. This also did
    not start the server on startup.

    Thanks for the input.

    Klutzier than most.

  9. Re: Starting a program at startup.

    On 28 May 2007 19:03:15 GMT, Klutz the Clown wrote:

    > I went into MCC and looked in System-- > services and clicked the radio
    > button to start at boot. I then rebooted and tried to log into the computer
    > using several different VNC clients with no luck.


    Then I would check /var/log/messages to see if there were any messages
    about those login attempts.

    On the Mandriva vnc server, click up a terminal
    su - root

    tail -f /var/log/messages

    Now, try another connect from a remote system.


  10. Re: Starting a program at startup.

    On 28 May 2007 20:28:19 GMT, Bit Twister wrote:
    >
    > Now, try another connect from a remote system.


    Worst comes to worst, you might try putting the following in your browser:

    file:///usr/share/tightvnc/docs/index.html

  11. Re: Starting a program at startup.

    On Mon, 28 May 2007 20:37:53 +0000, Bit Twister wrote:

    > On 28 May 2007 20:28:19 GMT, Bit Twister wrote:
    >>
    >> Now, try another connect from a remote system.

    >
    > Worst comes to worst, you might try putting the following in your browser:
    >
    > file:///usr/share/tightvnc/docs/index.html


    Thanks for the offer... I did not see
    anything about starting the server at boot up... I could have overlooked
    something in that directory. There is a lot of stuff in that directory.

+ Reply to Thread