LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   .kde/Autostart bash scripts "file not found" (https://www.linuxquestions.org/questions/linux-software-2/kde-autostart-bash-scripts-file-not-found-200338/)

Nice-n-Slow 07-02-2004 10:58 AM

.kde/Autostart bash scripts "file not found"
 
Hi. I posted this question over at KDE-Forum and waited a week and nobody replied, so I'm trying it here.

I'm a bit confused about how to use bash scripts in the /.kde/Autostart folder. I've tried a few different ones and they all have the same problem which is that upon booting I'm greeted with a dialogue that says "file not found."

I started off with a simple bash script to set up samba shares. The scipt works fine if I fire it up in a console. I thought that perhaps part of the problem was that it required root priviledges, so I changed user and group ownership of the script from a regular user to root, but that didn't change anything.

I also tried putting the actual script in another folder like the desktop and just running a link to it from the /.kde/Autostart folder, but that didn't work either.

Well, perhaps that's a bad place for samba configs for some reason. So, next I tried putting in a script that didn't need root. This one worked just fine from a console without being root. I used a script that started the cli version of streamripper and it works from the command line no problem, but in /.kde/Autostart it gives me the same message on start up "your_script file not found".

So, these scripts work in a shell, but not in Autostart. However, I did notice something else that should be a helpful clue to someone who knows better. That is, if I put these scripts on the desktop and click them, I get the same error "your_script file not found" That being the case, I bet this is a really simple problem about executing files withinin KDE as opposed to something specific to /.kde/Autostart that somebody can explain.

jschiwal 07-02-2004 05:25 PM

Autostart scripts
 
You might want to place the mount commands someplace else. Is there a reason that you don't have the /etc/fstab entry setup to mount the shares at boot-up.

Do you need per-user granularity on the mount script? If so a .bash_profile may be a better place. Or maybe an /etc/profile script with a $USER variable in the script to give the particular user logging in exclusive control. Using the KDE Autostart to mount the smb shares means that they will not be mounted until logging in to KDE. What if the user prefers a different Desktop or doesn't use a desktop manager at all.

Anyway, if you want to use KDE Autostart, you should place the script somewhere else and install a .desktop link to the script in your Autostart folder.

From the konqueror file manager, navigate to the ~/.kde/Autostart/ directory.
Right click in this directory and select Create New -> File -> Link to application

From there create your kde link to the script file. A <scriptname>.desktop file will be created.

Another thought, it might be a good idea to include the full pathname for the smbmount command in your script.


All times are GMT -5. The time now is 09:41 PM.