execute shell-scripts at kde startup
hi,
how can i execute shell scripts when i log on to my fedora core 3 - system, i.e. when kde is started? with applications, i just did a ln -s /usr/bin/firefox in the directory ~/.kde/Autostart which works, but if i do the same with my shell-scripts, the script is not executed but opened in a text-editor when kde starts. thx for help in advance |
In ~/.kde/Autostart, put something like this........
Code:
cd path/to/script ./<script> Code:
cd path/to/script sh script.sh |
aehhh,
how? ~/kde/Autostart is a directory and not a configfile... should i write that to the .bashrc? thx for help |
I usually just put symlinks in the autostart directory, and that works fine. Just make sure that the file being linked to is executable, and all should be good.
Code:
jim@musicbox:~$ ls -al .kde/Autostart/ JimBass |
Alright I have done this on my system to a script located in /usr/bin but it still opens it up in a text editor.
|
Could be any type of problem. Here are the 2 that I think are the most likely.
1) Is it executable? Most things in /usr/bin are, but if you put this there yourself, it may just have read, or read/write permissions. you can find out with Code:
ls -al /usr/bin/(scriptname) Code:
/usr/bin/(scriptname) 2) Do you have the extension (if the script has one) associated with something else? I have seen Fedora Core boxes where when you try to download .rpm files, real player tries to play the .rpm as an audio file. If your script has some extension (.cgi, .exe, .*) you should check into that possibility. Peace, JimBass |
The permissions are -rwxrwxr-x.
One thing about this script is that when I view it in Nautilus it shows up as a text file not a script. How can it be changed from a text file to a script file? |
I have renamed the script to include a <.sh> on the end. Now the system sees it as a shell script but it still opens it up with a text editor.
|
Create a New -> "link to application" in the KDE context menu. Then select properties and change the name, set the working directory, and enter the script name in the execute dialog. Or press "browse" and find it that way. The main point is that there should be a <script-name>.desktop in the ~/.kde/Autostart/ directory, rather than a file link.
|
I don't use KDE, but couldn't you put something like "/path/to/script &" above the line to start KDE in your ~/.xinitrc?
|
Hi, my answer to your question is:
ad the following line to your script:#!/bin/bash so that it will look like this: #!/bin/bash your commands... and as it was said, make it executable... I hope this solves your problems, if you have not already solved them! |
All times are GMT -5. The time now is 03:25 AM. |