Re: bashrc problem

2022-01-12 Thread Yamadaえりな
Thanks a lot @Will Mengarini 

On Wed, Jan 12, 2022 at 8:21 PM Will Mengarini  wrote:

> * Yamada???  [22-01/12=We 20:10 +0800]:
> > Do you mean if .bash_profile exists, .bashrc will be ignored?
>
> Sometimes.  From `man bash`:
>   When bash is invoked as an interactive login shell, or as a
>   non-interactive shell with the --login option, it first reads
>   and executes commands from the file /etc/profile, if that file
>   exists.  After reading that file, it looks for ~/.bash_profile,
>   ~/.bash_login, and ~/.profile, in that order, and reads and
>   executes commands from the first one that exists and is readable.
>   [...]
>   When an interactive shell that is not a login shell
>   is started, bash reads and executes commands from
>   /etc/bash.bashrc and ~/.bashrc, if these files exist.
>
> * Yamada???  [22-01/12=We 19:49 +0800]:
> >>> I have a .bashrc file in my home dir, whose content is shown as
> follows.
> >>> But every time I log into the system, I have to source this file by
> hand.
> >>>
> >>> $ which scala
> >>> /usr/bin/scala
> >>>
> >>> $ cat .bashrc
> >>> #THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
> >>> export SDKMAN_DIR="$HOME/.sdkman"
> >>> [[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source \
> >>>   "$HOME/.sdkman/bin/sdkman-init.sh"
> >>>
> >>> $ . .bashrc
> >>> $ which scala
> >>> /home/xxx/.sdkman/candidates/scala/current/bin/scala
> >>>
> >>> How can I make it take effect automatically after I login the system?
>
> On Wed, Jan 12, 2022 at 8:07 PM Will Mengarini  wrote:
> >>
> >> Check whether you have either ~/.bash_profile or ~/.profile.
> >>
> >> If ~/.bash_profile, the line
> >>   . ~/.bashrc
> >> will suffice.
> >>
> >> If ~/.profile, use
> >>   # if running bash
> >>   if [ -n "$BASH_VERSION" ]; then
> >>   # include .bashrc if it exists
> >>   if [ -f ~/.bashrc ]; then
> >>   . ~/.bashrc
> >>   fi
> >>   fi
> >> in case you someday want to try other shells.
>


Re: bashrc problem

2022-01-12 Thread Will Mengarini
* Yamada???  [22-01/12=We 20:10 +0800]:
> Do you mean if .bash_profile exists, .bashrc will be ignored?

Sometimes.  From `man bash`:
  When bash is invoked as an interactive login shell, or as a
  non-interactive shell with the --login option, it first reads
  and executes commands from the file /etc/profile, if that file
  exists.  After reading that file, it looks for ~/.bash_profile,
  ~/.bash_login, and ~/.profile, in that order, and reads and
  executes commands from the first one that exists and is readable.
  [...]
  When an interactive shell that is not a login shell
  is started, bash reads and executes commands from
  /etc/bash.bashrc and ~/.bashrc, if these files exist.

* Yamada???  [22-01/12=We 19:49 +0800]:
>>> I have a .bashrc file in my home dir, whose content is shown as follows.
>>> But every time I log into the system, I have to source this file by hand.
>>>
>>> $ which scala
>>> /usr/bin/scala
>>>
>>> $ cat .bashrc
>>> #THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
>>> export SDKMAN_DIR="$HOME/.sdkman"
>>> [[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source \
>>>   "$HOME/.sdkman/bin/sdkman-init.sh"
>>>
>>> $ . .bashrc
>>> $ which scala
>>> /home/xxx/.sdkman/candidates/scala/current/bin/scala
>>>
>>> How can I make it take effect automatically after I login the system?

On Wed, Jan 12, 2022 at 8:07 PM Will Mengarini  wrote:
>>
>> Check whether you have either ~/.bash_profile or ~/.profile.
>>
>> If ~/.bash_profile, the line
>>   . ~/.bashrc
>> will suffice.
>>
>> If ~/.profile, use
>>   # if running bash
>>   if [ -n "$BASH_VERSION" ]; then
>>   # include .bashrc if it exists
>>   if [ -f ~/.bashrc ]; then
>>   . ~/.bashrc
>>   fi
>>   fi
>> in case you someday want to try other shells.



Re: bashrc problem

2022-01-12 Thread Will Mengarini
* Yamada???  [22-01/12=We 19:49 +0800]:
> I have a .bashrc file in my home dir, whose content is shown as follows.
> But every time I log into the system, I have to source this file by hand.
> 
> $ which scala
> /usr/bin/scala
> 
> $ cat .bashrc
> #THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
> export SDKMAN_DIR="$HOME/.sdkman"
> [[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source \
>   "$HOME/.sdkman/bin/sdkman-init.sh"
> 
> $ . .bashrc
> $ which scala
> /home/xxx/.sdkman/candidates/scala/current/bin/scala
> 
> How can I make it take effect automatically after I login the system?

Check whether you have either ~/.bash_profile or ~/.profile.

If ~/.bash_profile, the line
  . ~/.bashrc
will suffice.

If ~/.profile, use
  # if running bash
  if [ -n "$BASH_VERSION" ]; then
  # include .bashrc if it exists
  if [ -f ~/.bashrc ]; then
  . ~/.bashrc
  fi
  fi
in case you someday want to try other shells.



Re: bashrc problem

2022-01-12 Thread Yamadaえりな
Do you mean if .bash_profile exists, .bashrc will be ignored?

Thanks.

On Wed, Jan 12, 2022 at 8:07 PM Will Mengarini  wrote:

> * Yamada???  [22-01/12=We 19:49 +0800]:
> > I have a .bashrc file in my home dir, whose content is shown as follows.
> > But every time I log into the system, I have to source this file by hand.
> >
> > $ which scala
> > /usr/bin/scala
> >
> > $ cat .bashrc
> > #THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
> > export SDKMAN_DIR="$HOME/.sdkman"
> > [[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source \
> >   "$HOME/.sdkman/bin/sdkman-init.sh"
> >
> > $ . .bashrc
> > $ which scala
> > /home/xxx/.sdkman/candidates/scala/current/bin/scala
> >
> > How can I make it take effect automatically after I login the system?
>
> Check whether you have either ~/.bash_profile or ~/.profile.
>
> If ~/.bash_profile, the line
>   . ~/.bashrc
> will suffice.
>
> If ~/.profile, use
>   # if running bash
>   if [ -n "$BASH_VERSION" ]; then
>   # include .bashrc if it exists
>   if [ -f ~/.bashrc ]; then
>   . ~/.bashrc
>   fi
>   fi
> in case you someday want to try other shells.
>


bashrc problem

2022-01-12 Thread Yamadaえりな
Hello list

I have a .bashrc file in my home dir, whose content is shown as follows.

But every time I log into the system, I have to source this file by hand.

$ which scala
/usr/bin/scala

$ cat .bashrc
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
export SDKMAN_DIR="$HOME/.sdkman"
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source
"$HOME/.sdkman/bin/sdkman-init.sh"

$ . .bashrc
$ which scala
/home/xxx/.sdkman/candidates/scala/current/bin/scala


How can I make it take effect automatically after I login the system?

ありがとう
Yamada


Re: Some Bash Alias Statements Work, Others Don't.The subject line tells it all!? Debian Stretch (64bit).,,Without warning, or any other indications, some of the alias statements in my user .bashrc ar

2019-10-29 Thread Stephen P. Molnar

Thanks for the reply.

There doesn't seem to be any such demarcation.

On 10/29/2019 07:24 AM, Dan Purgert wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Stephen P. Molnar wrote:

The subject line tells it all!? Debian Stretch (64bit).

Without warning, or any other indications, some of the alias statements
in my user .bashrc are no longer working!.

The strange thing is that some still are working. Also, if I enter the
complete path to an executable whose alias is NOT working, the
executable works  Reentering the alias statement in .bashrc does not
restore the function.

Going out on a limb here -- is there specific point in your alias list
where things stop working (e.g. the 5th alias is OK, everything after
stops), or is it that aliases 1,3,7,and 9 all work, but 2,4,5,6,8 are
non-working?

-BEGIN PGP SIGNATURE-

iQEzBAEBCAAdFiEEBcqaUD8uEzVNxUrujhHd8xJ5ooEFAl24IXAACgkQjhHd8xJ5
ooEe4Qf+IrPAmTwjIm3Vd5kFJvLg1W2YR5spP3SJfaYqNip42MiYK+uHCDjWJhhb
uV9giwL2mjAkdLHCjm49crTEO1UBJuoRyj+hfZ1+ZS2jDZtsz3pLocTNHRTko4/z
8mb1sW8ddI5xt9VdRow+5/FlPOkqd39HnicKXLCGQ7hO+/px9LQ7dGyyFhdcmd/h
mAnCFfZKkOAOI2l3SCPE3bAnrJSgEg/+VLk1ZzOTvQ3Xu2bxdOO2qKT+gdJP7nr3
RW/PCS188GB9rV+mllKkEmzEymtvs3MjgLF0x+CTZY8zIpQZ8K9y6vxOsmH/czGe
tMy2VsTDXN4LScu5x2/ahpqqqaQRvQ==
=crfS
-END PGP SIGNATURE-



--
Stephen P. Molnar, Ph.D.
www.molecular-modeling.net
614.312.7528 (c)
Skype:  smolnar1



Re: Some Bash Alias Statements Work, Others Don't.The subject line tells it all!? Debian Stretch (64bit).,,Without warning, or any other indications, some of the alias statements in my user .bashrc

2019-10-29 Thread Dan Purgert
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Stephen P. Molnar wrote:
> The subject line tells it all!? Debian Stretch (64bit).
>
> Without warning, or any other indications, some of the alias statements 
> in my user .bashrc are no longer working!.
>
> The strange thing is that some still are working. Also, if I enter the 
> complete path to an executable whose alias is NOT working, the 
> executable works  Reentering the alias statement in .bashrc does not 
> restore the function.

Going out on a limb here -- is there specific point in your alias list
where things stop working (e.g. the 5th alias is OK, everything after
stops), or is it that aliases 1,3,7,and 9 all work, but 2,4,5,6,8 are
non-working?

-BEGIN PGP SIGNATURE-

iQEzBAEBCAAdFiEEBcqaUD8uEzVNxUrujhHd8xJ5ooEFAl24IXAACgkQjhHd8xJ5
ooEe4Qf+IrPAmTwjIm3Vd5kFJvLg1W2YR5spP3SJfaYqNip42MiYK+uHCDjWJhhb
uV9giwL2mjAkdLHCjm49crTEO1UBJuoRyj+hfZ1+ZS2jDZtsz3pLocTNHRTko4/z
8mb1sW8ddI5xt9VdRow+5/FlPOkqd39HnicKXLCGQ7hO+/px9LQ7dGyyFhdcmd/h
mAnCFfZKkOAOI2l3SCPE3bAnrJSgEg/+VLk1ZzOTvQ3Xu2bxdOO2qKT+gdJP7nr3
RW/PCS188GB9rV+mllKkEmzEymtvs3MjgLF0x+CTZY8zIpQZ8K9y6vxOsmH/czGe
tMy2VsTDXN4LScu5x2/ahpqqqaQRvQ==
=crfS
-END PGP SIGNATURE-

-- 
|_|O|_| 
|_|_|O| Github: https://github.com/dpurgert
|O|O|O| PGP: 05CA 9A50 3F2E 1335 4DC5  4AEE 8E11 DDF3 1279 A281



Some Bash Alias Statements Work, Others Don't.The subject line tells it all!? Debian Stretch (64bit).,,Without warning, or any other indications, some of the alias statements in my user .bashrc are no

2019-10-29 Thread Stephen P. Molnar

The subject line tells it all!? Debian Stretch (64bit).

Without warning, or any other indications, some of the alias statements 
in my user .bashrc are no longer working!.


The strange thing is that some still are working. Also, if I enter the 
complete path to an executable whose alias is NOT working, the 
executable works  Reentering the alias statement in .bashrc does not 
restore the function.


If I enter the alias statement in a terminal the alias works for that 
session of the terminal.


The only thing that Google has yielded is when all of the alias 
statements stop working.


This is inconvenient and very annoying. AS solution to the problem will 
be much appreciated.


Thanks in advance.

--
Stephen P. Molnar, Ph.D.
www.molecular-modeling.net
614.312.7528 (c)
Skype:  smolnar1



Re: Strange .bashrc Problem

2018-04-25 Thread Stephen P. Molnar

Thanks for the reply.

Adding the lines from your .bash_profile to mine restored the 
functionality of .bashrc.


I don't have any backups of .bash_profile, but I would guess the the HEX 
installation script woped out the origional .bash_profile.  ( I try to 
never assume anything as we all know how that work can be parsed).


An any rate, my thanks for the answers.

The assistance that is so forthcoming is one of the things that makes 
Linux the OS of choice!


On 04/25/2018 03:40 PM, Andy Smith wrote:

Hello,

On Wed, Apr 25, 2018 at 03:34:02PM -0400, Stephen P. Molnar wrote:

Whie the additional lines are necessary for the execution of HEX they seem
to have wiped oour all of the alias entries I have in .bashrc.  Rebooting
the system does not eliminate the problem!  Bu bumbling about I discovered
the it is necessary to source .bashrc inorder to recticate the alias lines
in .bashrc (note:  commenting out the added lines in .bash_profile did not
solve the problem).

My .bash_profile contains:

# include .bashrc if it exists
if [ -f ~/.bashrc ]; then
 . ~/.bashrc
fi

Does yours (still)?

Maybe you could compare your ,bash_profile now to one from your
recent backups.

Cheers,
Andy



--
Stephen P. Molnar, Ph.D.
Consultant
www.molecular-modeling.net
(614)312-7528 (c)
Skype: smolnar1



Re: Strange .bashrc Problem

2018-04-25 Thread Greg Wooledge
On Wed, Apr 25, 2018 at 10:49:52PM +0300, Abdullah Ramazanoglu wrote:
> It seems like when ~/.bash_profile did not exist, then ~/.bashrc is called
> directly.

That's not correct.

As a LOGIN shell, bash reads ONE file, searching among the following items
in sequence:

a) ~/.bash_profile
b) ~/.bash_login
c) ~/.profile

Whichever one it finds first, that's what it reads.  If you also want it
to read ~/.bashrc (you DO want this), then you must ensure that ~/.bashrc
gets sourced/dotted from whatever file bash DOES read.

> I gather that you had no ~/.bash_profile prior to installing HEX.

That's my guess as well.

> So I would suggest simply sourcing ~/.bashrc at the last line of 
> ~/.bash_profile

If he has other stuff in ~/.profile then he may want to source ~/.profile
instead.  Then ~/.profile can source ~/.bashrc and everything should be
back to normal.



Re: Strange .bashrc Problem

2018-04-25 Thread Greg Wooledge
On Wed, Apr 25, 2018 at 03:34:02PM -0400, Stephen P. Molnar wrote:
> Bu bumbling about I discovered
> the it is necessary to source .bashrc inorder to recticate the alias lines
> in .bashrc (note:  commenting out the added lines in .bash_profile did not
> solve the problem).
> 
> What's going on what is the fix?

It is normal and expected that you must source (or dot in) ~/.bashrc
from your ~/.bash_profile or ~/.profile.

If this previously worked for you and then STOPPED working when you
installed HEX, then two possible things come to mind:

1) Installing HEX somehow removed the ". ~/.bashrc" code from your profile.

2) Installing HEX created a ~/.bash_profile that previously did not exist.
   Before this, you were using ~/.profile which is what Debian creates
   in a default stretch install.

#2 seems more likely to me.  If that's the case, then perhaps what you
want to do is source ~/.profile from your ~/.bash_profile.  Or perhaps
you would prefer to merge the two into a single file.

A lot will depend on how you believe HEX will handle future upgrades.
Will it search for its installed content in your ~/.bash_profile and
blindly append its content to ~/.bash_profile if it doesn't see it?
Even if the content is actually in ~/.profile instead?



Re: Strange .bashrc Problem

2018-04-25 Thread Abdullah Ramazanoglu
On Wed, 25 Apr 2018 15:34:02 -0400 Stephen P. Molnar said:

> What's going on what is the fix?

It seems like when ~/.bash_profile did not exist, then ~/.bashrc is called
directly. However, when ~/.bash_profile did exist, then it is called *instead
of* ~/.bashrc and it is up to ~/.bash_profile to source ~/.bashrc or not.

I gather that you had no ~/.bash_profile prior to installing HEX.

So I would suggest simply sourcing ~/.bashrc at the last line of ~/.bash_profile

Regards
-- 
Abdullah Ramazanoglu




Re: Strange .bashrc Problem

2018-04-25 Thread Andy Smith
Hello,

On Wed, Apr 25, 2018 at 03:34:02PM -0400, Stephen P. Molnar wrote:
> Whie the additional lines are necessary for the execution of HEX they seem
> to have wiped oour all of the alias entries I have in .bashrc.  Rebooting
> the system does not eliminate the problem!  Bu bumbling about I discovered
> the it is necessary to source .bashrc inorder to recticate the alias lines
> in .bashrc (note:  commenting out the added lines in .bash_profile did not
> solve the problem).

My .bash_profile contains:

# include .bashrc if it exists
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

Does yours (still)?

Maybe you could compare your ,bash_profile now to one from your
recent backups.

Cheers,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting



Strange .bashrc Problem

2018-04-25 Thread Stephen P. Molnar
I am running Debian Stretch on my 64-bit Linux platform.  I have just 
installed the molecular docking program HEX. The installation program 
added the line shown below to .bash_profile:


#
#  Lines added by 'hex_setup.bin' for Hex 8.0.0
#

export HEX_ROOT=/home/comp/Apps/Hex
export HEX_VERSION=8.0.0
export PATH=${PATH}:${HEX_ROOT}/bin

export HEX_CACHE=/home/comp/Apps/Hex/hex_cache

Whie the additional lines are necessary for the execution of HEX they 
seem to have wiped oour all of the alias entries I have in .bashrc.  
Rebooting the system does not eliminate the problem!  Bu bumbling about 
I discovered the it is necessary to source .bashrc inorder to recticate 
the alias lines in .bashrc (note:  commenting out the added lines in 
.bash_profile did not solve the problem).


What's going on what is the fix?

Thanks in advance.

--
Stephen P. Molnar, Ph.D.
Consultant
www.molecular-modeling.net
(614)312-7528 (c)
Skype: smolnar1



Re: /etc/bash.bashrc instead ~/.bashrc

2012-06-23 Thread Claudius Hubig
Hello José,

José Luis Segura Lucas  wrote:
> I don't remember to write or generate "by hand" this ~/.profile. Is it
> created automatically?

It should be created automatically from the files in /etc/skel/ if
you are using useradd or adduser (the former with the --create-home
option).

Best regards,

Claudius
-- 
Monday is an awful way to spend one seventh of your life.
http://chubig.net  telnet nightfall.org 4242


signature.asc
Description: PGP signature


Re: /etc/bash.bashrc instead ~/.bashrc

2012-06-23 Thread Chris Bannister
On Sat, Jun 23, 2012 at 05:24:59PM +0200, José Luis Segura Lucas wrote:
> You are right: I have the ~/.profile file missing. I don't know how can
> I miss this file, but it didn't exist at all. I copied this from another
> computer and it works.

tal% less .profile
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

-- 
"If you're not careful, the newspapers will have you hating the people
who are being oppressed, and loving the people who are doing the 
oppressing." --- Malcolm X


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120623164932.GB14371@tal



Re: /etc/bash.bashrc instead ~/.bashrc

2012-06-23 Thread José Luis Segura Lucas
Hello Claudius

El 23/06/12 11:42, Claudius Hubig escribió:
> 
> I guess that the SSH connect is a login shell, while the terminal is
> not a login shell (especially if you run it manually).
> 
> Hence, if you connect with SSH, Bash will run /etc/profile and
> ~/.profile. My ~/.profile has a section like the following:
> 
> # if running bash
> if [ -n "$BASH_VERSION" ]; then
> # include .bashrc if it exists
> if [ -f "$HOME/.bashrc" ]; then
>   . "$HOME/.bashrc"
> fi
> fi
> 
> which is also in the .profile in /etc/skel/, I therefore assume that
> this is currently shipped with Debian.
> 
> I suggest you check whether these files (/etc/profile, ~/.profile,
> ~/.bash_profile) exist and whether they load ~/.bashrc.
> 
> Best regards,
> 
> Claudius

You are right: I have the ~/.profile file missing. I don't know how can
I miss this file, but it didn't exist at all. I copied this from another
computer and it works.

I don't remember to write or generate "by hand" this ~/.profile. Is it
created automatically?

Thanks for your answer, it was driving me crazy :D

Best regards




signature.asc
Description: OpenPGP digital signature


Re: /etc/bash.bashrc instead ~/.bashrc

2012-06-23 Thread Claudius Hubig
Hello José,

José Luis Segura Lucas  wrote:
> In one (and only one) of then, when I open a terminal or connect by SSH,
> my bash load the default system configuration from /etc/bash.bashrc,
> instead of reading, as usual, ~/.bashrc.
> 
> I can think that I don't really have a ~/.bashrc (or have a mispelling
> on the file name), but if I run bash from the terminal, my configuration
> file in ~/.bashrc is loaded.

From man bash:

   When bash is invoked as an interactive login shell, or as a
   non-interactive shell with the --login option, it first reads
   and executes commands from the file /etc/profile, if that file
   exists.  After reading that file, it looks for
   ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order,
   and reads and executes commands from the first one that exists
   and is readable.  The --noprofile option may be used when the
   shell is started to inhibit this behavior.

   When a login shell exits, bash reads and executes commands
   from the file ~/.bash_logout, if it exists.

   When an interactive shell that is not a login shell is
   started, bash reads and executes commands
   from /etc/bash.bashrc and ~/.bashrc, if these files exist.
   This may be inhibited by using the --norc option.  The
   --rcfile file option will force bash to read and execute
   commands from file instead of /etc/bash.bashrc and ~/.bashrc.


I guess that the SSH connect is a login shell, while the terminal is
not a login shell (especially if you run it manually).

Hence, if you connect with SSH, Bash will run /etc/profile and
~/.profile. My ~/.profile has a section like the following:

# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi

which is also in the .profile in /etc/skel/, I therefore assume that
this is currently shipped with Debian.

I suggest you check whether these files (/etc/profile, ~/.profile,
~/.bash_profile) exist and whether they load ~/.bashrc.

Best regards,

Claudius
-- 
Cat, n.:
Lapwarmer with built-in buzzer.
http://chubig.net  telnet nightfall.org 4242


signature.asc
Description: PGP signature


/etc/bash.bashrc instead ~/.bashrc

2012-06-22 Thread José Luis Segura Lucas
Hi all!

I have several computers with Debian installed. In all of them I have
unstable with, in some cases, some experimental packages.

In one (and only one) of then, when I open a terminal or connect by SSH,
my bash load the default system configuration from /etc/bash.bashrc,
instead of reading, as usual, ~/.bashrc.

I can think that I don't really have a ~/.bashrc (or have a mispelling
on the file name), but if I run bash from the terminal, my configuration
file in ~/.bashrc is loaded.

I add an "echo" on each files before sending you my problem to check
that the problem is the configuration file and not only a possible
misconfiguration on my ~/.bashrc file.

I tried with different users and all of them loads the same
configuration file (/etc/bash.bashrc). I didn't found any difference
between this /etc/bash.bashrc and my other /etc/bash.bashrc in my other
Debian installations...

Is there any other place where bash is configured and tell it to load
one config file or another?

I don't know what to do to fix this problem... any help will be very
appreciated.

Thanks in advance




signature.asc
Description: OpenPGP digital signature


Re: bashrc, bash_profile, /etc/skel/ - Debian Squeeze

2010-09-06 Thread Csanyi Pal
Pier Paolo  writes:

>   I guess the /etc/skel debian directory isn't actually empty: try ls
> --all /etc/skel 

Uh, yes, of course!!

> You've to restore your fancy-console-files from a previous backup or
> browsing in gentoo svn to find the files (maybe some base-files or
> something) 

After I copy .bashrc and .profile to my $HOME directory, and setup owner
for these files to be owned by user: by me, everything back to the
normal. Thanks!

OK, I edited these files and add some lines there, like:
EDITOR=emacsclient; export EDITOR

-- 
Regards, Paul Chany
http://www.debian.org
http://wiki.debian.org/DebianEdu
http://csanyi-pal.info


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/87eid7dvhc@debian-asztal.excito



Re: bashrc, bash_profile, /etc/skel/ - Debian Squeeze

2010-09-06 Thread Jochen Schulz
Csanyi Pal:
> 
> When I installed 64bit Debian GNU/Linux Squeeze, I used my $HOME
> directory with it's dot files too.
> 
> So, I think the .bashrc and .bash_profile remain in the state in which
> was on Gentoo.

Yes, that's how it should be. Debian package managers must never touch
anything under /home.

> Now I have the empty /etc/skel/ directory!

Check with ls -la.

> I try to reinstall bash, but still get not in my $HOME directory the
> "debianized" .bashrc and .bash_profile,

This is by design. Debian never overwrites user files.

> and still the /etc/skel/ directory is empty. What should I reinstall
> to get the default /etc/skel/ directory?

What do you need that for? It is only used when you create new users.

J.
-- 
Driving behind lorries carrying hazardous chemicals makes me wish for a
simpler life.
[Agree]   [Disagree]
 <http://www.slowlydownward.com/NODATA/data_enter2.html>


signature.asc
Description: Digital signature


Re: bashrc, bash_profile, /etc/skel/ - Debian Squeeze

2010-09-06 Thread Pier Paolo
  ¡Warning: bad english here!

  I guess the /etc/skel debian directory isn't actually empty: try ls --all
/etc/skel
You've to restore your fancy-console-files from a previous backup or
browsing in gentoo svn to find the files (maybe some base-files or
something)

On Mon, Sep 6, 2010 at 10:29, Csanyi Pal  wrote:

> Hi,
>
> I was tried Gentoo Linux system but after a while I come back to Debian
> GNU/Linux system again on my PC Box.
>
> So, in my /home/csanyipal/ directory there remain some dot files from
> Gentoo system, eg.: .bashrc, .bash_profile.
>
> When I installed 64bit Debian GNU/Linux Squeeze, I used my $HOME
> directory with it's dot files too.
>
> So, I think the .bashrc and .bash_profile remain in the state in which
> was on Gentoo.
>
> Now I have the empty /etc/skel/ directory!
>
> I try to reinstall bash, but still get not in my $HOME directory the
> "debianized" .bashrc and .bash_profile, and still the /etc/skel/
> directory is empty. What should I reinstall to get the default
> /etc/skel/ directory?
>
> When 'ls' on my bash prompt, I get not colorized output too.
>
> How can I get the default BASH shell, with default .bashrc and
> .bash_profile again, and why is the /etc/skel/ directory empty?
>
> Any advices will be appreciated!
>
> --
> Regards, Paul Chany
> You can freely correct me in my English.
> http://csanyi-pal.info
>
>
> --
> To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact
> listmas...@lists.debian.org
> Archive: http://lists.debian.org/877hizuvej@debian-asztal.excito
>
>


bashrc, bash_profile, /etc/skel/ - Debian Squeeze

2010-09-06 Thread Csanyi Pal
Hi,

I was tried Gentoo Linux system but after a while I come back to Debian
GNU/Linux system again on my PC Box.

So, in my /home/csanyipal/ directory there remain some dot files from
Gentoo system, eg.: .bashrc, .bash_profile.

When I installed 64bit Debian GNU/Linux Squeeze, I used my $HOME
directory with it's dot files too.

So, I think the .bashrc and .bash_profile remain in the state in which
was on Gentoo.

Now I have the empty /etc/skel/ directory!

I try to reinstall bash, but still get not in my $HOME directory the
"debianized" .bashrc and .bash_profile, and still the /etc/skel/
directory is empty. What should I reinstall to get the default
/etc/skel/ directory?

When 'ls' on my bash prompt, I get not colorized output too.

How can I get the default BASH shell, with default .bashrc and
.bash_profile again, and why is the /etc/skel/ directory empty?

Any advices will be appreciated!

-- 
Regards, Paul Chany
You can freely correct me in my English.
http://csanyi-pal.info


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/877hizuvej@debian-asztal.excito



Re: Which files do what: .bashrc and friends

2008-11-20 Thread Emanoil Kotsev
Boyd Stephen Smith Jr. wrote:

> On Wednesday 19 November 2008, tyler <[EMAIL PROTECTED]> wrote
> about 'Re: Which files do what: .bashrc and friends':
>>I believe .profile and .bash_profile are synonyms, so you'd only use one
>>or the other.
> 
> .profile is only used by bash when it cannot find .bash_profile.  .profile
> is also used by the traditional Bourne shell and Korn shell and is the
> standard location of such commands.

Yes, this is what I also prefer. If using .bash_profile i.e. when specific
things related to bash only are setup, I take care to check if .profile is
sourced and if not source it out.

For konsole I setup alias with konsole -ls

regards



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Which files do what: .bashrc and friends

2008-11-19 Thread John Hasler
>From the INVOCATION section of the Bash man page:

   When bash is invoked as an interactive login shell, or as a
   non-interactive shell with the --login option, it first reads and
   executes commands from the file /etc/profile, if that file exists.
   After reading that file, it looks for ~/.bash_profile,
   ~/.bash_login, and ~/.profile, in that order, and reads and executes
   commands from the first one that exists and is readable.  The
   --noprofile option may be used when the shell is started to inhibit
   this behavior.

   When a login shell exits, bash reads and executes commands from the
   file ~/.bash_logout, if it exists.

   When an interactive shell that is not a login shell is started, bash
   reads and executes commands from /etc/bash.bashrc and ~/.bashrc, if
   these files exist.  This may be inhibited by using the --norc
   option.  The --rcfile file option will force bash to read and
   execute commands from file instead of /etc/bash.bashrc and
   ~/.bashrc.


-- 
John Hasler


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Which files do what: .bashrc and friends

2008-11-19 Thread s. keeling
Mike McCarty <[EMAIL PROTECTED]>:
>  Dotan Cohen wrote:
> > 
> > .bashrc
> 
>  Run once for each interactive shell, after .profile

... if called by .profile or .bash_profile.

A long time ago, this was automatic (a la ksh and ENV; if ENV =
~/.kshrc, then ~/.kshrc was run on login shell invocation).  Every
bash install I've seen in years has ". .bashrc" in the stock install
.bash_profile, meaning it's no longer automatic.


-- 
Any technology distinguishable from magic is insufficiently advanced.
(*)http://blinkynet.net/comp/uip5.html  Linux Counter #80292
- -http://www.faqs.org/rfcs/rfc1855.htmlPlease, don't Cc: me.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Which files do what: .bashrc and friends

2008-11-19 Thread François Cerbelle

Dotan Cohen a écrit :

Thanks in advance. If there are any good docs that explain this, I'd
love to see them. I have not been able to google anything recent that
is relevant to Debian.


Quick'n dirty solution :

Another way to know, even if it does not cover all cases, is to put the 
following line at the beginning of each :

echo `basename $0` is running

Fanfan


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: Which files do what: .bashrc and friends

2008-11-19 Thread Teemu Likonen
Boyd Stephen Smith Jr. (2008-11-19 14:37 -0600) wrote:

>>1) Is a login shell run when the user logs onto KDE (even though he
>>does not see a konsole window)?
>
> Nope a login shell is when bash is executed with the -l option, or having 
> an argv[0] starting with '-'.

