LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 10-11-2004, 02:27 AM   #1
otoomet
Member
 
Registered: Oct 2004
Location: Tartu, Århus,Nürnberg, Europe
Distribution: Debian, Ubuntu, Puppy
Posts: 619

Rep: Reputation: 45
gdm + .bash_profile


Hi everybody,

I noticed that my new debian/sarge system does not execute .bash_profile if logged in from gdm, neither for gnome session nor X-session. This does not happen on my RH9.

Googling around gave some similar posts, the most realistic solution seems to be to hack the startup scripts and replace #!/bin/bash by #!/bin/bash -login in the relevant ones. However, this seems not to be a neat way to do it.

Does anybody have a better idea? Does anybody know why it is so?

Thanks in advance,
Ott
 
Old 10-11-2004, 03:13 AM   #2
darthtux
Senior Member
 
Registered: Dec 2001
Location: 35.7480° N, 95.3690° W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070

Rep: Reputation: 47
I don't know if this is what you're looking for but you might want to add this to .bashrc

if [ -f ~/.bash_profile ]; then
source ~/.bashr_profile
fi
 
Old 10-11-2004, 03:19 AM   #3
hazza
Member
 
Registered: Nov 2003
Location: Australia
Distribution: Mandrake, SUSE, Fedora
Posts: 122

Rep: Reputation: 15
I remember having a similar problem with .bash_profile not being loaded under an X session. One way to fix it would be to edit /etc/X11/xdm/Xsession to replace "#!/bin/bash" with "#!/bin/bash --login" as you mentioned. I had compared a couple of distros at the time and that file seems to contain that difference.
 
Old 10-18-2004, 12:47 AM   #4
otoomet
Member
 
Registered: Oct 2004
Location: Tartu, Århus,Nürnberg, Europe
Distribution: Debian, Ubuntu, Puppy
Posts: 619

Original Poster
Rep: Reputation: 45
Thanks for your answer. As my wife has almoust occupied my computer, I hadn't the possibility (and need) to check it until now. The place to check is

/etc/gdm/Xsession

and I replaced #!/bin/sh to #!/bin/bash --login

I don't think it helps to read .bash_profile into .bashrc. The latter one is not started at all when non-interactive and hence e.g. window manager don't know anything about my personal environment setup. And hence everything I am starting using mouse.

Thanks anyway.

Best,
Ott
 
  


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
what is /etc/x11/gdm/gdm.conf ? Floreen Linux - Newbie 2 04-30-2007 12:22 PM
.bash_profile UmneyDurak Linux - General 1 10-17-2005 11:44 PM
.bash_profile praveenv Linux - Newbie 3 08-14-2004 12:58 PM
need .bash_profile example true_atlantis Slackware 2 02-07-2004 06:27 PM
gdm overwrites /etc/gdm/Session/fluxbox _flaab_ Mandriva 0 12-21-2003 10:58 AM

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

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