Results 1 to 8 of 8

Thread: Autostart software

  1. #1

    Default Autostart software

    How to make a software starts automatically every boot? Note that this software needs root privelliage

  2. #2
    Join Date
    Jun 2008
    Location
    The English Lake District. UK - GMT/BST
    Posts
    36,719
    Blog Entries
    20

    Default Re: Autostart software

    It would help if we had some clue as to what you had in mind?!
    Leap 15_KDE
    My Articles Was I any help? If yes: Click the star below

  3. #3
    Join Date
    Jun 2008
    Location
    Earth - Denmark
    Posts
    10,730

    Default Re: Autostart software

    caf4926 wrote:
    > It would help if we had some clue as to what you had in mind?!


    right..

    "wizardslovak", do you want it running if you boot to KDE? Gnome? neither?
    either? always?

    and, by "always" do you mean maybe you are running a headless server without
    running X??

    --
    DenverD (Linux Counter 282315)
    A Texan in Denmark

  4. #4
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,732

    Default Re: Autostart software

    Quote Originally Posted by ba_tux View Post
    How to make a software starts automatically every boot? Note that this software needs root privelliage
    Starting at boot (on reaching a particular run level) is done by scripts in /etc/init.d.

    When it is a only simple thing to do you could put a few lines in /etc/init.d/boot.local (and when you need to stop properly, also in halt.local).

    For really adding an application/deamon start/stop to your system look in the scripts in /etc/init.d for examples. The structure of the start, stop, etc. sections is important. As is the handling of return codes. And if you carefully format the comment lines in the beginning (as the examples show), you can then, after creation of the script, go to YaST > System > System Services (runlevel) and switch your app on/off there.
    Henk van Velden

  5. #5
    Join Date
    Jun 2008
    Location
    Atlanta, Georgia, USA
    Posts
    2,429

    Default Re: Autostart software

    If on the other hand you are just looking to run a program with user startup that requires root privilege, that is possible from KDE ~./kde/Autostart. (In KDE4, there is an Autostart module in Configure Desktop, btw). I once ran a script which ran several utilities which required root that way, configuring sudo for those commands only.

  6. #6

    Default Re: Autostart software

    I use KDE 3.5. I want to start macchanger automatically, so I can change my NIC's MAC automatically. I have made a script located in /etc/init.d/ named start_macchanger. Now, how to make it runs automatically every boot?

  7. #7
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,326
    Blog Entries
    15

    Default Re: Autostart software

    Quote Originally Posted by ba tux
    I use KDE 3.5. I want to start macchanger automatically, so I can change
    my NIC's MAC automatically. I have made a script located in /etc/init.d/
    named start_macchanger. Now, how to make it runs automatically every
    boot?
    Hi
    Look at the /etc/init.d/skeleton file, this is the template to use for
    these sorts of scripts to suse-fy them. Then if all is well run the
    following to turn on;

    Code:
    chkconfig <name_of_your-script> on
    --
    Cheers Malcolm (Linux Counter #276890)
    openSUSE 11.0 x86 Kernel 2.6.25.11-0.1-default
    up 14:56, 3 users, load average: 0.14, 0.25, 0.24
    GPU GeForce 6600 TE/6200 TE - Driver Version: 173.14.12


  8. #8
    Join Date
    Jun 2008
    Location
    Oklahoma, US
    Posts
    822

    Default Re: Autostart software

    On Sat, 16 Aug 2008 02:46:05 GMT
    ba tux <ba_tux@no-mx.forums.opensuse.org> wrote:

    >
    > I use KDE 3.5. I want to start macchanger automatically, so I can change
    > my NIC's MAC automatically. I have made a script located in /etc/init.d/
    > named start_macchanger. Now, how to make it runs automatically every
    > boot?
    >
    >


    Ok, script named "start_macchanger"....

    (as root)

    cd /etc/init.d
    ln -s start_macchanger rc3.d/S90_start_macchanger
    ln -s start_macchanger rc5.d/S90_start_macchanger

    This will cause it to automatically start for both runlevels 3 and 5, the
    usual runlevels where it'd be useful.

    I just realized it would likely be more useful to have changed the MAC
    *before* you set up the network and query for a dhcp lease... so the
    following would be better:

    cd /etc/init.d
    ln -s start_macchanger rc3.d/S04_start_macchanger
    ln -s start_macchanger rc5.d/S04_start_macchanger

    Since the network is brought up at S05_network... this should change the MAC
    prior to the network coming up.

    I think you're going to have issues though, as the HAL system monitors MAC
    addresses to see if you've installed any new hardware. I imagine that EVERY
    time you boot, you'll have to reinstall / reconfigure your network setup,
    since it will see new cards every time the MAC changes. Might not be pretty.

    As Malcolm mentioned, you really should use the skeleton file found
    in /etc/init.d/skeleton to create init.d scripts, as this makes them conform
    to a standard, making administration and maintenance VERY much easier.

    The file is extensively commented and very helpful.

    {Grin} I still don't think changing your MAC is going to be pretty...
    (and you'd still be findable... How's Hawaii?)

    Loni

    --
    L R Nix
    lornix@lornix.com


Posting Permissions

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