LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-26-2007, 10:54 AM   #1
pccdrussell
Member
 
Registered: Jan 2006
Distribution: Ubuntu
Posts: 62

Rep: Reputation: 15
Launch Shell Script upon KDE login


Hello, I have a pretty simple shell script that I threw together. Its an if then type of script to check for a file in a users home directory. So what Im wondering is how to have that script run everytime a user logs into KDE.
This is on SUSE Enterprise Desktop 10. I have put the script in ~/.kde/Autostart and runs perfectly as expected. However, this is a multi-user system (couple hundred users). And linking /bin/program.sh to everyones ~/Autostart is not really an option.
Ive read similar threads about putting it in /etc/rc.... But Im not really looking for it to start on system startup, just KDE login. So My question is, where would I put this script to make this happen globally?
Thanks in advance for any help!!
 
Old 03-26-2007, 02:55 PM   #2
AdaHacker
Member
 
Registered: Oct 2001
Location: Brockport, NY
Distribution: Kubuntu
Posts: 384

Rep: Reputation: 32
You could try /usr/share/autostart.
 
Old 03-26-2007, 03:50 PM   #3
General Failure
Member
 
Registered: Jan 2007
Location: Germany
Distribution: Slackware 13.37
Posts: 387

Rep: Reputation: 37
Edit: I read too fast. Previous post deleted.

Maybe you could put that in startkde or whatever kdm/gdm calls. Sounds a little unclean, I agree, but might work. What would be the problem with symlinking or even copying the script to ~/.kde/Autostart?

Last edited by General Failure; 03-26-2007 at 04:00 PM.
 
Old 03-26-2007, 09:27 PM   #4
pccdrussell
Member
 
Registered: Jan 2006
Distribution: Ubuntu
Posts: 62

Original Poster
Rep: Reputation: 15
Well, like I said, putting it in ~/.kde/Autostart works great when I did it for myself. However, how would I do that for everyone when there is over a couple hundred users?

On the other post, I think your referring to /opt/kde3/share/autostart and I did try putting it in there, but since users have already logged in before, it doesn't pull from there any more correct?

Thanks for the replies! Any more ideas would greatly be appreciated.
 
Old 03-27-2007, 01:00 AM   #5
General Failure
Member
 
Registered: Jan 2007
Location: Germany
Distribution: Slackware 13.37
Posts: 387

Rep: Reputation: 37
To have the file in all user home dirs, do the following in /home:

for i in `ls` ; do cp /bin/scriptname $i/.kde/Autostart ; done

This is a rather simple example that should work flawlessly if there are only directories in /home. You could substitute cp with ln -s if you wanted to symlink rathe rthan copy.

Last edited by General Failure; 03-27-2007 at 01:07 AM.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Launch CGI script from shell alex986best Linux - Newbie 2 06-28-2006 06:28 AM
shell script launch two apps webreake Programming 4 04-01-2006 07:29 PM
help on shell script as a wrapper to launch default programs according to input file daveiro Programming 2 11-24-2005 04:20 PM
Unable to launch X apps with non login root shell kc00l Slackware 2 11-24-2003 03:32 AM
can't launch java app from shell script... LonAllen Linux - Newbie 0 07-07-2003 08:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:53 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration