LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 07-02-2004, 10:58 AM   #1
Nice-n-Slow
LQ Newbie
 
Registered: May 2004
Posts: 24

Rep: Reputation: 15
.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.
 
Old 07-02-2004, 05:25 PM   #2
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bash script: using "select" to show multi-word options? (like "option 1"/"o zidane_tribal Programming 6 03-21-2013 10:35 AM
"bash: rpm: command not found" errom when trying to install any package sandeepchau123 Linux - General 16 07-06-2008 03:58 AM
How to write a bash script to replace all "KH" to "K" in file ABC??? cqmyg5 Slackware 4 07-24-2007 09:00 AM
"bash: run: command not found" ? neuropulse Linux - Newbie 10 04-23-2005 07:58 AM
Getting "event not found" when making scripts darin3200 Linux - Software 5 09-01-2003 11:37 AM


All times are GMT -5. The time now is 08:33 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration