Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOWTO: setup GDM so that bash prompt shows properly
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
nyce
n00b
n00b


Joined: 10 Jul 2002
Posts: 7
Location: Accra, Ghana

PostPosted: Fri Jul 12, 2002 2:48 pm    Post subject: HOWTO: setup GDM so that bash prompt shows properly Reply with quote

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
View user's profile Send private message
trolley
Apprentice
Apprentice


Joined: 12 Jun 2002
Posts: 292
Location: Canada

PostPosted: Fri Jul 12, 2002 2:52 pm    Post subject: Reply with quote

Funny, I didn't have to do that. I just sourced /etc/profile once and since then it's been ok.
Back to top
View user's profile Send private message
nyce
n00b
n00b


Joined: 10 Jul 2002
Posts: 7
Location: Accra, Ghana

PostPosted: Fri Jul 12, 2002 3:12 pm    Post subject: what happens if you restart /etc/init.d/xdm ? Reply with quote

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
View user's profile Send private message
trolley
Apprentice
Apprentice


Joined: 12 Jun 2002
Posts: 292
Location: Canada

PostPosted: Fri Jul 12, 2002 3:32 pm    Post subject: Reply with quote

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
View user's profile Send private message
nyce
n00b
n00b


Joined: 10 Jul 2002
Posts: 7
Location: Accra, Ghana

PostPosted: Fri Jul 12, 2002 3:44 pm    Post subject: Reply with quote

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
View user's profile Send private message
kachaffeous
Tux's lil' helper
Tux's lil' helper


Joined: 07 Jun 2002
Posts: 86

PostPosted: Fri Jul 12, 2002 4:35 pm    Post subject: Reply with quote

or just make a ~/.Xdefaults with the following

*loginShell: True

Think that is right.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum