LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 06-29-2003, 11:38 PM   #1
Goonie
LQ Newbie
 
Registered: Jun 2003
Location: Bay Area, CA and Boulder, CO
Distribution: Redhat 8.0
Posts: 17

Rep: Reputation: 0
.xinitrc problems


I am very unclear on how i'm supposed to work the .xinitrc file. From what I understand at this point, I was to create the .xinitrc file in my home directory, (so i'm assuming that would be $/home/), and I have the following lines in the file, some added using pico:

!/bin/sh
aterm -tr &
gkrellm -w &
exec usr/local/bin/fluxbox

I am trying to get my terminal emulator aterm to start automatically, as well as gkrellm, as you can see. However, neither of these items start when I log into fluxbox. What am I doing wrong? It doesn't seem to matter what I add to this file, and I'm wondering if the computer is even looking at it.
 
Old 06-29-2003, 11:52 PM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
The file should live in the USERS home directory, not the system home directory, so:
/home
is different than:
/home/goonie
And
/home/masterc
The .xinitrc should live inside:
/home/goonie
not
/home
Also, your shebang is incorrect, I believe:
#!/bin/sh
Is what you are lookin for.

Also, maybe you should provide full paths to aterm and gkrellm, one more thing, you are missing the preceding / on /usr:
/usr/local/bin/fluxbox

HTH

Cool
 
Old 06-30-2003, 01:10 AM   #3
Goonie
LQ Newbie
 
Registered: Jun 2003
Location: Bay Area, CA and Boulder, CO
Distribution: Redhat 8.0
Posts: 17

Original Poster
Rep: Reputation: 0
So I added the # to the first line, and added the / to the last line, and gave the exact path names for each program I want to start, but still nothing happens. I even added a bsetbg command to load my background, but that doesnt start either, although at the terminal that command works fine. I am logging in as guest, thats the user's name, and thus I put the only copy of the .xinitrc file into /home/guest directory.

For some reason, the computer is not looking at this file....whats the problem?
I am running redhat 8, with the fluxbox windows manager. thanks!
 
Old 06-30-2003, 01:13 AM   #4
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
How are you getting it to start?

I don't know if logging in as a user from a gui looks at xinitrc or not, you can find out from starting gdm (or kdm) from the command line like so:
CTRL ALT F2
root
root password
telinit 3
kdm
login-name
password
And then:
CTRL ALT F2
to see what the screen says it's loading from. That or look at /var/log/XFree86.0.log



Cool
 
Old 06-30-2003, 01:39 AM   #5
Goonie
LQ Newbie
 
Registered: Jun 2003
Location: Bay Area, CA and Boulder, CO
Distribution: Redhat 8.0
Posts: 17

Original Poster
Rep: Reputation: 0
I think I'm making some headway here, but I need more help...I was under the assumption that when the GUI login screen comes up, and I select Fluxbox from the list, that loads the .xinitrc file, but maybe not.... I changed the inittab setting to 3, so that I get a text login and once logged in, it does not start xwindows. I tried running the command startx once logged in, and it suddenly launches fluxbox with all the .xinitrc options i want, and then suddenly quits after a split second back to the text command. Whats going on?
 
Old 06-30-2003, 02:57 AM   #6
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Sounds like it's working When it spits you back to a prompt, are there any error messages? If so, can you post them up?

Cool
 
Old 06-30-2003, 03:43 AM   #7
Goonie
LQ Newbie
 
Registered: Jun 2003
Location: Bay Area, CA and Boulder, CO
Distribution: Redhat 8.0
Posts: 17

Original Poster
Rep: Reputation: 0
After it quits out of xwindows, it drops me to a command prompt, and above that it displays information from the log, things starting and whatnot, but clearly no errors, and the last thing it shows is:

Waiting for X server to shutdown

...or something like that if i can remember. It doesn't seem as tho there are any errors, it just doesn't want to stay in xwindows...
 
Old 06-30-2003, 03:48 AM   #8
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Post back up what you have now in that file, maybe you have a syntax error?

Cool
 
