Find the answer to your Linux question:
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 30
hi! im a newbie here.. Just wanna ask how to autorun a program everytime a turn on my pc.. It is a .c file. Hope someone can help me.. tnx ...
  1. #1
    Just Joined!
    Join Date
    Jan 2008
    Posts
    14

    Question How do i auto-run a program everytime suse boots?

    hi! im a newbie here.. Just wanna ask how to autorun a program everytime a turn on my pc.. It is a .c file.

    Hope someone can help me..

    tnx in advance..

  2. #2
    Blackfooted Penguin daark.child's Avatar
    Join Date
    Apr 2006
    Location
    West Yorks
    Posts
    4,344
    Hi,

    You can put the commands to run your program in /etc/init.d/boot.local.

  3. #3
    Linux Guru waterhead's Avatar
    Join Date
    Jul 2004
    Location
    Franklin, Wisconsin
    Posts
    4,577
    You can put a startup script in your home directory ~/.kde/Autostart

    This is useful if you need to run a program later in the boot process, like after all of the network connections and folders are started.

    It is also good if you only want the programs to start for a specific user.
    Paul

    Please do not send Private Messages to me with requests for help. I will not reply.

  4. #4
    Just Joined!
    Join Date
    Jan 2008
    Posts
    14
    sorry, just got home from a vacation so i didnt have time to chech this thread.
    Quote Originally Posted by daark.child View Post
    Hi,

    You can put the commands to run your program in /etc/init.d/boot.local.
    There is no boot.local folder. only boot.d

    Quote Originally Posted by waterhead View Post
    You can put a startup script in your home directory ~/.kde/Autostart

    This is useful if you need to run a program later in the boot process, like after all of the network connections and folders are started.

    It is also good if you only want the programs to start for a specific user.
    i cant find the folder ~/.kde in konqueror but i can access it in the terminal.
    I don't know what to do after i enter the .kde folder. When i copied the executable file to Autostart nothing happens, maybe because i need the terminal to run it? So what i did is that i copied the konsole,desktop to Autostart and when i reboot suse, the terminal boots. So now, i still dont know if what i did is right since i cant still run my program..


    BTW, the program i need to run is an executable file from a C program where the way i run it now is to open the terminal and then type the executable file.

    Thanks for the replies!

  5. #5
    Linux Guru waterhead's Avatar
    Join Date
    Jul 2004
    Location
    Franklin, Wisconsin
    Posts
    4,577
    Any file or folder that has a dot preceding it means that it is hidden. To view a hidden file, you will need to enable that in a menu of your file browser. For Konqueror, that would be View --> Show Hidden Files.

    You then can make a shell script with the commands to run your program. Need help with a shell script? Just ask. I have only done a handful of them, but I know enough to get you started.
    Paul

    Please do not send Private Messages to me with requests for help. I will not reply.

  6. #6
    Linux User peteh's Avatar
    Join Date
    Oct 2006
    Location
    UK
    Posts
    337
    When you open konqueror click 'View' on the menu bar and then 'Show hidden files'. In your Home folder you will then see '/.kde3'.
    All files and folders starting with a '.' (full stop) are hidden by default.
    Pete

  7. #7
    Blackfooted Penguin daark.child's Avatar
    Join Date
    Apr 2006
    Location
    West Yorks
    Posts
    4,344
    There is no boot.local folder. only boot.d
    There is a file called boot.local in /etc/init.d on SUSE.

  8. #8
    Just Joined!
    Join Date
    Jan 2008
    Posts
    14
    Quote Originally Posted by waterhead View Post
    Any file or folder that has a dot preceding it means that it is hidden. To view a hidden file, you will need to enable that in a menu of your file browser. For Konqueror, that would be View --> Show Hidden Files.

    You then can make a shell script with the commands to run your program. Need help with a shell script? Just ask. I have only done a handful of them, but I know enough to get you started.
    Please do help me. It will really mean a lot.

    Quote Originally Posted by daark.child View Post
    There is a file called boot.local in /etc/init.d on SUSE.
    I found it. What will i do then to run my program? Because everytime i edit boot.local it says "The document could not be saved, as it was not possible to write to file:///etc/init.d/boot.local".

  9. #9
    Linux Guru waterhead's Avatar
    Join Date
    Jul 2004
    Location
    Franklin, Wisconsin
    Posts
    4,577

    d

    Quote Originally Posted by jasonxvii View Post
    ....What will i do then to run my program? Because everytime i edit boot.local it says "The document could not be saved, as it was not possible to write to file:///etc/init.d/boot.local".
    You need to have root permissions to edit anything outside of your home folder. You can get this with the superuser (su) command.
    Code:
     su
    To make a script, you really can just type in the command that you usually enter into the terminal. Here is a learning guide for writing a bash script.

    UNIX / Linux Bourne / Bash Shell Scripting Tutorial [ steve-parker.org ]

    They start out with this line:
    #!/bin/sh

    You enter your commands and save it. Then make it executable.
    Code:
     chmod 755 <file name>
    Paul

    Please do not send Private Messages to me with requests for help. I will not reply.

  10. #10
    Blackfooted Penguin daark.child's Avatar
    Join Date
    Apr 2006
    Location
    West Yorks
    Posts
    4,344
    Quote Originally Posted by jasonxvii View Post
    Please do help me. It will really mean a lot.



    I found it. What will i do then to run my program? Because everytime i edit boot.local it says "The document could not be saved, as it was not possible to write to file:///etc/init.d/boot.local".
    You need to switch to root in order to edit that file. In that file, you simply put in the commands that you would run to start your program.

Page 1 of 3 1 2 3 LastLast

Posting Permissions

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