View previous topic :: View next topic |
Author |
Message |
nyce n00b
Joined: 10 Jul 2002 Posts: 7 Location: Accra, Ghana
|
Posted: Fri Jul 12, 2002 2:48 pm Post subject: HOWTO: setup GDM so that bash prompt shows properly |
|
|
I've had to work out how to set up GDM so that the bash prompt gets
set properly from /etc/profile - it works, so I decided to share it.
Edit /etc/X11/gdm/gnomerc
and add the line below
source /etc/profile
before the lines
if [ -n "$startssh" ]; then
exec $sshagent -- $gnomesession
else
exec $gnomesession
fi
That's it!! You'll get your nice bash prompt instead of the silly
bash-2.05a$ stuff. _________________ I'm a minimalist e-male. |
|
Back to top |
|
|
trolley Apprentice
Joined: 12 Jun 2002 Posts: 292 Location: Canada
|
Posted: Fri Jul 12, 2002 2:52 pm Post subject: |
|
|
Funny, I didn't have to do that. I just sourced /etc/profile once and since then it's been ok. |
|
Back to top |
|
|
nyce n00b
Joined: 10 Jul 2002 Posts: 7 Location: Accra, Ghana
|
Posted: Fri Jul 12, 2002 3:12 pm Post subject: what happens if you restart /etc/init.d/xdm ? |
|
|
If you just source /etc/profile then the bash prompt is fixed. I wanted to
make sure that I did not have to do that each time I logged in ...
Try
/etc/init.d/xdm restart
and see if your bash prompt is still fixed.
Changing gnomerc makes sure that with each fresh session, your prompt
remains fixed ... so you never have to source /etc/profile manually. _________________ I'm a minimalist e-male. |
|
Back to top |
|
|
trolley Apprentice
Joined: 12 Jun 2002 Posts: 292 Location: Canada
|
Posted: Fri Jul 12, 2002 3:32 pm Post subject: |
|
|
I guess I wasn't clear. After running gnome-terminal for the first time, I sourced /etc/profile, then saved the terminal profile. Ever since I've had the gentoo prompt. |
|
Back to top |
|
|
nyce n00b
Joined: 10 Jul 2002 Posts: 7 Location: Accra, Ghana
|
Posted: Fri Jul 12, 2002 3:44 pm Post subject: |
|
|
Really ? That's very interesting indeed! I didn't know that gnome-terminal could remember environment variables, actually to think upon it, that sounds a little too magical. Call me a skeptic.
So I dug around a bit in gnome-terminal and found this method:-
If you open up the Edit > Profiles ... menu and edit the default (or any other) profile, there's tab called Title and Command in which you can tell gnome-terminal to run as a login shell.
But I still prefer having the whole session sourcing /etc/profile so that with every program that gets runs, all the environment variables get set properly since the environment is inherited when you execute a program from another program [unless it uses execle to start the new program - see man exec(3) for more details on this]
You learn something new everyday. Thanks. I just started using Gnome2 instead of KDE because I only have 128Mb of RAM and Gnome2 seems kinder to my RAM than KDE3 does. _________________ I'm a minimalist e-male. |
|
Back to top |
|
|
kachaffeous Tux's lil' helper
Joined: 07 Jun 2002 Posts: 86
|
Posted: Fri Jul 12, 2002 4:35 pm Post subject: |
|
|
or just make a ~/.Xdefaults with the following
*loginShell: True
Think that is right. |
|
Back to top |
|
|
|