On 24.06.06 00:00, Pavlos Parissis wrote: > I have been trying to make my X to source the .bash_profile in order to > set my $PATH variable. > > Looking around Debian reference document and googling about it, the trick > was to add in my ~/.bashrc the $PATH and export it. > > Since ~/.bashrc is invoked by no login shell I don't really mind to use > this trick. But, I do mind that fact that I have duplicate information, > $PATH is set in two files. > > Thus, I was trying to fine a way to overcome this and use only the > ~/.bash_profile by creating a executable file with name ~/.xession and put > in that file only . ~/.bash_profile. This didn't work and I tried to put > #!/bin/bash --login at the beginning of the file but it didn't work > either. > > Any idea where should I look to get this done?
Some time ago I solved this problem by sourcing /etc/profile and $HOME/.profile from /etc/X11/xdm/Xsession (I was using xdm). the $HOME/.profile is being sourced by bourne-compatible shells at user login and should contain seting of environment variables like $PATH. It is also common for dash, ksh and bash (unless their own specific rc files exist, they may source it too) so I thought all common things like this could be in ~/.profile. I don't know if there is any official way how to set up enviroment variables in common place. Some linux distributions use things like /etc/profile.env, but that sucks too much (every fscking package sets up its own useless variables and users don't have any power to tell which to use, which not). -- Matus UHLAR - fantomas, [EMAIL PROTECTED] ; http://www.fantomas.sk/ Warning: I wish NOT to receive e-mail advertising to this address. Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu. Eagles may soar, but weasels don't get sucked into jet engines. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]