If K Display Manager (kdm) is installed file "/etc/kde3/kdm/Xsession"
executes user's login shell, for example "$HOME/.bash_profile" which in
turn might source .bashrc too.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Which files do what: .bashrc and friends

2008-11-19 Thread tyler
"Boyd Stephen Smith Jr." <[EMAIL PROTECTED]> writes:

> On Wednesday 19 November 2008, "Dotan Cohen" <[EMAIL PROTECTED]> wrote about 
> 'Re: Which files do 
> what: .bashrc and friends':
>>1) Is a login shell run when the user logs onto KDE (even though he
>>does not see a konsole window)?
>
> Nope a login shell is when bash is executed with the -l option, or having 
> an argv[0] starting with '-'.
>
> If you want things to run when KDE starts up, you can use .kde/env 
> and .kde/Autostart.  All readable files in .kde/env are sourced by 
> the /usr/bin/startkde script, which is run by /bin/sh.  All .desktop files 
> in .kde/Autostart are "activated" (by kdeinit or somesuch, around the same 
> time your session is restored; .desktop file are like things in KMenu, they 
> might open a file, start a program, whatever).
>

Aha! I assumed since kdm was where KDE users login from, then it must
call .*profile in the process. Seems strange that you could be
logged in without having actually encountered a login shell. Google
gave me this, which helped to explain it:

