Auto start an .sh Script

I have a script file that needs to run on each boot with the following command

ctlscript.sh start

I know how to add it into the kde as a start up application I just don’t know how to add the start command and get iot to run properly :frowning:

Thank you for your help:)

Cheers!
etech97

You could create a script called abcxyz.sh that contained the line “/path_to/ctlscript.sh start” and use that instead.

The new script file is opening with emacs :frowning:

Cheers!

Not enough information :frowning:

Do you mean that when you boot (and after the login to KDE), at the point when the script ctrlscript.sh should start, emacs opens instead?

Yes, that is correct!

Cheers!

Put your script in the directory ~/.kde4/env (create this directory if needed). And make the script executable:
chmod 755 ~/.kde4/env/yourscript.sh

I assume the first line of your script looks like this:
#!/bin/bash
or like that:
#!/bin/sh
?

yes!

#!/bin/sh

Cheers!

I just created a link in the desktop folder and it is working. That will do for now…

Thanks for your help :slight_smile:

Cheers!

Please note for next time that what youwanted (and succeeded to do after advice above) is NOT on boot, but on login. This makes the solution very different.

Okay next time I’ll be much more clearer next time!

Thanks again for all of your help!!!

Cheers!
etech97

For anyone reading this thread and would like to create a script that can automatically create a autorun script for you, might want to read my thread called:

KDE Application Autostart Script: Automatically Made For You!

This is another way to do this if you are a KDE 4 user.

Thank You,