Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 05-22-2004, 07:01 AM   #1
Registered: Oct 2003
Location: Bucharest
Distribution: Debian Sarge, Slackware Current, Ubuntu
Posts: 183

Rep: Reputation: 30
running a command everytime kde starts

how do I run a program everytime kde starts? (I want to autostart a network chat program everytime kde starts... )
Old 05-22-2004, 07:12 AM   #2
LQ Guru
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
you might want to try adding the command to the .xinitrc -file (notice the dot before the actual name; dot-xinitrc) in your home directory. if such file doesn't exist, create one; just plain text file, and add a new line to it like

exec /usr/bin/xmms

this should start xmms (if you have it) every time X starts....I don't know how this works if you have graphical login, but try it out. might work and you lose nothing if it doesn't...
Old 05-22-2004, 07:14 AM   #3
LQ Guru
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
Try writing a script to launch the program and put it in ~/.kde/Autostart
Old 05-22-2004, 08:11 AM   #4
Registered: Oct 2003
Location: Bucharest
Distribution: Debian Sarge, Slackware Current, Ubuntu
Posts: 183

Original Poster
Rep: Reputation: 30
ok, thanks for the prompt replies. The strangest thing happens when I edit ~/.xinitrc, my program runs only when I shutdown KDE. I couldn't find a workaround so I used a script placed in /.kde/Autostart and it worked. But now I have another problem, I want to run that program like I'm a differnet user. So in KDE I login in as root, and I want to use that program as a regular user. How can I execute form within a script a program with a different user id ?

I solved it by using kdesu, i put a command like kdesu -c command -u user in an executable bash script file in ~/.kde/Autostart and BANG it stared the way I wanted


Last edited by Menestrel; 05-23-2004 at 10:26 PM.


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
Running programs when x starts kzar Debian 3 08-03-2004 04:49 PM
running a command everytime kde stops Menestrel Linux - Newbie 1 05-24-2004 01:01 PM
Running programs when Flux starts mattp Linux - Newbie 16 03-31-2004 07:07 PM
Running a console command everytime login... jdaniel Linux - General 1 11-04-2003 04:11 PM
Running Scripts When Modem Starts Up Angelis Linux - Newbie 2 08-31-2003 01:46 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:03 PM.

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