http://ubuntuforums.org/archive/index.php/t-350855.html

Cheers,

Tyler


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Which files do what: .bashrc and friends

2008-11-19 Thread Boyd Stephen Smith Jr.
On Wednesday 19 November 2008, "Dotan Cohen" <[EMAIL PROTECTED]> wrote about 
'Re: Which files do 
what: .bashrc and friends':
>1) Is a login shell run when the user logs onto KDE (even though he
>does not see a konsole window)?

Nope a login shell is when bash is executed with the -l option, or having 
an argv[0] starting with '-'.

If you want things to run when KDE starts up, you can use .kde/env 
and .kde/Autostart.  All readable files in .kde/env are sourced by 
the /usr/bin/startkde script, which is run by /bin/sh.  All .desktop files 
in .kde/Autostart are "activated" (by kdeinit or somesuch, around the same 
time your session is restored; .desktop file are like things in KMenu, they 
might open a file, start a program, whatever).

>2) Is an interactive shell the term used for opening a konsole window?

Yes.  An interactive shell is any shell where stdin AND stderr are 
terminals (tty or pty).  When konsole (and other X11 terminal applications) 
use a shell, they attach stdin, stdout, and stderr to a pseudo-terminal 
(pty; slave side) created by them.

(This leaves non-interactive shells; those when stdin or stderr are not 
attached to a terminal.)

An example:
[EMAIL PROTECTED]:~$ grep keychain .bash_profile
[[ -t 0 ]] && [[ -x ~/bin/keychain-load.bash ]] && eval 
"$(~/bin/keychain-load.bash)"
[EMAIL PROTECTED]:~$ cat bin/keychain-load.bash
#! /bin/bash
# Starts and loads the keychain, interacting with the user as needed.
# May start gnupg-agent, but doesn't prompt for keys because gnupg-agent
# regularly times out keys.
# Since interaction is clearly available, we clear the keychain before adding
# keys (assume user is an attacker).
if [ -x /usr/bin/keychain ]; then
SSH_KEYS=('id_dsa')
eval "$(/usr/bin/keychain --eval --inherit any-once --stop others \
--clear "[EMAIL PROTECTED]")"
fi
[EMAIL PROTECTED]:~$ grep -A 1 keychain .bashrc
if [ -x ~/bin/keychain-start.sh ]; then
. ~/bin/keychain-start.sh
fi
[EMAIL PROTECTED]:~$ cat bin/keychain-start.sh
#! /bin/sh
# Starts keychain or initializes the environment, but requires no interactivity.
if [ -x /usr/bin/keychain ]; then
{ eval "$(/usr/bin/keychain --eval --quiet --inherit any-once --stop 
others --noask --lockwait 
0)"; } >/dev/null 2>&1
fi
[EMAIL PROTECTED]:~$ cd .kde
/home/bss/.kde
[EMAIL PROTECTED]:~/.kde$ ls env Autostart
Autostart:
keychain-load.desktop

env:
gtk-qt-engine.rc.sh  keychain-start.sh  ssh-askpass.sh
[EMAIL PROTECTED]:~/.kde$ # env/keychain-start.sh is a hard link to 
~/bin/keychain-start.sh
[EMAIL PROTECTED]:~/.kde$ cat Autostart/keychain-load.desktop
[Desktop Entry]
Name=Load Keychain
Comment=Start agents and add keys to them.
Exec=/home/bss/bin/keychain-load.bash
Terminal=true
StartupNotify=false
Type=Application
Encoding=UTF-8
-- 
Boyd Stephen Smith Jr. ,= ,-_-. =. 
[EMAIL PROTECTED]  ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy   `-'(. .)`-' 
http://iguanasuicide.org/  \_/ 


signature.asc
Description: This is a digitally signed message part.


Re: Which files do what: .bashrc and friends

2008-11-19 Thread Boyd Stephen Smith Jr.
On Wednesday 19 November 2008, tyler <[EMAIL PROTECTED]> wrote 
about 'Re: Which files do what: .bashrc and friends':
>I believe .profile and .bash_profile are synonyms, so you'd only use one
>or the other.

.profile is only used by bash when it cannot find .bash_profile.  .profile 
is also used by the traditional Bourne shell and Korn shell and is the 
standard location of such commands.
-- 
Boyd Stephen Smith Jr. ,= ,-_-. =. 
[EMAIL PROTECTED]  ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy   `-'(. .)`-' 
http://iguanasuicide.org/  \_/ 


signature.asc
Description: This is a digitally signed message part.


Re: Which files do what: .bashrc and friends

2008-11-19 Thread Mike McCarty

Dotan Cohen wrote:

On a Debian-based system running KDE 3.5.10 I see several files that
are used when logging in / starting a Konsole:

.profile


Run once upon login.


.bash_history


List of previous commands for recall/edit/re execution


.bash_logout


Run once upon logout


.bash_profile


I believe equivalent to .profile


.bashrc


Run once for each interactive shell, after .profile

The main difference between .profile and .bashrc is that
.profile only gets run when you start a "login shell",
but .bashrc gets run for all shells.

So, for example, if you use

$ su -

you'll run root's .profile and .bashrc, but

$ su

only runs root's .bashrc

Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
Oppose globalization and One World Governments like the UN.
This message made from 100% recycled bits.
You have found the bank of Larn.
I speak only for myself, and I am unanimous in that!


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: Which files do what: .bashrc and friends

2008-11-19 Thread tyler
"Dotan Cohen" <[EMAIL PROTECTED]> writes:

> 2008/11/19 tyler <[EMAIL PROTECTED]>:
>> "Dotan Cohen" <[EMAIL PROTECTED]> writes:
>>
>>> On a Debian-based system running KDE 3.5.10 I see several files that
>>> are used when logging in / starting a Konsole:
>>>
>>> .profile
>>> .bash_history
>>> .bash_logout
>>> .bash_profile
>>> .bashrc
>>>
>>> Thanks in advance. If there are any good docs that explain this, I'd
>>> love to see them. I have not been able to google anything recent that
>>> is relevant to Debian.
>>
>> man bash answers most of your questions:
>>
>>
>
> Thanks, Tyler. I had read man bash so long ago that I forgot what was
> there, and didn't think to review it. Just to confirm (as in CS so
> many things are counter intuitive):
> 1) Is a login shell run when the user logs onto KDE (even though he
> does not see a konsole window)?

Yes.

> 2) Is an interactive shell the term used for opening a konsole window?

Yes.

Cheers,

Tyler

-- 



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Which files do what: .bashrc and friends

