View previous topic :: View next topic |
Author |
Message |
Godsmacker777 Apprentice
Joined: 04 May 2004 Posts: 205 Location: Fenway area, Boston Massachusetts :O)
|
Posted: Mon Dec 13, 2004 9:38 pm Post subject: source /etc/profile |
|
|
what does the command source /etc/profile do?
I'm getting through my problems with configuring xorg. right now I have to run this command before I can test X with "X" or "startx" I know this problem is just me not really understanding what is going on. Can anyone enlighten me?
Thanks~ _________________ Why must we hear what system you're running gentoo on, especially if all you've got is a measly gig of ram or 3gHz processor?
I want to see signatures boasting 25 cpu clusters and blade severs, or a big 'ole onyx..anyone running gentoo on an onxy?? |
|
Back to top |
|
|
adaptr Watchman
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Mon Dec 13, 2004 9:55 pm Post subject: |
|
|
As the Handbook says, it sources (pulls in) the global profile.
Why ?
Well, many emerges change the profile, and normally it is only pulled in once, when you log in.
So yes, you could also log out and then log back in.
If you think it's more convenient. _________________ >>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen |
|
Back to top |
|
|
hollerith Apprentice
Joined: 21 May 2004 Posts: 204
|
Posted: Mon Dec 13, 2004 10:16 pm Post subject: source |
|
|
profile is a shell script. Shell scripts run in their own private environment eg variables only exist for the script. Source applies changes to the current shell/environment eg variables will be inherited by the current shell. |
|
Back to top |
|
|
Godsmacker777 Apprentice
Joined: 04 May 2004 Posts: 205 Location: Fenway area, Boston Massachusetts :O)
|
Posted: Mon Dec 13, 2004 10:35 pm Post subject: |
|
|
logging out and rebooting haven't changed anything. What am I doing wrong? I can only run X if I run source first. I'm still working through tweaking xorg.conf, so it isn't really a problem right now, but I know I'm just not doing this right. _________________ Why must we hear what system you're running gentoo on, especially if all you've got is a measly gig of ram or 3gHz processor?
I want to see signatures boasting 25 cpu clusters and blade severs, or a big 'ole onyx..anyone running gentoo on an onxy?? |
|
Back to top |
|
|
hollerith Apprentice
Joined: 21 May 2004 Posts: 204
|
Posted: Wed Dec 15, 2004 12:07 am Post subject: |
|
|
Sorry to paraphrase but what you mean is you can only run xorg if you run /etc/profile first and keep the settings after the script ends. If you change your .profile to include whatever xorg needs in /etc/profile then you shouldn't need to run /etc/profile again after you've logged in (same environment). However, I didn't have to alter with my login script to do any of this so maybe this is just symptomatic of something else wrong. What variables do you think xorg needs - export something DISPLAY:0? |
|
Back to top |
|
|
rezza Guru
Joined: 09 Apr 2003 Posts: 434 Location: Edinburgh, UK
|
Posted: Wed Dec 15, 2004 1:25 am Post subject: |
|
|
You could always add "source /etc/profile" as the last line of your ~/.bashrc, which forces /etc/profile to be sourced whenever you start a bash session. _________________ screenshots
blog |
|
Back to top |
|
|
adaptr Watchman
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Wed Dec 15, 2004 10:11 pm Post subject: |
|
|
Godsmacker777 wrote: | logging out and rebooting haven't changed anything. What am I doing wrong? |
With X ? Hmm.. could be any of about a gazillion things
Really.
But first things first - getting it to run at all.
What is in your PATH after you have logged in?
If /usr/X11R6/bin (or /usr/bin/X11) is not in there, you can't "run" it as a system command.
This is normally put in the profile by the X install, which is why you have to do the source bit in the first place: any changes to the profile will only take effect after you source it or after you re-login.
Godsmacker777 wrote: | I can only run X if I run source first. I'm still working through tweaking xorg.conf, so it isn't really a problem right now, but I know I'm just not doing this right. |
Then compare the PATHs before and after you source the profile - that will at least tell you if that's the problem. _________________ >>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen |
|
Back to top |
|
|
|