LinuxQuestions.org
Help answer threads with 0 replies.
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 04-13-2002, 05:05 PM   #1
jISV
Member
 
Registered: Feb 2002
Location: England
Distribution: MDK8.2
Posts: 128

Rep: Reputation: 15
Running programs during startx


Can someone tell me how I'm supposed to start programs when I'm starting X.
I run .xinitrc with exec fluxbox.
I want to start gkrellm and maybe a console immediately, but I don't know how it's done.
Thanks.
 
Old 04-13-2002, 05:08 PM   #2
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
just add the command to xinitrc

exec fluxbox &
xclock -geometry 100x100-5+5 &
xterm -geometry 80x50-50+150 &
/path/gkrelm &

Last edited by DavidPhillips; 04-13-2002 at 05:11 PM.
 
Old 04-13-2002, 05:09 PM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Quote:
Originally posted by DavidPhillips
just add the command to xinitrc

exec fluxbox
xclock -geometry 100x100-5+5 &
xterm -geometry 80x50-50+150 &
well no, the window manager line is always the very last file, this way will load the xterms after you've quit X...
 
Old 04-13-2002, 05:11 PM   #4
jISV
Member
 
Registered: Feb 2002
Location: England
Distribution: MDK8.2
Posts: 128

Original Poster
Rep: Reputation: 15
well I put
exec gkrellm
exec fluxbox

and it only loads gkrellm and doesn't get to load fluxbox
 
Old 04-13-2002, 05:12 PM   #5
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
yes I left off the &

I have added it above
 
Old 04-13-2002, 05:13 PM   #6
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
without adding & at the end the next command will not exec till you close the first one
 
Old 04-13-2002, 05:19 PM   #7
jISV
Member
 
Registered: Feb 2002
Location: England
Distribution: MDK8.2
Posts: 128

Original Poster
Rep: Reputation: 15
So using & to run in the background applies to all scripts? I've seen it as required use at times and not at others. Will it depend on the application calling it do you think?
 
Old 04-13-2002, 05:20 PM   #8
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
gkrellm &

exec fluxbox
 
Old 04-13-2002, 05:22 PM   #9
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
if you make a script to run something and it has no & to put it in the background the script will be at that point until that command ends then it will continue


daemons automatically go to the background


try running it on the command line, if it does not return to a prompt without closing the program then it would need to be background in the script

Last edited by DavidPhillips; 04-13-2002 at 05:24 PM.
 
Old 04-13-2002, 05:26 PM   #10
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
some scripts are setup so when a program crashes it will restart it by leaving it in the forground
 
  


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
Losing ENV variables after running startx Imon Linux - Newbie 5 08-16-2004 11:00 AM
Startx auto start of programs (With Fluxbox) jimdaworm Slackware 4 12-03-2003 05:55 PM
error running startx Villhelm Linux - Newbie 4 10-19-2003 05:06 PM
linux 7.3: running startx gives a bunch of errors Yurich Linux - General 7 10-16-2003 03:25 PM
running startx iqlinux Linux - Software 1 03-03-2001 09:17 AM

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

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