LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 06-07-2003, 10:48 AM   #1
DKnight
LQ Newbie
 
Registered: Oct 2002
Location: Miami as in FL
Distribution: MANDRAKE 9.1
Posts: 21

Rep: Reputation: 15
Question launching an application when X starts...


When I modify .bash_profile to auto start gkrellm when I log into X as such :

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
unset USERNAME
/sbin/gkrellm


gkrellm appears but nothing else loads in X (panels, background, icons, NOTHING ... ) UNTIL I close/exit gkrellm at which point everything loads up as usual.

Is there a way to run this 'out of process' so that the load-up doesn't wait for the application I'm asking it to launch to *terminate* before continuing with the load process?

The short and the long of it is that I just want to be able to log into X and have my environment load as usual and a few custom programs I keep in the background to also automatically load and persist.

I have spent the last 3 hours researching this little thing, I was mostly sane when I started ... but it's personal now so I *will* find a way. Any help would likely enable me to avoid an aneurysm and would of course be appreciated!

I'm running gnome under redhat 9.0 w/ kernel 2.4.20-18.9


Last edited by DKnight; 06-07-2003 at 10:52 AM.
 
Old 06-07-2003, 10:50 AM   #2
KevB
Member
 
Registered: Jun 2003
Location: UK
Distribution: Debian (Woody)
Posts: 41

Rep: Reputation: 15
Add, /sbin/gkrellm

To .xinitrc ?
 
Old 06-07-2003, 11:02 AM   #3
DKnight
LQ Newbie
 
Registered: Oct 2002
Location: Miami as in FL
Distribution: MANDRAKE 9.1
Posts: 21

Original Poster
Rep: Reputation: 15
adding /sbin/gkrellm to the end of file /etc/X11/xinit/xinitrc had no effect, even upon reboot.

In a moment of paranoia I also tested /sbin/gkrellm at the command line to make sure that it does launch gkrellm.

Any other suggestions?
 
Old 06-07-2003, 02:35 PM   #4
KevB
Member
 
Registered: Jun 2003
Location: UK
Distribution: Debian (Woody)
Posts: 41

