 |
|
 |
|
Next: Screen dimming on startup and sleep
|
| Author |
Message |
External

Since: May 21, 2004 Posts: 44
|
(Msg. 1) Posted: Thu Aug 05, 2004 6:55 pm
Post subject: Why doesn't my X terminal use .profile? Archived from groups: comp>sys>mac>system (more info?)
|
|
|
I have a .profile in my home directory that sets some env vars and some
aliases. Terminal app reads this just fine. However, the terminal
window I get when I launch X11 does not.
Can I get a clue?
--
#############################
# John N. Alegre
# Andante Systems
# St. Paul, Minnesota
############################# >> Stay informed about: Why doesn't my X terminal use .profile? |
|
| Back to top |
|
 |  |
External

Since: Aug 13, 2003 Posts: 61
|
(Msg. 2) Posted: Thu Aug 05, 2004 6:55 pm
Post subject: Re: Why doesn't my X terminal use .profile? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Thu, 05 Aug 2004 21:40:59 GMT, John N. Alegre <info.DeleteThis@andante.mn.org> did write:
> I have a .profile in my home directory that sets some env vars and some
> aliases. Terminal app reads this just fine. However, the terminal
> window I get when I launch X11 does not.
Try aliasing .bashrc to it. Man bash will fill you in on
what startup files are read by interactive shells, noninteractive
shells, and a bunch of related stuff that I can never remember.
Why x11 and Terminal behave differently I have no idea.<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Why doesn't my X terminal use .profile? |
|
| Back to top |
|
 |  |
External

Since: Aug 05, 2004 Posts: 34
|
(Msg. 3) Posted: Thu Aug 05, 2004 6:55 pm
Post subject: Re: Why doesn't my X terminal use .profile? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On 2004-08-05, John N. Alegre <info RemoveThis @andante.mn.org> wrote:
> I have a .profile in my home directory that sets some env vars and some
> aliases. Terminal app reads this just fine. However, the terminal
> window I get when I launch X11 does not.
Is this a repeat? Wasn't there just a thread about this? ~/.profile
is only read by login shells. By default xterms do not run login
shells. As a result they use ~/.bashrc, not ~/.profile. Terminal, by
contrast, _is_ set up to run login shells by default. So they use
~/.profile.
> Can I get a clue?
Either set up your .Xresources so that xterm always runs a login
shell, or re-jigger your startup scripts so that both kinds of
interactive shells run all the initial commands you want. There are
lots of ways to do the latter.<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Why doesn't my X terminal use .profile? |
|
| Back to top |
|
 |  |
External

Since: May 21, 2004 Posts: 44
|
(Msg. 4) Posted: Thu Aug 05, 2004 6:55 pm
Post subject: Re: Why doesn't my X terminal use .profile? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Thanks Lee,
This worked fine. I just did "cp .profile .bashrc" and all is well. It
is odd that these two programs both use the bash shell and behave different.
Lee Phillips wrote:
> On Thu, 05 Aug 2004 21:40:59 GMT, John N. Alegre <info.TakeThisOut@andante.mn.org> did write:
>
>>I have a .profile in my home directory that sets some env vars and some
>>aliases. Terminal app reads this just fine. However, the terminal
>>window I get when I launch X11 does not.
>
>
> Try aliasing .bashrc to it. Man bash will fill you in on
> what startup files are read by interactive shells, noninteractive
> shells, and a bunch of related stuff that I can never remember.
> Why x11 and Terminal behave differently I have no idea.
john
--
#############################
# John N. Alegre
# Andante Systems
# St. Paul, Minnesota
#############################<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Why doesn't my X terminal use .profile? |
|
| Back to top |
|
 |  |
External

Since: May 21, 2004 Posts: 44
|
(Msg. 5) Posted: Thu Aug 05, 2004 6:55 pm
Post subject: Re: Why doesn't my X terminal use .profile? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Even better "ln .profile .bashrc" this way any change to .profile is
used in X11.
> Thanks Lee,
>
> This worked fine. I just did "cp .profile .bashrc" and all is well. It
> is odd that these two programs both use the bash shell and behave
> different.
>
> Lee Phillips wrote:
>
>> On Thu, 05 Aug 2004 21:40:59 GMT, John N. Alegre <info DeleteThis @andante.mn.org>
>> did write:
>>
>>> I have a .profile in my home directory that sets some env vars and
>>> some aliases. Terminal app reads this just fine. However, the
>>> terminal window I get when I launch X11 does not.
>>
>>
>>
>> Try aliasing .bashrc to it. Man bash will fill you in on
>> what startup files are read by interactive shells, noninteractive
>> shells, and a bunch of related stuff that I can never remember.
>> Why x11 and Terminal behave differently I have no idea.
>
> john
--
#############################
# John N. Alegre
# Andante Systems
# St. Paul, Minnesota
#############################<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Why doesn't my X terminal use .profile? |
|
| Back to top |
|
 |  |