2008-11-19 Thread Dotan Cohen
2008/11/19 tyler <[EMAIL PROTECTED]>:
> "Dotan Cohen" <[EMAIL PROTECTED]> writes:
>
>> On a Debian-based system running KDE 3.5.10 I see several files that
>> are used when logging in / starting a Konsole:
>>
>> .profile
>> .bash_history
>> .bash_logout
>> .bash_profile
>> .bashrc
>>
>> Thanks in advance. If there are any good docs that explain this, I'd
>> love to see them. I have not been able to google anything recent that
>> is relevant to Debian.
>
> man bash answers most of your questions:
>
> FILES
>   /bin/bash
>  The bash executable
>   /etc/profile
>  The systemwide initialization file, executed for login shells
>   /etc/bash.bashrc
>  The systemwide per-interactive-shell startup file
>   /etc/bash.logout
>  The systemwide login shell cleanup file, executed when a login 
> shell exits
>   ~/.bash_profile
>  The personal initialization file, executed for login shells
>   ~/.bashrc
>  The individual per-interactive-shell startup file
>   ~/.bash_logout
>  The individual login shell cleanup file, executed when a login 
> shell exits
>   ~/.inputrc
>  Individual readline initialization file
>
> I believe .profile and .bash_profile are synonyms, so you'd only use one
> or the other. .bash_history holds your command line history, and is not
> used for runtime configuration. I'm not sure what shell scripts run from
> another application do. I would guess they stuff done in .bashrc would
> affect them, but not stuff in  *profile.
>
> Cheers,
>
> Tyler
>

Thanks, Tyler. I had read man bash so long ago that I forgot what was
there, and didn't think to review it. Just to confirm (as in CS so
many things are counter intuitive):
1) Is a login shell run when the user logs onto KDE (even though he
does not see a konsole window)?
2) Is an interactive shell the term used for opening a konsole window?

Thanks!

-- 
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il

א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я
а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
ä-ö-ü-ß-Ä-Ö-Ü


Re: Which files do what: .bashrc and friends

2008-11-19 Thread tyler
"Dotan Cohen" <[EMAIL PROTECTED]> writes:

> On a Debian-based system running KDE 3.5.10 I see several files that
> are used when logging in / starting a Konsole:
>
> .profile
> .bash_history
> .bash_logout
> .bash_profile
> .bashrc
>
> Thanks in advance. If there are any good docs that explain this, I'd
> love to see them. I have not been able to google anything recent that
> is relevant to Debian.

man bash answers most of your questions:

FILES
   /bin/bash
  The bash executable
   /etc/profile
  The systemwide initialization file, executed for login shells
   /etc/bash.bashrc
  The systemwide per-interactive-shell startup file
   /etc/bash.logout
  The systemwide login shell cleanup file, executed when a login 
shell exits
   ~/.bash_profile
  The personal initialization file, executed for login shells
   ~/.bashrc
  The individual per-interactive-shell startup file
   ~/.bash_logout
  The individual login shell cleanup file, executed when a login 
shell exits
   ~/.inputrc
  Individual readline initialization file

I believe .profile and .bash_profile are synonyms, so you'd only use one
or the other. .bash_history holds your command line history, and is not
used for runtime configuration. I'm not sure what shell scripts run from
another application do. I would guess they stuff done in .bashrc would
affect them, but not stuff in  *profile.

Cheers,

Tyler



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Which files do what: .bashrc and friends

2008-11-19 Thread Dotan Cohen
On a Debian-based system running KDE 3.5.10 I see several files that
are used when logging in / starting a Konsole:

.profile
.bash_history
.bash_logout
.bash_profile
.bashrc

I imagine three times these files might be used:
1) When logging in
2) When starting Konsole
3) When running a shell script via Konqeror

In which of the files should I put commands that I want to run at each
of these events? For instance, if I want a certain command to be run
when I log in, should that be in .bashrc, .profile, .bash_profile, or
elsewhere? If I want a command to be run when I open Konsole, where
would that go? How about a command that I want run before every script
that I run from my file manager (an example of such a use would be a
local export)?

Thanks in advance. If there are any good docs that explain this, I'd
love to see them. I have not been able to google anything recent that
is relevant to Debian.

-- 
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il

א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת
А-Б-В-Г-Д-Е-Ё-Ж-З-И-Й-К-Л-М-Н-О-П-Р-С-Т-У-Ф-Х-Ц-Ч-Ш-Щ-Ъ-Ы-Ь-Э-Ю-Я
а-б-в-г-д-е-ё-ж-з-и-й-к-л-м-н-о-п-р-с-т-у-ф-х-ц-ч-ш-щ-ъ-ы-ь-э-ю-я
ä-ö-ü-ß-Ä-Ö-Ü


Re: .bash_profile and .bashrc not executing

2008-01-14 Thread Bob McGowan

John Salmon wrote:

Martin Marcher <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]: 


On Saturday 12 January 2008 20:50 John Salmon wrote:


I'm a new user to Debian Linux. I have the latest version loaded on a
dedicated PC with all the default settings. I have added a ~/bin
directory to my system. My .bash_profile and .bashrc files were the
default files loaded during the install. However, my PATH remains
unchanged when I log on even though the .bash_profile file has the
lines to add my ~/bin directory. I can make the change manually after
I've logged on and can execute files that are in that directory.
Also, the aliases set in my .bashrc file don't work. As a check, I've
set environment variables in both files and they return null with
echo after logging on. I haven't tried re-installing the system from
scratch. 


Any suggestions?

you did re-login after the changes did you? (i think "bash -l" also
behaves like a full re-llogin)

hth
martin



Yes, I did. In fact, I also tried re-booting the system.

Another thing, I tried to run ~/.bash_profile and got "\bash: 
/home/johns/.bash_profile: Permission denied" (johns is me). ls -al shows 
.bash_prfile access has no execute permission set.




John,

I recently posted a rather long description of how the shell deals with 
files, whether executable (binary or scripts) or "sourced".


Bottom line, if the shell knows the name of the file and that the file 
is a script, it needs then to be able to read it.


You did not post the ls -l output, so I can't say if permissions might 
be the issue or not.  The first field of ls -l should be at least a dash 
followed by the letter 'r', followed by either a dash or 'w', etc.


You also didn't say whether you're login is from the GUI (xdm, kdm, gdm) 
or from a console in text mode.


If you logged in using the GUI, you should switch to a console and do a 
text mode login to see if you get any error messages from the shell. 
Or, from a shell window after the GUI login, you can use 'bash -l' at 
the command prompt, as suggested above, to start a new shell that acts 
like a login shell.


If any errors are reported, that is the likely cause of your problem, 
since the shell will abort processing the startup files when an error is 
found.


--
Bob McGowan


smime.p7s
Description: S/MIME Cryptographic Signature


Re: .bash_profile and .bashrc not executing

2008-01-13 Thread s. keeling
John Salmon <[EMAIL PROTECTED]>:
>  Martin Marcher <[EMAIL PROTECTED]> wrote in
>  news:[EMAIL PROTECTED]: 
> 
> > On Saturday 12 January 2008 20:50 John Salmon wrote:
> > 
> >> I'm a new user to Debian Linux. I have the latest version loaded on a
> >> dedicated PC with all the default settings. I have added a ~/bin
> >> directory to my system. My .bash_profile and .bashrc files were the
> >> default files loaded during the install. However, my PATH remains
> >> unchanged when I log on even though the .bash_profile file has the
> >> lines to add my ~/bin directory. I can make the change manually after
> >> I've logged on and can execute files that are in that directory.
> >> Also, the aliases set in my .bashrc file don't work. As a check, I've
> >> set environment variables in both files and they return null with
> >> echo after logging on. I haven't tried re-installing the system from
> >> scratch. 
> > 
> > you did re-login after the changes did you? (i think "bash -l" also
> > behaves like a full re-llogin)
> 
>  Yes, I did. In fact, I also tried re-booting the system.

That's excessive.  Reboots are only necessary when you update the
kernel and modules, or change hardware.

>  Another thing, I tried to run ~/.bash_profile and got "\bash: 
>  /home/johns/.bash_profile: Permission denied" (johns is me). ls -al shows 
>  .bash_prfile access has no execute permission set.

(0) heretic /home/keeling_ ls -lF .profile .bash_profile .bashrc
/bin/ls: .bash_profile: No such file or directory
-rw-r--r-- 1 keeling keeling 1158 2007-06-14 12:44 .bashrc
-rw-r--r-- 1 keeling keeling 1203 2008-01-05 10:03 .profile

Notice I have no .bash_profile, but I do have .profile, and neither of
those are executable.  On startup, bash looks for .profile or
.bash_profile and runs it.  Manually, try:

source ~/.bash_profile

or:

. ~/.bash_profile   # that's a period/dot


-- 
Any technology distinguishable from magic is insufficiently advanced.
(*)http://blinkynet.net/comp/uip5.html  Linux Counter #80292
- -http://www.faqs.org/rfcs/rfc1855.htmlPlease, don't Cc: me.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: .bash_profile and .bashrc not executing

2008-01-13 Thread John Salmon
Martin Marcher <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]: 

> On Saturday 12 January 2008 20:50 John Salmon wrote:
> 
>> I'm a new user to Debian Linux. I have the latest version loaded on a
>> dedicated PC with all the default settings. I have added a ~/bin
>> directory to my system. My .bash_profile and .bashrc files were the
>> default files loaded during the install. However, my PATH remains
>> unchanged when I log on even though the .bash_profile file has the
>> lines to add my ~/bin directory. I can make the change manually after
>> I've logged on and can execute files that are in that directory.
>> Also, the aliases set in my .bashrc file don't work. As a check, I've
>> set environment variables in both files and they return null with
>> echo after logging on. I haven't tried re-installing the system from
>> scratch. 
>> 
>> Any suggestions?
> 
> you did re-login after the changes did you? (i think "bash -l" also
> behaves like a full re-llogin)
> 
> hth
> martin
> 

Yes, I did. In fact, I also tried re-booting the system.

Another thing, I tried to run ~/.bash_profile and got "\bash: 
/home/johns/.bash_profile: Permission denied" (johns is me). ls -al shows 
.bash_prfile access has no execute permission set.

-- 
John Salmon
[EMAIL PROTECTED]
    Posted via Pronews.com - Premium Corporate Usenet News Provider 
http://www.pronews.com offers corporate packages that have access to 100,000+ 
newsgroups


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: .bash_profile and .bashrc not executing

2008-01-12 Thread Martin Marcher
On Saturday 12 January 2008 20:50 John Salmon wrote:

> I'm a new user to Debian Linux. I have the latest version loaded on a
> dedicated PC with all the default settings. I have added a ~/bin directory
> to my system. My .bash_profile and .bashrc files were the default files
> loaded during the install. However, my PATH remains unchanged when I log
> on even though the .bash_profile file has the lines to add my ~/bin
> directory. I can make the change manually after I've logged on and can
> execute files that are in that directory. Also, the aliases set in my
> .bashrc file don't work. As a check, I've set environment variables in
> both files and they return null with echo after logging on. I haven't
> tried re-installing the system from scratch.
> 
> Any suggestions?

you did re-login after the changes did you? (i think "bash -l" also behaves
like a full re-llogin)

hth
martin

-- 
http://noneisyours.marcher.name
http://feeds.feedburner.com/NoneIsYours

You are not free to read this message,
by doing so, you have violated my licence
and are required to urinate publicly. Thank you.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



.bash_profile and .bashrc not executing

2008-01-12 Thread John Salmon
I'm a new user to Debian Linux. I have the latest version loaded on a 
dedicated PC with all the default settings. I have added a ~/bin directory 
to my system. My .bash_profile and .bashrc files were the default files 
loaded during the install. However, my PATH remains unchanged when I log on 
even though the .bash_profile file has the lines to add my ~/bin directory.
I can make the change manually after I've logged on and can execute files 
that are in that directory. Also, the aliases set in my .bashrc file don't 
work. As a check, I've set environment variables in both files and they 
return null with echo after logging on. I haven't tried re-installing the 
system from scratch.

Any suggestions?

-- 
John Salmon
[EMAIL PROTECTED]
    Posted via Pronews.com - Premium Corporate Usenet News Provider 
http://www.pronews.com offers corporate packages that have access to 100,000+ 
newsgroups


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: .bashrc messes up 'set'

2007-09-18 Thread Mumia W..

On 09/18/2007 10:08 AM, Kent West wrote:
I've just discovered that a stable install (4.0, (with rdiff-backup 
pulled from testing)) has a wonky (that's a technical term, you 
understand ... ;-) ) /etc/skel/bashrc apparently.

[...]

I don't see anything particularly odd in /etc/skel/bashrc (but then, I'm 
not a scripter). I wasn't able to find anything about this on the 'net. 
I'm mostly just wondering if other folks have seen this.


Thanks!



It's not really a problem. That code seems to relate to bash_completion. 
Look at /etc/bash_completion and /etc/bash_completion.d/ if you're 
interested. Or just ignore it.




--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: .bashrc messes up 'set'

2007-09-18 Thread Florian Kulzer
On Tue, Sep 18, 2007 at 10:08:35 -0500, Kent West wrote:
> I've just discovered that a stable install (4.0, (with rdiff-backup pulled 
> from testing)) has a wonky (that's a technical term, you understand ... ;-) 
> ) /etc/skel/bashrc apparently.
>
> If I ssh in as a freshly-created user and then run the "set" command, I get 
> pages and pages of script-looking text, seemingly related to ImageMagick, 
> as below (most of it snipped out as marked):
>

[...]