Old 06-30-2003, 10:26 AM   #9
cuckoopint
Member
 
Registered: Feb 2003
Distribution: Debian
Posts: 797

Rep: Reputation: 30
if you are using a gui login use ~/.xsession instead of ~/.xinitrc

same syntax.

You may also want to throw in some sleep functions:

ie.
sleep 2s && gkrellm&
 
Old 07-01-2003, 01:39 AM   #10
Goonie
LQ Newbie
 
Registered: Jun 2003
Location: Bay Area, CA and Boulder, CO
Distribution: Redhat 8.0
Posts: 17

Original Poster
Rep: Reputation: 0
what exactly are sleep functions, and what would that do by putting them in?

How would I copy the contents of .xinitrc into this text box without just transcribing it letter for letter?

Matt
 
Old 07-01-2003, 01:46 AM   #11
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
highlight the syntax, and click your middle button. If you don't have one, click both buttons at once.

Cool
 
Old 07-01-2003, 02:01 AM   #12
Goonie
LQ Newbie
 
Registered: Jun 2003
Location: Bay Area, CA and Boulder, CO
Distribution: Redhat 8.0
Posts: 17

Original Poster
Rep: Reputation: 0
First I would like to note that I created a .xsession file in my home directory, added the contents of the .xinitrc file into it, and that does absolutely nothing...maybe i'm doing it wrong? It would be nice to have all these applications launch once I start Fluxbox from the session manager.

As for the contents of my .xinitrc file:


#!/bin/sh
exec /usr/X11R6/bin/aterm -tr &
exec /usr/bin/gkrellm -w &
exec /usr/local/bin/taglines &
exec /usr/local/bin/bsetbg -f /usr/local/1372.gif
exec /usr/X11R6/bin/root-tail -g 100x10x0+0 /var/log/messages,green &
exec /usr/local/bin/fluxbox

Ah, that worked nicely, I like that middle button click thing, very nice....so thats my .xinitrc...anything wrong with it? Why would it start everything like I want it from init level 3, but then suddenly dump me out of everything after a second?

Matt
 
Old 07-01-2003, 02:33 AM   #13
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Remove the "exec" lines from everything except your wm, so change it to:
#!/bin/sh
/usr/X11R6/bin/aterm -tr &
/usr/bin/gkrellm -w &
/usr/local/bin/taglines &
/usr/local/bin/bsetbg -f /usr/local/1372.gif
/usr/X11R6/bin/root-tail -g 100x10x0+0 /var/log/messages,green &
exec /usr/local/bin/fluxbox

And try again. Sleep functions will allow your applications to wait x amount of seconds before moving onto the next one, it might not be a bad idea if they are trying to start too fast.

Cool
 
Old 07-01-2003, 03:19 AM   #14
Goonie
LQ Newbie
 
Registered: Jun 2003
Location: Bay Area, CA and Boulder, CO
Distribution: Redhat 8.0
Posts: 17

Original Poster
Rep: Reputation: 0
yay! got it working now! I don't know if it was removing all those exec's, or adding a & that I forgot after the bsetbg line, but everything works perfectly now. Thanks masterC for your extensive help, you're a champ!!!! they should call this forum www.linuxquestionsformasterC.org, ha ha. anyways, thanks a lot, and expect plenty more threads from me, this is just the beginning of my linux experience....

Matt
 
Old 07-01-2003, 03:21 AM   #15
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Congratulations, the feeling of accomplishment is a great one!



You're welcome

Cool
 
  


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
set default sh and xinitrc problems provkitir Debian 3 01-20-2005 10:12 PM
Could I .xinitrc for this.... JROCK1980 Linux - Software 5 02-17-2004 05:57 PM
.xinitrc unimaginative Linux - Newbie 1 01-03-2004 10:53 PM
.xinitrc nakkaya Linux - Software 1 04-11-2003 03:12 PM
.xinitrc mrsolo Linux - Software 5 10-30-2002 10:16 AM

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

All times are GMT -5. The time now is 10:59 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
Open Source Consulting | Domain Registration