Rep: Reputation: 15
The file ".xinitrc" should be in your home directory, minus the quotes but including the period (it's a hidden file).

You can list hidden files with "ls -a".

If it doesn't exist just create it with your favourite text editor.

HTH
 
Old 06-07-2003, 06:51 PM   #5
DKnight
LQ Newbie
 
Registered: Oct 2002
Location: Miami as in FL
Distribution: MANDRAKE 9.1
Posts: 21

Original Poster
Rep: Reputation: 15
First off, thanks for the help!

I tried placing it in a file I created in my home directory and named it .xinitrc the contents where only one line :

/sbin/gkrellm


This had no effect. I suspect it was not even run during X11 startup. Any ideas why this might be?
 
Old 06-07-2003, 07:09 PM   #6
nakkaya
Guru
 
Registered: Jan 2003
Location: Turkey&USA
Distribution: Emacs and linux is its device driver(Slackware,redhat)
Posts: 1,398

Rep: Reputation: 45
/sbin is for sytem spesific programs like gnu parted makefs. gkrellm should be in /usr/bin
if it is not there use whereis is command to find it the add it to .xinitrc here is a copy of mine

exec xscreensaver&
exec gkrellm&
exec /usr/X11R6/bin/fluxbox
 
Old 06-07-2003, 08:33 PM   #7
DKnight
LQ Newbie
 
Registered: Oct 2002
Location: Miami as in FL
Distribution: MANDRAKE 9.1
Posts: 21

Original Poster
Rep: Reputation: 15
Created a file named .xinitrc in the home directory of the user I'm logging in as and added the following line:

exec gkrellm&

but it doesn't do anything...at all...kinda odd.

I decided to try adding the same line to the end of the xinitrc found in

/etc/X11/xinit/xinitrc

and it similarly did absolutely nothing ... ... are these files called when X is started up or when the system is rebooted?

Any other thoughts... I'm going to reboot btw, with both those files modified just for paranoia sake...

Thanks for the help nakkaya
 
Old 06-07-2003, 09:50 PM   #8
padlamoij
Member
 
Registered: Oct 2002
Location: East Point, GA
Posts: 188

Rep: Reputation: 30
did you move gkrellm into /usr/bin/ and out of /sbin/? sbin is not in your $PATH if you are not the root user i believe. and you don't have privliges(yikes sp!) to run programs from that directory if you are a user(not root). you need to move it into /usr/bin.

to test to see if X is reading the .xinitrc file at all add something like:

exec xterm &

and if you get an xterm window at startup then you know that it is reading the .xinitrc file and it is likely that it is the issue i described above. hope this helps.

Last edited by padlamoij; 06-07-2003 at 09:55 PM.
 
Old 06-07-2003, 10:01 PM   #9
DKnight
LQ Newbie
 
Registered: Oct 2002
Location: Miami as in FL
Distribution: MANDRAKE 9.1
Posts: 21

Original Poster
Rep: Reputation: 15
Yep I moved it and now it is globally launchable by name which is nice . I'm testing your .xinitrc suggestion now.
 
Old 06-07-2003, 10:04 PM   #10
DKnight
LQ Newbie
 
Registered: Oct 2002
Location: Miami as in FL
Distribution: MANDRAKE 9.1
Posts: 21

Original Poster
Rep: Reputation: 15
Nope, it doesn't seem to be reading the local .xinitrc file from my users directory.

Suggestions?
 
Old 06-07-2003, 10:15 PM   #11
DKnight
LQ Newbie
 
Registered: Oct 2002
Location: Miami as in FL
Distribution: MANDRAKE 9.1
Posts: 21

Original Poster
Rep: Reputation: 15
BTW, changing the /sbin/gkrellm line in my first post to:

exec gkrellm &

(after relocating gkrellm to /usr/bin) did the trick in so far as launching gkrellm at runlevel 5 signon. Thank you all for your help!!

I would still like to know how to get my local .xinitrc working though... assuming the local copy is even supposed to exist in RH9 's implementation. Lets call it intellectual curiosity.

?? ??

Last edited by DKnight; 06-07-2003 at 10:16 PM.
 
Old 06-07-2003, 11:43 PM   #12
padlamoij
Member
 
Registered: Oct 2002
Location: East Point, GA
Posts: 188

Rep: Reputation: 30
i'm pretty sure you need to look into .xsession. i think there is a config script or something to edit it. don't really know the full details though.
 
Old 06-08-2003, 04:50 AM   #13
KevB
Member
 
Registered: Jun 2003
Location: UK
Distribution: Debian (Woody)
Posts: 41

Rep: Reputation: 15
Quote:
Originally posted by DKnight
I would still like to know how to get my local .xinitrc working though...
Only just noticed you are using Gnome, this may well use a different method. I've used .xinitrc with Fluxbox and Blackbox and it works fine. It's covered in the documentation at www.fluxbox.org, but it's not Fluxbox specific (.xinitrc). Maybe Gnome or RH has replaced it?
 
Old 06-08-2003, 07:43 AM   #14
DKnight
LQ Newbie
 
Registered: Oct 2002
Location: Miami as in FL
Distribution: MANDRAKE 9.1
Posts: 21

Original Poster
Rep: Reputation: 15
I suspect you're right KevB, I'm going to research it some more in the RH manuals and if I come up with a definitive answer I'll be sure to post it so others can possibly benefit ...
 
  


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
start application when GUI starts ... poetfreak Linux - General 1 08-04-2005 03:50 PM
Launching application + variables in FVWM Peff Linux - Software 2 06-28-2005 08:36 AM
how i migrate windows application to Linux base application vandarakalpesh Linux - Software 0 06-26-2004 03:34 AM
launching a program from a C++ application Error1312 Programming 7 02-25-2004 08:18 AM
Launching application when gnome startups appel Linux - Software 3 08-02-2003 10:06 PM


All times are GMT -5. The time now is 03:14 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