Re: Help with login/environment: bash_profile, bashrc, xdm
Hi,
I don't run either gdm or xdm, but do run kdm. For kdm, there is a file
in /etc/kde3/kdm/Xsession. At the top of this file, it had:
#!/bin/sh
I changed this to
#!/bin/bash --login
and now when I fire up an xterm equilavents inside of kde, all the
shells are login shells and my ~/.bash_profile is processed with my
defined enviroment variables.
You may be able to get away with editing /etc/X11/Xsession and doing the
above change.
There may be problems with making all shells start as login shells. I
don't pretend to know what they may be and various pros/cons, but the
above change works for me and gets my ~/.bash_profile read when I fire
up kde.
John
On Monday 09 December 2002 10:25 pm, Paul Mackinney wrote:
> Hi. I use the blackbox window manager, but I'm having trouble with my
> default environment.
>
> I was using gdm and all was fine, except that
> - My customizations to the login window kept getting bonked.
> - If you ctrl-alt-f1 to get a non-X terminal, it keeps coming back
> every n seconds without being asked. Especially annoying if your X
> configuration is bad... I'm just not a GNOME fan.
>
> So I switched to xdm
> - and my .bash_profile stopped getting processed. So that after
> opening an xterm, none of my custom environment variables were
> active, just the custom aliases in .bashrc.
> - I tried putting 'source ./.bash_profile' at the top of my
> xsession file, but no luck.
>
> Can someone tell me, or point me to the right docs, to get xdm to run
> .bash_profile so that all term windows inherit the environment?
>
> And a more philosophical question: Anyone care to provide a 50 word
> essay on the proper use of .bash_profile and .bashrc? I have an
> environment that generally works, but it's based on random examples,
> trial, and error rather than consistent application of fundamental
> principles.
>
> TIA, Paul
Reply to: