LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-07-2003, 12:56 PM   #1
jipe
LQ Newbie
 
Registered: Jul 2003
Posts: 15

Rep: Reputation: 0
aterm .Xdefaults & .bashrc


howdy,

i recently installed aterm. my window manager is fluxbox and i use bash. i set up all my preferences for aterm in ~/.Xdefaults

to load these preferences i executed:

Code:
xrdb -load ~/.Xdefaults
to get these settings to load everytime automatically when fluxbox starts i added the following line to ~/.fluxbox/init

Code:
rootCommand: xrdb -load ~/.Xdefaults
however, this did *not* load my saved settings properly.

then i tried by sticking
Code:
xrdb -load ~/.Xdefaults
in my ~/.bashrc file. this time when i open aterm for the first time my settings aren't loaded, but if i exit aterm and open it up again then the settings load up correctly!

anyone know why they're not loading up correctly first time when i open aterm?

oh, and i boot up to runlevel5 so X is started by gdm

thanks
 
Old 11-07-2003, 01:39 PM   #2
pfunk
Member
 
Registered: Jun 2002
Distribution: Suse, Redhat, Knoppix
Posts: 104

Rep: Reputation: 15
I think .Xdefaults is ignored unless you manually start X from a console window

.bash_profile (or .bash_login on an old system) is what's executed at login time. then .bashrc is executed when you subsequently open a shell ... at least that's the way it works on my machine.
 
Old 11-08-2003, 11:03 AM   #3
jipe
LQ Newbie
 
Registered: Jul 2003
Posts: 15

Original Poster
Rep: Reputation: 0
thanks for your reply. i included the line
Code:
xrdb -load ~/.Xdefaults
in ~/.bash_profile but it had no effect.

what's the general theory that i should be looking at? should i be getting an X init script to run the above command? or should a fluxbox init script or even a bash init script be running the command?

or am i looking off the path altogether? maybe i should be loading my aterm settings a different way altogether. it's just so strange to me that the settings are *always* loaded the *second* time i open a terminal but never the first.

any further suggestions are great welcomed!
 
Old 11-10-2003, 04:29 AM   #4
jipe
LQ Newbie
 
Registered: Jul 2003
Posts: 15

Original Poster
Rep: Reputation: 0
anyone?
 
Old 11-10-2003, 05:43 AM   #5
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
I just put my aterm settings in ~/.Xdefaults and don't do a thing else but launch flux. Works great. But I don't use any graphical login stuff. Just 'startx'. Kind of a non-answer there and it might not even work for you, but just saying.
 
Old 11-10-2003, 11:44 AM   #6
jt42
LQ Newbie
 
Registered: Aug 2003
Location: hamilton, on, canada
Posts: 6

Rep: Reputation: 0
If I remember correctly, stuff in $HOME/.xsession is run as part of a graphical login, so putting it there should mean that it runs.
 
Old 11-13-2003, 12:18 PM   #7
jipe
LQ Newbie
 
Registered: Jul 2003
Posts: 15

Original Poster
Rep: Reputation: 0
hey!

thanks for the replies guys. the ~/.xsession idea made no difference, unfortunately. no matter what i seem to try, the terminal settings are always applied the second time i open a terminal but not the first! i know it's got to be something retarded!
 
Old 10-25-2004, 08:10 PM   #8
peeples
Member
 
Registered: Sep 2002
Location: Wichita Falls, TX
Distribution: tried a lot of 'em, now using kubuntu
Posts: 180

Rep: Reputation: 30
Wow,

The subject line for this post was EXACTLY what I put in my search...

I've got the same problem, but I run WindowMaker. I login through gdm, I've got my aterm settings stored in .Xdefaults, and if I run

xrdb .Xdefaults

from a normal terminal my aterm starts up correctly, but no colorized output. So, then I type

source .bashrc

and reopen aterm, now, it's set-up correctly AND I have colorized output.

what do I put in .bashrc (.bash_profile OR SomeOtherFile) so that it runs "xrdb .Xdefaults" and THEN .bashrc ???

Last edited by peeples; 10-25-2004 at 10:14 PM.
 
Old 10-30-2004, 10:19 AM   #9
peeples
Member
 
Registered: Sep 2002
Location: Wichita Falls, TX
Distribution: tried a lot of 'em, now using kubuntu
Posts: 180

Rep: Reputation: 30
Well, I finally figured out how to do it!

FIRST, you must add the following line to /etc/gdm/PreSession/Default:

(put it somewhere before the sessreg command...and put your login name not "<username>")

Code:
xrdb /home/<username>/.Xdefaults
SECOND, you must edit your .bash_profile so that it sources .bashrc :

Code:
 if [ -f ~/.bashrc ]; then
    . ~/.bashrc
fi
That should do it!

(I can't beleive it took me that long to figure out how to do something this simple, but, Oh well...)
 
  


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
how do i make the aterm read the ~/.Xdefaults file resego Linux - Software 5 04-29-2005 12:08 AM
.Xdefaults doesnt take effect, even with xrdb -merge .xdefaults... michelbehr Linux - Newbie 0 07-05-2004 10:59 PM
slackware problem with aterm && mouse wheel infamous41md Linux - Newbie 3 01-01-2004 09:04 PM
Aterm & vi ^? GT_Onizuka Linux - Software 2 10-24-2003 04:30 PM
bash_profile & bashrc c1p3r Linux - Newbie 0 07-15-2003 06:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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