External

Since: Nov 17, 2003 Posts: 73
|
(Msg. 6) Posted: Fri Aug 06, 2004 9:54 am
Post subject: Re: Why doesn't my X terminal use .profile? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
John N. Alegre <info.TakeThisOut@andante.mn.org> wrote:
> Even better "ln .profile .bashrc" this way any change to .profile is
> used in X11.
I can't think of an example, but it is conceivable to that you want a
login shell to behave differently from a non-login one.
So just move all initializations from the profile to the rc file. My
profile is just about empty and it's never bothered me.
V.
--
email: lastname at cs utk edu
homepage: cs utk edu tilde lastname<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Why doesn't my X terminal use .profile? |
|
| Back to top |
|
 |  |
External

Since: Jul 08, 2003 Posts: 13
|
(Msg. 7) Posted: Fri Aug 06, 2004 9:55 am
Post subject: Re: Why doesn't my X terminal use .profile? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
"John N. Alegre" <info RemoveThis @andante.mn.org> wrote in message news:<95388bb88527748671e07baaf8b82f23 RemoveThis @news.meganetnews.com>...
> I have a .profile in my home directory that sets some env vars and some
> aliases. Terminal app reads this just fine. However, the terminal
> window I get when I launch X11 does not.
>
> Can I get a clue?
If you launch xterm with the -ls option, the xterm will be a
login shell and will use your .profile.
From man xterm
-ls This option indicates that the shell that is started in the
xterm window will be a login shell (i.e., the first character
of argv[0] will be a dash, indicating to the shell that it
should read the user's .login or .profile).
In the x11 Applications menu -> Customize, edit the terminal item to read
xterm -ls
You can also put this into your ~/.xinitrc. My ~/.xinitrc looks
like this:
source /sw/bin/init.sh
xterm -ls -sb -sl 2000 -rightbar -fn 6x13 &
exec quartz-wm
--
-Bo Parker
The email address in the header is fake.<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Why doesn't my X terminal use .profile? |
|
| Back to top |
|
 |  |
External

Since: Aug 06, 2004 Posts: 1
|
(Msg. 8) Posted: Fri Aug 06, 2004 12:55 pm
Post subject: Re: Why doesn't my X terminal use .profile? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On 2004-08-06, sn00ge <sn00ge RemoveThis @hotmail.com> wrote:
> If you launch xterm with the -ls option, the xterm will be a
> login shell and will use your .profile.
If you really want every xterm to run a login shell, put
xterm*loginShell: true
in ~/.Xresources.
Personally I think running login shells all the time is silly. In
fact I pretty much never run a login shell except when I'm actually
logging in (through ssh). If bash were my preferred shell I'd put
everything in ~/.bashrc and have one line in ~/.profile:
.. ~/.bashrc
Since I prefer tcsh, I put everything in ~/.cshrc and I'm done.<!-- ~MESSAGE_AFTER~ --> >> Stay informed about: Why doesn't my X terminal use .profile? |
|
| Back to top |
|
 |  |
| Related Topics: | Can't apply display profile - Hi all- Something weird has started to happen with my G5 with 10.4.2...the display profile reverts to "Generic CRT display" and when I try to apply a different one (I have one calibrated for this monitor), it beeps, selects it, but doesn't ...
Changing user profile. - I have just switched to a Mac. For some reason when people recieve an email from me, instead of originally saying From: Jo Blogs, it now says From: Jo Blogs User. How do I change this back to Joe Blogs. Im using Entourage for emailing. Thanks
calibrating my ibook LCD: what profile should I choose? - I want to calibrate my monitor (mac LCD on an ibook) using the "Display Calibration" Assistant that comes with OSX (I know using a puck is more accurate but I'm broke!). My camera's color space is sRGB and there is no color profile in the Exif...
System Profile: Ram Information Not complete - Hello: can anybody help me on this? when i go to System profiler and i click in the MEMORY section, it doesnt give me all te information, it says: DIMM0/J19: Size: Empty Type: Empty Speed: Empty DIMM1/J20: Size: 256 MB Type: Unknown Speed: Unknown ...
Cannot calibrate the display. The factory profile for the .. - I just upgraded from a G4/450 to a G5 DP 2Hhz machine and am running two VGA monitors via the supplied DVI to VGA adaptor and a purchased Dr. Bott ADC to VGA adaptor. Before, I could calibrate my monitors, but now my 20" Mitsubishi Diamondtron moni... |
|
You can post new topics in this forum You can reply to topics in this forum You can edit your posts in this forum You can delete your posts in this forum You can vote in polls in this forum
|
|
|
|
 |
|
|