[vox-tech] auto-load Xsources / Xdefaults at login

Ken Bloom kbloom at gmail.com
Fri Sep 22 12:44:14 PDT 2006


On Friday 22 September 2006 14:56, Dylan Beaudette wrote:
> Hi everyone,
>
> recently noticed that i now have to manually load my .Xresources /
> .Xdefaults everytime i restart X ....
>
> xrdb -load .Xdefaults
> xrdb -load .Xresources
>
>
> i have put these lines int
o .bashrc and .bash_profile ... but without
> any effect. any ideas on how to address this ?

What desktop environment are you using. I've written my own .xsession, 
so the secret to loading .bashrc and .bash_profile is:

[bloom at cat-in-the-hat ~]$ head -n 1 .xsession
#!/bin/bash --login

You should put the xrdb command in .xsession, the PATH modifications 
in .bash_profile, and the aliases in .bashrc.

Oh, and each of my .bashrc and my .bash_profile looks to see if the 
other one was called (by checking for an environment variable that the 
other sets) and if it wasn't called, it calls it:

At the beginning of .bashrc:

export BASHRC_STARTED=true
if [[ x$R == x ]]; then
   if [ -f .bash_profile ]; then
      source .bash_profile
   fi
fi

at the end of .bash_profile:

# include .bashrc if it exists
if [[ x$BASHRC_STARTED == x ]]; then
   if [ -f ~/.bashrc ]; then
       source ~/.bashrc
   fi
fi

(And somewhere in .bash_profile, I set the envornment variable $R to 
point to the subversion repostiory that contains all of my documents.)

--Ken

-- 
Ken Bloom. PhD candidate. Linguistic Cognition Laboratory.
Department of Computer Science. Illinois Institute of Technology.
http://www.iit.edu/~kbloom1/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://localhost.localdomain/pipermail/vox-tech/attachments/20060922/6e6e377a/attachment.pgp


More information about the vox-tech mailing list