Jump to content

running script on startup


Recommended Posts

This is a simple questionn that i cant seem to find an answetr to. I have a script to setup and initialise a netwqork dhcp and nat that i want to load everytime root logs in. I know this can be done by using the bashrc file but how do i edit it to load a script called vm_subnet.

Im sorry to ask this but i tried a search and couldnt find anything relevant.

Link to comment
Share on other sites

Hi,

 

There is a place for this in kde, put the script in /root/.kde/Autostart/. Of course, you need to have root log in to kde to get it to run. If you want it to run from a terminal, you can add to /root/.bashrc and then put it into the background.

 

/path/to/file/vm_subnet &

 

You have to make sure it is executable for this (chmod u+x vm_subnet ), you could source it instead:

 

source /path/to/file/vm_subnet &

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...