>> _ImageMagick ()
>> {
>> local prev;
>> prev=${COMP_WORDS[COMP_CWORD-1]};
>> case "$prev" in
>> -channel)
>> COMPREPLY=($( compgen -W 'Red Green Blue Opacity \
>> Matte Cyan Magenta Yellow Black' -- $cur 
>> ));
>> return 0
>
> 
>>
>> COMPREPLY=($( command ls $admindir | grep "^$cur" ))
>> }
>> set_prefix ()
>> {
>> [ -z ${prefix:-} ] || prefix=${cur%/*}/;
>> [ -r ${prefix:-}CVS/Entries ] || prefix=""
>> }
>
>
> If I rename/delete/move the user's .bashrc and then log out / back in, the 
> "set" command returns what would be expected.
>
> I don't see anything particularly odd in /etc/skel/bashrc (but then, I'm 
> not a scripter). I wasn't able to find anything about this on the 'net. I'm 
> mostly just wondering if other folks have seen this.

I think this is due to bash_completion now being enabled in the default
.bashrc from /etc/skel. These three lines are responsible:

if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi

You can comment them out if the bash_completion code bothers you.

-- 
Regards,| http://users.icfo.es/Florian.Kulzer
  Florian   |


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



.bashrc messes up 'set'

2007-09-18 Thread Kent West
I've just discovered that a stable install (4.0, (with rdiff-backup 
pulled from testing)) has a wonky (that's a technical term, you 
understand ... ;-) ) /etc/skel/bashrc apparently.


If I ssh in as a freshly-created user and then run the "set" command, I 
get pages and pages of script-looking text, seemingly related to 
ImageMagick, as below (most of it snipped out as marked):



[EMAIL PROTECTED]:~$ set | more
BASH=/bin/bash
BASH_ARGC=()
BASH_ARGV=()





SSH_TTY=/dev/pts/1
TERM=xterm
UID=1024
USER=chyntt
_=set
bash205='3.1.17(1)-release'
bash205b='3.1.17(1)-release'
bash3='3.1.17(1)-release'
_ImageMagick ()
{
local prev;
prev=${COMP_WORDS[COMP_CWORD-1]};
case "$prev" in
-channel)
COMPREPLY=($( compgen -W 'Red Green Blue Opacity \
Matte Cyan Magenta Yellow Black' -- 
$cur ));

return 0





COMPREPLY=($( command ls $admindir | grep "^$cur" ))
}
set_prefix ()
{
[ -z ${prefix:-} ] || prefix=${cur%/*}/;
[ -r ${prefix:-}CVS/Entries ] || prefix=""
}



If I rename/delete/move the user's .bashrc and then log out / back in, 
the "set" command returns what would be expected.


I don't see anything particularly odd in /etc/skel/bashrc (but then, I'm 
not a scripter). I wasn't able to find anything about this on the 'net. 
I'm mostly just wondering if other folks have seen this.


Thanks!

--
Kent


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: .bashrc problem--"ls" output and root prompt

2007-08-22 Thread Ansgar Esztermann
On Tue, Aug 21, 2007 at 04:14:04PM -0700, Dr. Jennifer Nussbaum wrote:
> 
> PS1='\h\w $ ';   export PS1
> 
> So, nothing fancy. How do i get my coloured "ls" back,
> and my "#" prompt as sudo'ed root?

Use \$ rather than a plain $ to get # as root.


A.

-- 
Ansgar Esztermann
Researcher & Sysadmin
http://www.mpibpc.mpg.de/groups/grubmueller/start/people/aeszter/index.shtml


pgpOVGmgXgxwy.pgp
Description: PGP signature


Re: .bashrc problem--"ls" output and root prompt

2007-08-21 Thread Sergio Cuéllar Valdés
2007/8/21, Dr. Jennifer Nussbaum <[EMAIL PROTECTED]>:
>
> Im a new Debian Etch user, coming from FreeBSD. When i
> first installed my system, running the "ls" command
> would
> give me coloured output (executables one colour,
> directories another). Also, when I sudo'ed to root, i
> would get the usual "#" prompt as root.
>
> I then copied over my (straightforward) .bashrc file,
> and now i dont have the colored output and sudoing to
> root
> leaves me with a "$" prompt. (I do reset my PS1 line,
> but i dont know how to have a different one for root,
> keeping
> the "#".) Can someone give me a suggestion? My
> complete
> .bashrc, less comments, and with my CVSROOT masked,
> is:
>
> ---
> PS1='\h\w $ ';   export PS1
> BLOCKSIZE=K;export BLOCKSIZE
> EDITOR=emacs;   export EDITOR
> CVS_RSH=ssh; export CVS_RSH
> CVSROOT= [HIDDEN]; export CVSROOT
> PATH="${PATH}":/sbin:/usr/sbin
> ---
>
> So, nothing fancy. How do i get my coloured "ls" back,
> and my "#" prompt as sudo'ed root?


Hi,

try to add:

alias ls='ls --color=auto'

Best regards,
Sergio Cuellar


-- 
"Meine Hoffnung soll mich leiten
Durch die Tage ohne Dich
Und die Liebe soll mich tragen
Wenn der Schmerz die Hoffnung bricht"


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



.bashrc problem--"ls" output and root prompt

2007-08-21 Thread Dr. Jennifer Nussbaum

Im a new Debian Etch user, coming from FreeBSD. When i
first installed my system, running the "ls" command
would
give me coloured output (executables one colour,
directories another). Also, when I sudo'ed to root, i 
would get the usual "#" prompt as root.

I then copied over my (straightforward) .bashrc file,
and now i dont have the colored output and sudoing to
root
leaves me with a "$" prompt. (I do reset my PS1 line,
but i dont know how to have a different one for root,
keeping
the "#".) Can someone give me a suggestion? My
complete
.bashrc, less comments, and with my CVSROOT masked,
is:

---
PS1='\h\w $ ';   export PS1
BLOCKSIZE=K;export BLOCKSIZE
EDITOR=emacs;   export EDITOR
CVS_RSH=ssh; export CVS_RSH
CVSROOT= [HIDDEN]; export CVSROOT
PATH="${PATH}":/sbin:/usr/sbin
---

So, nothing fancy. How do i get my coloured "ls" back,
and my "#" prompt as sudo'ed root?

Thanks,

Jen


   

Pinpoint customers who are looking for what you sell. 
http://searchmarketing.yahoo.com/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: personal .bashrc

2006-12-26 Thread Kevin Coyner


On Tue, Dec 26, 2006 at 10:53:27AM +0100, Lorenzo Bettini wrote..

> >I remember that the files are read like
> >
> >/etc/profile - > ~/.bash_profile -> ~/.bashrc -> ~./profile
> >
> >but the bashrc file should be created by default without you
> >having to insert it..
> 
> that's what I thought too, but neither .bashrc nor .bash_profile
> were created automatically...

Check your /etc/skel/ directory, remembering that you won't be able
to see what is listed there (in terms of dot files) unless you use a
command like 'ls -la'.

The files you have in this directory are the files that are
automatically inserted into $HOME whenever you create a new user.
Edit them, and all *new* users created will get these edited files
upon user creation.

-- 
Kevin Coyner  GnuPG key: 1024D/8CE11941


signature.asc
Description: Digital signature


Re: personal .bashrc

2006-12-26 Thread Lorenzo Bettini

Ali Jawad wrote:

I remember that the files are read like

/etc/profile - > ~/.bash_profile -> ~/.bashrc -> ~./profile

but the bashrc file should be created by default without you having to
insert it..


that's what I thought too, but neither .bashrc nor .bash_profile were 
created automatically...


--
+-+
| Lorenzo Bettini  ICQ# lbetto, 16080134  |
| PhD in Computer Science, DSI, Univ. di Firenze  |
| Florence - Italy(GNU/Linux User # 158233)   |
| http://www.lorenzobettini.it|
| http://tronprog.blogspot.com  BLOG  |
| http://www.purplesucker.com Deep Purple Cover Band  |
| http://www.gnu.org/software/src-highlite|
| http://www.gnu.org/software/gengetopt   |
| http://www.gnu.org/software/gengen  |
| http://doublecpp.sourceforge.net|
+-+


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: personal .bashrc

2006-12-26 Thread Lorenzo Bettini

Marc Shapiro wrote:

Lorenzo Bettini wrote:

Hi

on the standard user's home I use everyday I have the .bashrc file 
that is read upon login.


Now I created a brand new user (with adduser), but the .bashrc file I 
inserted in his home is never read upon login...  in /etc/profile and 
/etc/bash.profile the .bashrc is actually never read...  so how does 
it work?
Check .bash_profile for the original user.  It is probably sourcing 
.bashrc with code similar to:


# include .bashrc if it exists
if [ -f ~/.bashrc ]; then
   . ~/.bashrc
fi

and your new user is probably not doing this.



you're right!
actually the new user did not have .bash_profile at all... I had to 
create it like that.


thanks
Lorenzo

--
+-+
| Lorenzo Bettini  ICQ# lbetto, 16080134  |
| PhD in Computer Science, DSI, Univ. di Firenze  |
| Florence - Italy(GNU/Linux User # 158233)   |
| http://www.lorenzobettini.it|
| http://tronprog.blogspot.com  BLOG  |
| http://www.purplesucker.com Deep Purple Cover Band  |
| http://www.gnu.org/software/src-highlite|
| http://www.gnu.org/software/gengetopt   |
| http://www.gnu.org/software/gengen  |
| http://doublecpp.sourceforge.net|
+-+


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: personal .bashrc

2006-12-25 Thread Ali Jawad

I remember that the files are read like

/etc/profile - > ~/.bash_profile -> ~/.bashrc -> ~./profile

but the bashrc file should be created by default without you having to
insert it..

On 12/25/06, Lorenzo Bettini <[EMAIL PROTECTED]> wrote:

Hi

on the standard user's home I use everyday I have the .bashrc file that
is read upon login.

Now I created a brand new user (with adduser), but the .bashrc file I
inserted in his home is never read upon login...  in /etc/profile and
/etc/bash.profile the .bashrc is actually never read...  so how does it
work?

thanks in advance
Lorenzo

--
+-+
| Lorenzo Bettini  ICQ# lbetto, 16080134  |
| PhD in Computer Science, DSI, Univ. di Firenze  |
| Florence - Italy(GNU/Linux User # 158233)   |
| http://www.lorenzobettini.it|
| http://tronprog.blogspot.com  BLOG  |
| http://www.purplesucker.com Deep Purple Cover Band  |
| http://www.gnu.org/software/src-highlite|
| http://www.gnu.org/software/gengetopt   |
| http://www.gnu.org/software/gengen  |
| http://doublecpp.sourceforge.net|
+-+


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]





--
With Regards Ali Jawad


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: personal .bashrc

2006-12-25 Thread Marc Shapiro

Lorenzo Bettini wrote:

Hi

on the standard user's home I use everyday I have the .bashrc file 
that is read upon login.


Now I created a brand new user (with adduser), but the .bashrc file I 
inserted in his home is never read upon login...  in /etc/profile and 
/etc/bash.profile the .bashrc is actually never read...  so how does 
it work?
Check .bash_profile for the original user.  It is probably sourcing 
.bashrc with code similar to:


# include .bashrc if it exists
if [ -f ~/.bashrc ]; then
   . ~/.bashrc
fi

and your new user is probably not doing this.

--
Marc Shapiro
[EMAIL PROTECTED]



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




personal .bashrc

2006-12-25 Thread Lorenzo Bettini

Hi

on the standard user's home I use everyday I have the .bashrc file that 
is read upon login.


Now I created a brand new user (with adduser), but the .bashrc file I 
inserted in his home is never read upon login...  in /etc/profile and 
/etc/bash.profile the .bashrc is actually never read...  so how does it 
work?


thanks in advance
Lorenzo

--
+-+
| Lorenzo Bettini  ICQ# lbetto, 16080134  |
| PhD in Computer Science, DSI, Univ. di Firenze  |
| Florence - Italy(GNU/Linux User # 158233)   |
| http://www.lorenzobettini.it|
| http://tronprog.blogspot.com  BLOG  |
| http://www.purplesucker.com Deep Purple Cover Band  |
| http://www.gnu.org/software/src-highlite|
| http://www.gnu.org/software/gengetopt   |
| http://www.gnu.org/software/gengen  |
| http://doublecpp.sourceforge.net|
+-+


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: how to set environmental variables for a shell temporarily (ie not via .bashrc)

2006-05-07 Thread Mitchell Laks
On Sunday 07 May 2006 18:33, Henrique G. Abreu wrote:
> try
> #!/bin/sh
> it may work

> Henrique

hi Henrique,

i had tried that (described in my original post), and it did not work.

On the other hand, what does work,
is taking all the different variable definitions and export lines and putting 
them in a file (eg. variable_exports) .

then i simply say

source  variable_exports

the difference is that 
running a shell script 
( ie your suggestion of running
./variable_exports with a first line of
#!/bin/sh )
forks a _new_ shell (a unix  child process ) and does not! affect the running 
process.

On the other hand 

source variable_exports

sets the variables in variable_exports 
for the same process.

Mitchell


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: how to set environmental variables for a shell temporarily (ie not via .bashrc)

2006-05-07 Thread Henrique G. Abreu

I created a file with these lines,
chmoded 755 the file
(and tried with and without adding
#!/usr/bin/sh
as the first line ) and it did not help.


try
#!/bin/sh

it may work

Henrique


Re: how to set environmental variables for a shell temporarily (ie not via .bashrc)

2006-05-06 Thread Mitchell Laks

>
> even if I run it, it only sets the variables within the run shell
> it does not source the variables for the father (mother) shell
>
> How can I do this?

Duh,

source filename 
works just like like in the  c shell where i saw it used before

sorry to bother ...

>
> Thanks
> Mitchekk


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



how to set environmental variables for a shell temporarily (ie not via .bashrc)

2006-05-06 Thread Mitchell Laks
Hi,

I want to set  a few shell variables that I occasionally want to set up.
I dont want them set always.
Thats why I can't put them in .bashrc 

thus I want to temporarily  

export PATH=/home/mlaks/stable-gtk/local/bin:$PATH
export  \ 
LD_LIBRARY_PATH=/home/mlaks/stable_gtk/local/lib:/home/mlaks/stable_gtk/local/lib/gtk-2.0/2.4.0/engines:/home/mlaks/stable_gtk/local/lib/gtk-2.0/2.4.0/immodules:/home/mlaks/stable_gtk/local/lib/gtk-2.0/2.4.0/loaders:/home/mlaks/stable_gtk/local/lib/pango/1.4.0/modules:/home/mlaks/stable_gtk/local/lib/orbit-2.0:/home/mlaks/stable_gtk/local/lib/bonobo/monikers:
$LD_LIBRARY_PATH
export  PKG_CONFIG_PATH=/home/mlaks/stable_gtk/local/lib/pkgconfig

Now I can type all three of these lines each time and then it will work, 

but I am lazy and I want to just run a single command and change my 
environment.


I created a file with these lines, 
chmoded 755 the file
(and tried with and without adding 
#!/usr/bin/sh 
as the first line ) and it did not help.

even if I run it, it only sets the variables within the run shell
it does not source the variables for the father (mother) shell

How can I do this?

Thanks
Mitchekk 



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: I'm really confused by bash, .bashrc, .bash_profile, .profile, etc, etc, etc

2006-02-04 Thread Rodney Richison

>
>I am running sid with kde3.5. I have some aliases in /etc/bash.bashrc.
>In konsole as user if I type alias I get all aliases. But in root
>konsole, I don't get aliaes. Why?
>
>
>  
>
Hmm, I dunno. My bash.bashrc on my desktop just has "source /root/bash"
in it. The /root/bash file has all my alias's etc. and the alias command
works under root and my user account both..

-- 
Highest Regards,

Rodney Richison
RCR Computing
http://www.rcrnet.net
118 N. Broadway
Cleveland, OK  74020
918-358-


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Re: I'm really confused by bash, .bashrc, .bash_profile, .profile, etc, etc, etc

2006-02-04 Thread L.V.Gandhi
On 2/2/06, Alvin Oga <[EMAIL PROTECTED]> wrote:

>
> - if you're confused .. do NOT change files in anything other
> than your own home directory  "/home/you"
>
> once you get brave ... decide if you want to enforce others to
> use bash or csh or tsch or zsh or hudred-other-sh
>
> - each will have a different priority of files it will
> read or skip reading because some other files existed
> and it will over-ride the defaults, while in other cases,
> the defaults is still read, and user-defined changes
> overrides the system defaults
>
> the search order is dfferent for user login vs scripts run by
> root or anybody/anything else ( like cron vs your scripts calling
> other scripts )
>
> which shell you use is defined in /etc/passed for that user
>
> to add more whackyness, different distro put their defaults
> in different directories and different filenames which will
> add confusion
>
> for simplicity... let's say you use /bin/bash on debian,
> which implies your the search order is:
>
> anything defined in one file can be redefined in the
> subsquent files
>
> - user defined changes override system defined variables
>
>system files
> /etc/profile= read first for user login
>
> /etc/bash.bashrc= interactive shell only
>
>
>user can do what you want in these files ..
>
> # after /etc/profile, search in order for the first executable:
> ~/.bash_profile
> ~/.bash_login
> ~/.profile  - not read if the files exists before it
>
> ~/.bashrc   interactive shell read it if it exists
>
> ~/.morebashfiles ??
>
>more user stuff
> ~/.aliasalways put aliases outside of bash files
> for portability
>
> ~/.login
> ~/.logout
>
> http://developer.novell.com/wiki/index.php/Bash_-_What_happens_when_you_invoke_bash
>
> - the above ignores other "different" distros and other shells

I am running sid with kde3.5. I have some aliases in /etc/bash.bashrc.
In konsole as user if I type alias I get all aliases. But in root
konsole, I don't get aliaes. Why?


--
L.V.Gandhi
http://lvgandhi.tripod.com/
linux user No.205042


Re: I'm really confused by bash, .bashrc, .bash_profile, .profile, etc, etc, etc

2006-02-04 Thread Rodney Richison


Mike McCarty wrote:

> Alvin Oga wrote:
>
>> hi ya
>>
>>
>>> forgot-who started it
>>
>>
>>
>>>> Is there a good system for setting variables, aliases, etc that
>>>> need to be
>>>> set for user X, whether I log in at a login prompt or using su?  I'm
>>>> confused by all the different .profile options (there are at least
>>>> 3 for
>>>> bash, why is that?)
>>>
>>
>>
>> why ?? because ... long history ...
>>
>> general rule ...
>>
>> - if you're confused .. do NOT change files in anything other
>> than your own home directory  "/home/you"
>
>
> My solution to this nonsense is to have a file
>
> /home/me/my_startup


Might he need to do this in his .bashrc (or /etc/bash.bashrc on a single
user system) to make this work?
sources /home/me/my_startup

BTW, you can use functions in that file or the .bashrc file ex. (note
the @ sign will take whatever the perimeter is to be..
##
# Functions
##

function mfloppy{ mount /dev/fd0 /mnt/floppy; }
function umfloppy   { umount /mnt/floppy; }

function mdvd   { mount -t iso9660 -o ro /dev/dvd /mnt/dvd; }
function umdvd  { umount /mnt/dvd; }

function mcdrom { mount -t iso9660 -o ro /dev/cdrom /mnt/cdrom; }
function umcdrom{ umount /mnt/cdrom; }

function vib{ vi ~/.bashrc; }

# handy grep function
function gw { grep $@ /etc/* -d recurse -l; }
function sources{ vi /etc/apt/sources.list; }
# Handy function for doing ssh to multiple servers in the same domain
function ssh-r  {ssh -l root [EMAIL PROTECTED]; }
# Shorten the line to restart a service
function restart{ /etc/init.d/$@ restart; }

-- 
Highest Regards,

Rodney Richison
RCR Computing
http://www.rcrnet.net
118 N. Broadway
Cleveland, OK  74020
918-358-


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: I'm really confused by bash, .bashrc, .bash_profile, .profile, etc, etc, etc

2006-02-03 Thread Mike McCarty

Alvin Oga wrote:

hi ya



forgot-who started it




Is there a good system for setting variables, aliases, etc that need to be
set for user X, whether I log in at a login prompt or using su?  I'm
confused by all the different .profile options (there are at least 3 for
bash, why is that?)



why ?? because ... long history ...

general rule ...

- if you're confused .. do NOT change files in anything other
than your own home directory  "/home/you"


My solution to this nonsense is to have a file

/home/me/my_startup

It is not a "dot" file, so I can *see* it. I dislike "hiding"
those files. Then I build

/home/me/.funky_namedrc

which is specific to whatever shell I'm using, and put
lines in it to set a variable indicating which shell is
running, to load

/home/me/my_startup

Then all edits take place in /home/me/my_startup.

Obviously, this can only take into account differences
among very similar shells, like sh, ksh, bsh, and bash.
It can't work for both bash and csh.

Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: Re: I'm really confused by bash, .bashrc, .bash_profile, .profile, etc, etc, etc

2006-02-02 Thread Alvin Oga

hi ya

> forgot-who started it

> > Is there a good system for setting variables, aliases, etc that need to be
> > set for user X, whether I log in at a login prompt or using su?  I'm
> > confused by all the different .profile options (there are at least 3 for
> > bash, why is that?)

why ?? because ... long history ...

general rule ...

- if you're confused .. do NOT change files in anything other
than your own home directory  "/home/you"

once you get brave ... decide if you want to enforce others to
use bash or csh or tsch or zsh or hudred-other-sh

- each will have a different priority of files it will
read or skip reading because some other files existed
and it will over-ride the defaults, while in other cases,
the defaults is still read, and user-defined changes
overrides the system defaults

the search order is dfferent for user login vs scripts run by 
root or anybody/anything else ( like cron vs your scripts calling
other scripts )

which shell you use is defined in /etc/passed for that user

to add more whackyness, different distro put their defaults
in different directories and different filenames which will
add confusion

for simplicity... let's say you use /bin/bash on debian,
which implies your the search order is:

anything defined in one file can be redefined in the 
subsquent files

- user defined changes override system defined variables

   system files
/etc/profile= read first for user login

/etc/bash.bashrc= interactive shell only


   user can do what you want in these files ..

# after /etc/profile, search in order for the first executable:
~/.bash_profile 
~/.bash_login
~/.profile  - not read if the files exists before it

~/.bashrc   interactive shell read it if it exists

~/.morebashfiles ??

   more user stuff
~/.aliasalways put aliases outside of bash files
for portability 

~/.login
~/.logout

http://developer.novell.com/wiki/index.php/Bash_-_What_happens_when_you_invoke_bash

- the above ignores other "different" distros and other shells

c ya
alvin


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: Re: I'm really confused by bash, .bashrc, .bash_profile, .profile, etc, etc, etc

2006-02-02 Thread Felipe Caballero Gil
QUOTE:
"
Mark Wright wrote:> Is there a good system for setting variables, aliases, etc that need to be> set for user X, whether I log in at a login prompt or using su?  I'm> confused by all the different .profile options (there are at least 3 for
> bash, why is that?)I don't know if there is such a system/program but I can help you clear things up.Each of these files are read by bash at different times:.bash_profile is executed when you login.
Stuff you put in there might be your PATH and other important environment variables..bashrc is used for non login shells. I'm not sure what that means. I know that RedHatexecutes it everytime you start another shell (su to this user or simply calling bash
again)You might want to put aliases in there but again I am not sure what that means. Isimply ignore it myself..profile is the equivalent of .bash_profile for the root. I think the name is changedto let other shells (csh, sh, tcsh) use it as well. (you don't need one as a user)
There is also .bash_logout wich executes at, yeah good guess...logout.You might want to stop deamons or even make a little housekeeping .You can also add "clear" there if you want to clear the screen when you log out.
I hope it helps you understand...-- Jean-Pierre Parent <[EMAIL PROTECTED]>

"

Hi there. I'm having the same problem or need. I want to set an environmental variable for all users.
This some times is a pain but I found the answer to my problems but I'm not shure if it's the elegant way anyway.

Here it is:  You can put the variables in 

/etc/bash.bashrc

That works for me, I hope it works for you even if your message is very very old.

-- Saludos,Felipe Caballero Gil


Re: Woody-No Mouse, Sarge-OK (tangent to show example .bashrc file in Woody)

2005-06-05 Thread Gayle Lee Fairless

[EMAIL PROTECTED]:~$ cat .bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples

# If running interactively, then:
if [ "$PS1" ]; then

   # don't put duplicate lines in the history. See bash(1) for more options
   # export HISTCONTROL=ignoredups

   # enable color support of ls and also add handy aliases
   eval `dircolors -b`
   alias ls='ls --color=auto'
   alias dir='ls --color=auto --format=vertical'
   alias vdir='ls --color=auto --format=long'
   alias lall='ls -agl'

   # some more ls aliases
alias lt='ls --color=auto -aglt'
alias ll='ls --color=auto -agl'
alias lg='ls --color=auto -gl'
   alias la='ls -A'
   #alias l='ls -CF'
   alias llm='ls  --color=auto -agl | less'

   # set a fancy prompt
   PS1='[EMAIL PROTECTED]:\w\$ '

   # If this is an xterm set the title to [EMAIL PROTECTED]:dir
   #case $TERM in
   #xterm*)
   #PROMPT_COMMAND='echo -ne "\033]0;[EMAIL PROTECTED]: ${PWD}\007"'
   #;;
   #*)
   #;;
   #esac

   # enable programmable completion features (you don't need to enable
   # this, if it's already enabled in /etc/bash.bashrc).
   #if [ -f /etc/bash_completion ]; then
   #  . /etc/bash_completion
   #fi
fi
# by Sun Microsystems setup
DBROOT=/home/gayle/adabas
DBWORK=/home/gayle/adabas/sql
DBCONFIG=/home/gayle/adabas/sql
PATH=$DBROOT/bin:$DBROOT/pgm:$PATH
LD_LIBRARY_PATH=$DBROOT/lib:$LD_LIBRARY_PATH
export DBROOT DBWORK DBCONFIG PATH LD_LIBRARY_PATH
[EMAIL PROTECTED]:~$
--
(Mr.) Gayle Lee Fairless, http://counter.li.org/
Linux Gcomm 2.4.18-bf2.4 #1 Son Apr 14 09:53:28 CEST 2002 i686 unknown
(I am subscribed to the digest; nonetheless, CC's and private replies 
are OK.



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: .bashrc .bash_profile - created from?

2004-01-04 Thread Paul Morgan
On Sun, 04 Jan 2004 08:17:26 -0500, Russ Schneider wrote:

> I have changed the files /etc/bash.bashrc and /etc/profile to my liking.  
> 
> Problem is, when I create new users, the files .bashrc and .bash_profile
> are created in their home directory and they are created with elements
> that supercede those two previous files.
> 
> What generates .bashrc and .bash_profile for each new user?  Is it 
> something I can alter so it writes them the way I want them?

The files are copied from /etc/skel

ls -a /etc/skel # to see them

Info which you may need:

man adduser
man bash (INVOCATION section)

Please also note that /etc/bash.bashrc is not automatically executed. You
need to source it in one of the startup scripts if you want it used.

-- 
paul

Programming without a hex editor is like watchmaking without a hammer.



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: .bashrc .bash_profile - created from?

2004-01-04 Thread J.H.M. Dassen (Ray)
On Sun, Jan 04, 2004 at 08:36:41 -0500, Russ Schneider wrote:
> When the system copies those files for a new user, they're all owned by 
> root:root.

That's sounds like a bug. Please file a report using reportbug.

Ray
-- 
People don't respond to any events as real people facing events would.
Otherwise, only one company would ever have installed Microsloth software.
Paul Tomko in <[EMAIL PROTECTED]>


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: .bashrc .bash_profile - created from?

2004-01-04 Thread Russ Schneider
On Sun, 4 Jan 2004, J.H.M. Dassen (Ray) wrote:

> Edit the skeleton files in /etc/skel/ . (They're marked as conffiles so the
> package management system will not accidentally overwrite your changes).

Great!  But I noticed something.

When the system copies those files for a new user, they're all owned by 
root:root.  Is there a reason for this?  When the system created the 
initial non-root user upon installation, the files were owned by that 
user.

How would you make it so that those files copied from /etc/skel/ were 
owned by the user your were creating with adduser?


-- 
[ Russ Schneider (a.k.a. Sugapablo) ]
[ http://www.sugapablo.com <--music ]
[ http://www.sugapablo.net <--personal  ]
[ [EMAIL PROTECTED]   <--jabber IM ]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: .bashrc .bash_profile - created from?

2004-01-04 Thread J.H.M. Dassen (Ray)
On Sun, Jan 04, 2004 at 08:17:26 -0500, Russ Schneider wrote:
> What generates .bashrc and .bash_profile for each new user?

adduser(1) by copying from /etc/skel/ .

> Is it something I can alter so it writes them the way I want them?

Edit the skeleton files in /etc/skel/ . (They're marked as conffiles so the
package management system will not accidentally overwrite your changes).

HTH,
Ray
-- 
Give a man a fire, he's warm for a day.  Set a man on fire, he's warm for
the rest of his life.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



.bashrc .bash_profile - created from?

2004-01-04 Thread Russ Schneider
I have changed the files /etc/bash.bashrc and /etc/profile to my liking.  

Problem is, when I create new users, the files .bashrc and .bash_profile
are created in their home directory and they are created with elements
that supercede those two previous files.

What generates .bashrc and .bash_profile for each new user?  Is it 
something I can alter so it writes them the way I want them?

-- 
[ Russ Schneider (a.k.a. Sugapablo) ]
[ http://www.sugapablo.com <--music ]
[ http://www.sugapablo.net <--personal  ]
[ [EMAIL PROTECTED]   <--jabber IM ]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: bash won't read in ~/.bashrc

2003-08-22 Thread Joris Huizer

--- Roberto Sanchez <[EMAIL PROTECTED]> wrote:
> I have a machine running Debian Woody.  I made some
> changes to my ~/.bashrc
> file, but the changes aren't taking.  The changes I
> made to root's ~/.bashrc
> work like a champ, but not for my regular user
> account.  I can access the
> server via SSH, and basically, it works for root
> (whether I ssh in directly or
> first as a regular user and then su -).  For my
> regular user it only works 
> when I execute 'bash' again at the bash prompt. 
> Otherwise, nothing.  Why is
> this?
> 
> -Roberto
> 

Bash (and other shells) only read the ~/.bashrc when
they start - but you can make them read the file again
while running, using 
  source ~/.bashrc 

I hope this helps,

Joris


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: bash won't read in ~/.bashrc

2003-08-22 Thread Thomas Krennwallner
Hi!

On Fri Aug 22, 2003 at 05:59:26PM +0200, Roberto Sanchez wrote:
> I have a machine running Debian Woody.  I made some changes to my ~/.bashrc
> file, but the changes aren't taking.  The changes I made to root's ~/.bashrc
> work like a champ, but not for my regular user account.  I can access the
> server via SSH, and basically, it works for root (whether I ssh in directly or
> first as a regular user and then su -).  For my regular user it only works 
> when I execute 'bash' again at the bash prompt.  Otherwise, nothing.  Why is
> this?

Have a look at the users ~/.bash_profile. You have to uncomment these
lines:

if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi

So long
Thomas

-- 
 .''`.  Obviously we do not want to leave zombies around. - W. R. Stevens
: :'  : Thomas Krennwallner 
`. `'`  1024D/67A1DA7B 9484 D99D 2E1E 4E02 5446  DAD9 FF58 4E59 67A1 DA7B
  `-http://bigfish.ull.at/~djmaecki/


pgp0.pgp
Description: PGP signature


bash won't read in ~/.bashrc

2003-08-22 Thread Roberto Sanchez
I have a machine running Debian Woody.  I made some changes to my ~/.bashrc
file, but the changes aren't taking.  The changes I made to root's ~/.bashrc
work like a champ, but not for my regular user account.  I can access the
server via SSH, and basically, it works for root (whether I ssh in directly or
first as a regular user and then su -).  For my regular user it only works 
when I execute 'bash' again at the bash prompt.  Otherwise, nothing.  Why is
this?

-Roberto

___
Yahoo! Messenger - Nueva versión GRATIS
Super Webcam, voz, caritas animadas, y más...
http://messenger.yahoo.es


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: LANG in /etc/environment and in .bashrc

2003-07-30 Thread Robin Gerard

On Wed, Jul 30, 2003 at 12:27:00AM +0200, Andreas Janssen wrote:
> Hello
> 
> Robin Gerard (<[EMAIL PROTECTED]>) wrote:
> 
> > I would like to understand why, when I set LANG to C, in
> > /etc/environment and LANG to fr_FR.ISO-8859-1 in my .bashrc, after the
> > login, I can't write te letters with accents.
> 
> Are you talking about a login shell? .bashrc is used for non-login
> shells. .bash_profile is used for login shells. Check if your
> .bash_profile is set to include your .bashrc.
 
I think so. My .bash_profile contains the lines: (without #)
 
if [ -f ~/.bashrc ]; then
source ~/.basrc 
 
Anyway, one solution is to put LANG=fr_FR.ISO-8859-1 in /etc/environment
and export LANG=C in the .bashrc of the user English-speaking.
Thanks for your advices. 
-- 
Gerard


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: LANG in /etc/environment and in .bashrc

2003-07-29 Thread Andreas Janssen
Hello

Robin Gerard (<[EMAIL PROTECTED]>) wrote:

> I would like to understand why, when I set LANG to C, in
> /etc/environment and LANG to fr_FR.ISO-8859-1 in my .bashrc, after the
> login, I can't write te letters with accents.

Are you talking about a login shell? .bashrc is used for non-login
shells. .bash_profile is used for login shells. Check if your
.bash_profile is set to include your .bashrc.

best regards
Andreas Janssen

-- 
Andreas Janssen
[EMAIL PROTECTED]
PGP-Key-ID: 0xDC801674
Registered Linux User #267976


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



LANG in /etc/environment and in .bashrc

2003-07-29 Thread Robin Gerard
Hello,
I would like to understand why, when I set LANG to C, in /etc/environment
and LANG to fr_FR.ISO-8859-1 in my .bashrc, after the login, I can't write
te letters with accents.
( However if I launch mutt, for example, the messages send by mutt are in 
French. )
On the other hand, if I run "bash" in command line, I can write the letters 
with accents. (But two "bash" are running) 
Is it possible that I can write the letters with accents after the login
with LANG=C in /etc/environment and export LANG=fr_FR.ISO-8859-1 in my
.bashrc ?
And how to do that ?

TIA
-- 
Gerard


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: PS1 in .bashrc

2003-07-14 Thread Robin Gerard
On Sun, Jul 13, 2003 at 08:21:34PM +0200, Sebastian Kapfer wrote:
> On Sun, 13 Jul 2003 19:30:10 +0200, Robin Gerard wrote:

Thanks.
PS1="${cyan}[$TIME [EMAIL PROTECTED] \[${YELLOW}\#$NC\]] \[\w\$ "
did the trick. 

-- 
Gerard


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: PS1 in .bashrc

2003-07-13 Thread Sebastian Kapfer
On Sun, 13 Jul 2003 19:30:10 +0200, Robin Gerard wrote:

> with this PS1 I get: 
> 
> [18:31 : 0.16]
> [EMAIL PROTECTED] 1] ~$
> 
> but if I write a very long command the cursor remains on the same line and 
> overlaps the prompt.

>From "man bash":

> \[ begin  a sequence of non‐printing characters, which could
>be used to embed a terminal  control  sequence  into  the
>prompt
> \] end a sequence of non‐printing characters

HTH

-- 
Best Regards,   |   Hi! I'm a .signature virus. Copy me into
 Sebastian  |   your ~/.signature to help me spread!


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



PS1 in .bashrc

2003-07-13 Thread Robin Gerard



Hello,
I encountered a trifling problem in my .bashrc:


.
.
# Define some colors:

   RED='\e[1;31m'
   cyan='\e[0;36m'
   CYAN='\e[1;36m'
   YELLOW='\e[1;33m'
   NC='\e[0m'  # No Color

...
...

#-
# Shell prompt:
#-

   LOAD=$(uptime | cut -c 45-49) 
   TIME=$(date +%H:%M)
   
   PS1="${cyan}[\$TIME [EMAIL PROTECTED] ${YELLOW}\#$NC] \w\$ " 



with this PS1 I get: 

[18:31 : 0.16]
[EMAIL PROTECTED] 1] ~$

but if I write a very long command the cursor remains on the same line and 
overlaps the prompt.

If I set PS1 like:
   PS1="${cyan}[\$TIME [EMAIL PROTECTED] ${YELLOW}\#$NC] \w\$\n"
the cursor is under the prompt and the new line works correctly if I write
a long command.

Is it possible to have the cursor on the same line of the prompt such that the
long command doesn't overlaps the prompt ?   

Thanks in advance for a tip.
 
-- 
Gerard


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



FIXED: Re: bash not reading ~/.bashrc

2003-02-21 Thread Roberto Sanchez

> If what you really mean is that .bashrc is not read when you login on a
> text console, then that's covered by bash's man page, which you really
> ought to read. .bash_profile or .profile is read by login shells;
> .bashrc is read only by non-login shells. If you want .bashrc to be read
> by all shells, then you need to put ". ~./bashrc" in your .bash_profile
> or .profile to make it happen.
I have this in my .bash_profile.  I think it was there, but commented out, 
by
default.

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
Thanks for the plethora of suggestions.  I guess this proves that "speed 
reading" the man page is not quite the same as "reading" it.  Again, thanks 
for the info, I will try to refrain from asking such dumb questions in the 
future :-)

-Roberto Sanchez

_
The new MSN 8: advanced junk mail protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail

--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: bash not reading ~/.bashrc

2003-02-21 Thread Levi Waldron
> If what you really mean is that .bashrc is not read when you login on a
> text console, then that's covered by bash's man page, which you really
> ought to read. .bash_profile or .profile is read by login shells;
> .bashrc is read only by non-login shells. If you want .bashrc to be read
> by all shells, then you need to put ". ~./bashrc" in your .bash_profile
> or .profile to make it happen.

I have this in my .bash_profile.  I think it was there, but commented out, by 
default.

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: bash not reading ~/.bashrc

2003-02-21 Thread Craig Dickson
Roberto Sanchez wrote:

> Why is it that when I switch to a text console with -- that 
> bash does not read in my ~/.bashrc?
> 
> When I pull up a terminal in X it works fine (all my command aliases are 
> there).  And when I log in to a text console, if explicitly type in the 
> command 'bash' at the bash prompt, the new shell reads it in.  But the top 
> level shell from text login does not read it.
> 
> Any ideas?

Depends exactly what you mean.

Switching to a text console, by itself, does not cause bash to start
running, so there's no reason it should read .bashrc then.

If what you really mean is that .bashrc is not read when you login on a
text console, then that's covered by bash's man page, which you really
ought to read. .bash_profile or .profile is read by login shells;
.bashrc is read only by non-login shells. If you want .bashrc to be read
by all shells, then you need to put ". ~./bashrc" in your .bash_profile
or .profile to make it happen.

Craig



pgp0.pgp
Description: PGP signature


Re: bash not reading ~/.bashrc

2003-02-21 Thread nate
Roberto Sanchez said:
> Why is it that when I switch to a text console with -- that
> bash does not read in my ~/.bashrc?
>

I think .bashrc is for non-login shells? logging into a console
or logging in via ssh/telnet/etc is a login shell. you probably
want ~/.profile ? see the bash manpage

nate




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: bash not reading ~/.bashrc

2003-02-21 Thread Jordan Evatt
the ~/.bashrc file is read by non-login shells (i.e. xterm or eterm). the 
~/.bash_profile file is read by login(1) when you log in to the console.

jordan

On Fri, 21 Feb 2003 16:53:07 -0500
Roberto Sanchez <[EMAIL PROTECTED]> wrote:

> Why is it that when I switch to a text console with -- that 
> bash does not read in my ~/.bashrc?
> 
> When I pull up a terminal in X it works fine (all my command aliases are 
> there).  And when I log in to a text console, if explicitly type in the 
> command 'bash' at the bash prompt, the new shell reads it in.  But the top 
> level shell from text login does not read it.
> 
> Any ideas?
> 
> -Roberto Sanchez
> 
> 
> 
> _
> MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.  
> http://join.msn.com/?page=features/virus
> 
> 
> -- 
> To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
> 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



bash not reading ~/.bashrc

2003-02-21 Thread Roberto Sanchez
Why is it that when I switch to a text console with -- that 
bash does not read in my ~/.bashrc?

When I pull up a terminal in X it works fine (all my command aliases are 
there).  And when I log in to a text console, if explicitly type in the 
command 'bash' at the bash prompt, the new shell reads it in.  But the top 
level shell from text login does not read it.

Any ideas?

-Roberto Sanchez



_
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.  
http://join.msn.com/?page=features/virus

--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: bash, but no .bashrc??

2003-01-25 Thread mess-mate
Hi,
here, users have different profiles etc..
So I'm using bash interractive.
Change your /etc/profile like that:  
f [ "$BASH" ]; then
#  PS1='\u@\h:\w\$ '
bash -i
else
  if [ "`id -u`" -eq 0 ]; then
PS1='# '
  else
PS1='$ '
  fi
fi
and your user .bashrc would be executed on login.
mess-mate

On Fri, 24 Jan 2003 15:52:53 -0500
"Andy Estes" <[EMAIL PROTECTED]> wrote:

| I am running Debian Woody (3.0r1).  The default shell for my user account is
| bash, and I can verify this by typing 'ps' once I am logged on.  However,
| the contents of my .bashrc do not get executed by default.  If I explicitely
| invoke bash (typing 'bash' at the shell), .bashrc is executed properly, but
| if I simply log in (locally or remotely), it doesn't happen.  Can anyone
| explain what is going on here?
| 
| -Andy
| 
| 
| -- 
| To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
| with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
| 


-- 
Computers are like air conditioners, they are useless when you open
Windows.


msg26142/pgp0.pgp
Description: PGP signature


Re: bash, but no .bashrc??

2003-01-24 Thread David Dumortier
Hello

aloow line . .bashrc on Ur's .bashr-profile or .rpofile file !

David Dumoerize


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: bash, but no .bashrc??

2003-01-24 Thread Johannes Zarl

>  If I explicitely invoke bash (typing 'bash' at the shell), .bashrc is
> executed properly, but if I simply log in (locally or remotely), it
> doesn't happen.  Can anyone explain what is going on here?

When bash is invoked as login-shell, it executes the commandos 
in.bash_profile, if that exists (if not it searches for .bash_login and 
finally for .profile). .bashrc is not being looked at.

To enable processing of your .bashrc, simply comment out the following 
lines in your .bash_profile:
## include .bashrc if it exists:
#if [ -f ~/.bashrc ]; then
#source ~/.bashrc
#fi

greetings, 
  Johannes Zarl
-- 
"More than machinery we need humanity" -- Charlie Chaplin, The Great 
Dictator


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: bash, but no .bashrc??

2003-01-24 Thread Colin Watson
On Fri, Jan 24, 2003 at 03:52:53PM -0500, Andy Estes wrote:
> I am running Debian Woody (3.0r1).  The default shell for my user account is
> bash, and I can verify this by typing 'ps' once I am logged on.  However,
> the contents of my .bashrc do not get executed by default.

Uncomment the three lines in the default ~/.bash_profile that source
~/.bashrc; you'll see them. The reason this doesn't happen automatically
is that some people like to keep login and non-login shells with
separate startup files, while some people prefer them to be the same.
See the INVOCATION section of 'man bash' for more.

Cheers,

-- 
Colin Watson  [[EMAIL PROTECTED]]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: bash, but no .bashrc??

2003-01-24 Thread Steve Juranich
On 24 January 2003 at 15:52,
"Andy Estes" <[EMAIL PROTECTED]> wrote:

> I am running Debian Woody (3.0r1).  The default shell for my user account is
> bash, and I can verify this by typing 'ps' once I am logged on.  However,
> the contents of my .bashrc do not get executed by default.  If I explicitely
> invoke bash (typing 'bash' at the shell), .bashrc is executed properly, but
> if I simply log in (locally or remotely), it doesn't happen.  Can anyone
> explain what is going on here?

You need to read the bash man page. Specifically, the section labelled 
"INVOCATION".

--
Stephen W. Juranich [EMAIL PROTECTED]
Electrical Engineering http://students.washington.edu/sjuranic
University of Washingtonhttp://ssli.ee.washington.edu/ssli



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: bash, but no .bashrc??

2003-01-24 Thread Seneca
On Fri, Jan 24, 2003 at 03:52:53PM -0500, Andy Estes wrote:
> I am running Debian Woody (3.0r1).  The default shell for my user account is
> bash, and I can verify this by typing 'ps' once I am logged on.  However,
> the contents of my .bashrc do not get executed by default.  If I explicitely
> invoke bash (typing 'bash' at the shell), .bashrc is executed properly, but
> if I simply log in (locally or remotely), it doesn't happen.  Can anyone
> explain what is going on here?

Take a look at ~/.bash_profile. ~/.bashrc is used for non-login shells.

-- 
Seneca
[EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: bash, but no .bashrc??

2003-01-24 Thread Stephen Rueger
On Fri, Jan 24, 2003 at 03:52:53PM -0500, Andy Estes wrote:
> I am running Debian Woody (3.0r1).  The default shell for my user account is
> bash, and I can verify this by typing 'ps' once I am logged on.  However,
> the contents of my .bashrc do not get executed by default.  If I explicitely
> invoke bash (typing 'bash' at the shell), .bashrc is executed properly, but
> if I simply log in (locally or remotely), it doesn't happen.  Can anyone
> explain what is going on here?

1) install the bash-doc package, then read the section about bash
startup files in "info bash"

2) fix your problem with putting '. ~/.bashrc' (without the '') in
~/.bash_profile

mfg,

Stephen Rüger


-- 
Jede Nation spottet über die andere, und alle haben recht.
-- Schopenhauer



msg26035/pgp0.pgp
Description: PGP signature


Re: bash, but no .bashrc??

2003-01-24 Thread Craig Dickson
Andy Estes wrote:

> I am running Debian Woody (3.0r1).  The default shell for my user account is
> bash, and I can verify this by typing 'ps' once I am logged on.  However,
> the contents of my .bashrc do not get executed by default.  If I explicitely
> invoke bash (typing 'bash' at the shell), .bashrc is executed properly, but
> if I simply log in (locally or remotely), it doesn't happen.  Can anyone
> explain what is going on here?

"man bash" should do the trick. Look under "INVOCATION". .bashrc is only
executed for an interactive non-login shell.

If you put "source .bashrc" at the end of your .bash_profile, you should
get the behavior you want.

Craig




msg26034/pgp0.pgp
Description: PGP signature


Re: bash, but no .bashrc??

2003-01-24 Thread Matthew Daubenspeck
On Fri, Jan 24, 2003 at 03:52:53PM -0500, Andy Estes wrote:
> I am running Debian Woody (3.0r1).  The default shell for my user account is
> bash, and I can verify this by typing 'ps' once I am logged on.  However,
> the contents of my .bashrc do not get executed by default.  If I explicitely
> invoke bash (typing 'bash' at the shell), .bashrc is executed properly, but
> if I simply log in (locally or remotely), it doesn't happen.  Can anyone
> explain what is going on here?

if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi

Add that to your ~/.bash_profile

-- 
:wq

  Matthew Daubenspeck
  http://www.oddprocess.org


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




bash, but no .bashrc??

2003-01-24 Thread Andy Estes
I am running Debian Woody (3.0r1).  The default shell for my user account is
bash, and I can verify this by typing 'ps' once I am logged on.  However,
the contents of my .bashrc do not get executed by default.  If I explicitely
invoke bash (typing 'bash' at the shell), .bashrc is executed properly, but
if I simply log in (locally or remotely), it doesn't happen.  Can anyone
explain what is going on here?

-Andy


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: vim and basic .bashrc questions

2003-01-20 Thread will trillich
On Mon, Jan 20, 2003 at 02:22:35AM +, iain d broadfoot wrote:
> * Seneca ([EMAIL PROTECTED]) wrote:
> > On Sun, Jan 19, 2003 at 04:37:13PM -0800, CM Miller wrote:
> > > Also, I have been able to set .bashrc preferences as
> > > root, like "rm = rm -i".  This works for root, but not
> > > for my user cmmiller.  

> however, this is a _BAD_IDEA_.
> 
> if you happen to sit down at a machine where this alias is not active,
> and you think it is, guess what happens? :p
> 
> iain

quite so. best to make a whole 'nother alias and use that
instead. zap, delete, xx...

alias xx='rm -i'

then you won't be in the habit of expecing a round of
confirmations when you try 'rm' on someone else's machine.
the worst that'll happen is you get

$ xx thisfile.ext
bash: xx: command not found

better than losing a file you really didn't want to delete.

-- 
I use Debian/GNU Linux version 3.0;
Linux server 2.2.17 #1 Sun Jun 25 09:24:41 EST 2000 i586 unknown
 
DEBIAN NEWBIE TIP #66 from Will Trillich <[EMAIL PROTECTED]>
:
Do you know WHICH SHELL YOU'RE RUNNING? If not, you can find out:
ps T
and the first item listed is most likely to be your shell.
(Valid shells are listed in /etc/shells.) The default user shell
for Debian is bash, which you can learn about via "man bash".

Also see http://newbieDoc.sourceForge.net/ ...


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: vim and basic .bashrc questions

2003-01-19 Thread iain d broadfoot
* Seneca ([EMAIL PROTECTED]) wrote:
> On Sun, Jan 19, 2003 at 04:37:13PM -0800, CM Miller wrote:
> > I like to do programming in the Linux environment
> > cause I love VIM.  I can run VIM as root, but not as
> > cmmiller.  
> 
> I've never had that problem with vim.  What happens when you try?
> 
> > Also, I have been able to set .bashrc preferences as
> > root, like "rm = rm -i".  This works for root, but not
> > for my user cmmiller.  
> > 
> > How can I make these changes for cmmiller as well? 
> 
> In ~cmmiller/.bash_profile uncomment:
> 
>   if [ -f ~/.bashrc ]; then
>   source ~/.bashrc
>   fi
> 

however, this is a _BAD_IDEA_.

if you happen to sit down at a machine where this alias is not active,
and you think it is, guess what happens? :p

iain

-- 
wh33, y1p33 3tc.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: vim and basic .bashrc questions

2003-01-19 Thread Seneca
On Sun, Jan 19, 2003 at 04:37:13PM -0800, CM Miller wrote:
> I like to do programming in the Linux environment
> cause I love VIM.  I can run VIM as root, but not as
> cmmiller.  

I've never had that problem with vim.  What happens when you try?

> Also, I have been able to set .bashrc preferences as
> root, like "rm = rm -i".  This works for root, but not
> for my user cmmiller.  
> 
> How can I make these changes for cmmiller as well? 

In ~cmmiller/.bash_profile uncomment:

  if [ -f ~/.bashrc ]; then
  source ~/.bashrc
  fi

-- 
Seneca
[EMAIL PROTECTED]


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




vim and basic .bashrc questions

2003-01-19 Thread CM Miller


Just started running Debain as few weeks ago, I ran
Redhat for the last two years, and was ready to move
on. 

Anyway the install went good and I have two user
accounts, cmmiller and root.  

I like to do programming in the Linux environment
cause I love VIM.  I can run VIM as root, but not as
cmmiller.  

Also, I have been able to set .bashrc preferences as
root, like "rm = rm -i".  This works for root, but not
for my user cmmiller.  

How can I make these changes for cmmiller as well? 

thanks

-Chris 



=
"As a taxpayer, why should I support the war against Iraq this time, when it wasn't 
done right the first time? "   

*
GAIM ID:  cmmiller1973
*

__
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: locale & .bash_profile,.bashrc

2003-01-11 Thread Egor Tur
Hi.
May be /etc/invironment
I try to put some variables in /etc/bashrc (not /etc/profile - KDE do not use it for 
me :( ) then this work.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




locale & .bash_profile,.bashrc

2003-01-11 Thread Dave Selby
I need to set my locale to en_GB so abiword will boot up with its spelling 
checker in GB english mode.

Abiword doc suggests I put

export LANG=en_GB
unset LC_ALL

in either .bashrc or .profile
Typing them on the command line then typing abiword works AOK.

Putting them in .bashrc, .bash_profile does not work LANG is not set up.

I run KDE via KDM graphical loggin, are .bashrc and .bash_profile accessed 
when I log in ??? I suspect KDE bypasses them ?

I tried putting a script in the autostart folder of kde, still no go.

I setup the language via the controll centre, still no go

echo $LANG
gives zip

Im a bit confused, how can I set LANG=en_GB on bootup of KDE as a user ?
Any ideas 
Dave


 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




  1   2   >