LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-03-2009, 05:10 PM   #1
semiRocket
LQ Newbie
 
Registered: Apr 2009
Posts: 18

Rep: Reputation: 0
How-to: Auto start-up an X Application


I want that an application starts automatically when I login into X. I read in Slackware Essentials that xinitrc could be used for that purpose, so I've copied the default file to ~/.xinitrc, and added my program into it. And that worked indeed in runlevel 3, but when I've switched to runlevel 4 (Graphical login with session managers) it seems that it doesn't even read this file anymore. Is this normal :?

What is the best way to autostart my application?

Thanks in advance.

Last edited by semiRocket; 07-03-2009 at 05:12 PM.
 
Old 07-03-2009, 05:23 PM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
xinitrc is one of the older, lower-level ways to autostart an application. Most desktop environments have their own systems for it these days. kde has its ~.kde/Autostart folder, and I think gnome has a folder or configuration dialog that works in a similar way.


I had a link to a page that listed how to configure autostart for different systems, but it seems to be dead now. I suggest you research your own distro and DE for specifics.
 
1 members found this post helpful.
Old 07-03-2009, 05:26 PM   #3
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
In a typical Linux and UNIX system run level 4 is not defined and run level 5 is graphical login. I don't know about Slackware so maybe they do use run level 4. I'm just saying it sounds weird to use run level 4.

~/.xinitrc is the old fashioned way to start applications automatically when X starts. It may still be the only method possible with the simple window managers such as twm, fvwm, etc. However if you are using a sophisticated desktop environment such as Gnome or KDE then they have their own autostart mechanisms. In KDE you can create a link in ~/.kde/Autostart to an application that you want to start when KDE login happens. For example if you wanted to start Xeyes automatically on KDE then the following commands in a terminal window (Konsole) would do it.
Code:
cd .kde/Autostart
ln -s /usr/bin/xeyes xeyes
I haven't use Gnome in a long time so I don't know about that. They probably have something similar to KDE.

Addendum: I see that David the H. posted three minutes prior to me while bgeddy and I must have posted within seconds of each other. Unfortunately all three posts are extremely similar. Extremely similar. That's weird. I promise that I did not see David's post before I started to write mine and I have to believe that bgeddy didn't see mine before he posted.

I suppose I'm making too much of this but the similarity with no useful additional information to speak between these posts of is really weird. Yeah. I'm freaking out. Freaking out!

Last edited by stress_junkie; 07-03-2009 at 05:35 PM.
 
1 members found this post helpful.
Old 07-03-2009, 05:26 PM   #4
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
If you are running KDE - as said -you can put a link in ~/.kde/Autostart/ to the application you want to run at startup. If you are running another DE then I'm not sure.
 
Old 07-03-2009, 05:30 PM   #5
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
Quote:
Run level 4 is not defined. Run level 5 is graphical login.
@stress_junkie: Not in Slackware it's not ! We have runnlevel 4 for X. You should check a user's distribution in their signature before contradicting !
 
Old 07-03-2009, 05:38 PM   #6
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Quote:
Originally Posted by bgeddy View Post
@stress_junkie: Not in Slackware it's not ! We have runnlevel 4 for X. You should check a user's distribution in their signature before contradicting !
Well if you had waited a few minutes you would have seen that my edits include a statement that I understand Slackware could be an exception. You should settle down.
 
Old 07-03-2009, 05:44 PM   #7
semiRocket
LQ Newbie
 
Registered: Apr 2009
Posts: 18

Original Poster
Rep: Reputation: 0
Thank you guys, I know there's must be a simpler way to do this

I've forgot to mention, yes I'm using KDE
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto start an application in X VictorLemar Puppy 3 09-12-2008 11:22 PM
hot to auto start oracle application server on Redhat AS3 at the boot time procfs Linux - Software 2 05-22-2007 11:42 PM
eth0 Auto Connect, How to auto start on logon cornish Linux - Networking 2 05-09-2005 12:02 PM
auto start application acrors Fedora 10 10-11-2004 11:22 AM
Adding an application to auto-start on boot-time dushkinup Linux - Newbie 4 03-07-2004 07:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:46 AM.

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