LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-03-2004, 03:44 PM   #1
kam_kenneth
Member
 
Registered: May 2004
Distribution: Fedora Core 2
Posts: 50

Rep: Reputation: 15
How to auto load a script on KDE startup


Hi all

I am new here and also new to linux. Currently I am running SuSE 9.0 with KDE 3.1. I am behind a school firewall and everytime I boot up I have to run a NTLM python script that authenicates my browsers with the school's horrible win2003 servers. I usually run the command in bash: python main.py when i am in the python script folder. Is there a way to setup KDE so that everytime it boots in it automatically runs the script?

Thanks!
 
Old 05-03-2004, 05:33 PM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
if you wish to run it when KDE (actually X) is started, just edit your xinitrc-file: with any text editor, open up a file called .xinitrc (dot-xinitrc) in your home directory (if there is no such file, just create it - this file doesn't need any special tags or anything, just add the command lines like you'd be in a shell)

then just add the lines you need into the file, and save. next time X is started, the script should be run.

BUT if you instead wish to run the script at bootup, when the whole system starts, search for a file called rc.local and add the needed script lines there...

this is at least how I do things. I'm not sure if KDE has some system to do this in some other way (I don't use KDE myself) but this should work..

EDIT: to make this clear, add this line (modify the path of the script, of course - I'll assume your python executable is in /usr/bin. you can check this with "whereis python" command -without quotes-) to your .xinitrc (or rc.local, if you prefer) file:

/usr/bin/python /path/to/your/script/main.py

Last edited by b0uncer; 05-03-2004 at 05:38 PM.
 
Old 05-03-2004, 05:55 PM   #3
kam_kenneth
Member
 
Registered: May 2004
Distribution: Fedora Core 2
Posts: 50

Original Poster
Rep: Reputation: 15
thanks! i should have had a look first
i will try that..
 
  


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
grub doesn't auto-load kernel, time/date auto-change, k3b cannot load kenji1903 Red Hat 16 03-27-2005 09:48 PM
auto execute shell script on startup slackwbas Slackware 9 02-27-2005 11:26 AM
Getting firewall script to auto-run at startup lrt2003 Linux - Newbie 2 04-25-2004 03:28 AM
Auto Startup Program for KDE technobarbie Linux - Software 1 04-14-2004 08:26 PM
Load command at KDE startup, possible? thcmwz Linux - Software 1 09-19-2003 11:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:11 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration