Re: User's bin path not recognised in login script

2016-03-24 Thread Russell Gadd

On 24/03/16 00:30, David Wright wrote:

...

I don't know what you mean by   "login" script   because you haven't
yet told us (I believe) what your machine is configured to do when
you boot it up. If you've installed some sort of Desktop Environment,
then the DE has the responsibility of selecting the shell that runs
your   "login" script   and, indeed, what the filename of that script
is.


You're right - I didn't explicitly tell you that my desktop environment 
is Mate which I chose when I installed Debian recently. There's a 
"Control Centre" which has a GUI application "Startup Applications" 
which is pre-populated by items such as "GPG Password Agent", "Mate 
Settings Daemon", "Pulse Audio", etc. You can add your own item by 
specifying name and command. This is where I added a bash script I wrote 
which I called "Login" which is located in ~/bin. All my other scripts 
in there are run in a Mate terminal or via a launcher icon on the 
desktop, and in both cases they use the path set up in ~/.bashrc.


Anyway, thanks for the information (including the existence of dash). 
Unfortunately I don't have time to delve deeper into this now as I have 
another project that has reared its head, so I'd ask you not to spend 
any more of your time responding, as I will not revisit this thread. And 
thanks to all other responders for their efforts.




Re: User's bin path not recognised in login script

2016-03-23 Thread The Wanderer
On 2016-03-23 at 20:23, David Wright wrote:

> On Tue 22 Mar 2016 at 22:35:32 (+), Russell Gadd wrote:
> 
>> On 22/03/16 19:00, The Wanderer wrote:

>>> Also, at least on my system, ~/.bashrc is invoked only by being
>>> sourced from ~/.profile or ~/.bash_profile. Unless your system is
>>> configured fairly differently, if ~/.bashrc is getting run, that
>>> means that - per bash(1) - one of ~/.bash_profile, ~/.bash_login,
>>> or ~/.profile must be invoking it.
>>> 
>> I tested by rebooting each time. My ~/.bashrc is sourced from 
>> ~/.profile which itself is sourced from .bash_profile, but neither 
>> of them run the echo command I've added so I would assume the 
>> ~/.bashrc which runs when I open a Mate terminal is started some 
>> other way.
> 
> Take a look at   man bash   which will tell you that ~/.bashrc is
> run whenever an interactive non-login bash is started. Opening a
> terminal session with bash is exactly that.

...you're right, it does say that. I somehow managed to miss it when
searching bash(1) for 'bashrc' before, but it's right there in the first
batch of results.

I apologize for the false trail.

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man. -- George Bernard Shaw



signature.asc
Description: OpenPGP digital signature


Re: User's bin path not recognised in login script

2016-03-23 Thread David Wright
On Tue 22 Mar 2016 at 22:35:32 (+), Russell Gadd wrote:
> On 22/03/16 19:00, The Wanderer wrote:
> >... 
> >
> >How did you test? By launching a new terminal (with bash set as your
> >default shell), by running the command 'bash' in an existing terminal,
> >by logging all of the way out (to the main login prompt, if not to a
> >full reboot) and then logging back in, or by running the command 'bash
> >--login' in an existing terminal?
> >
> >In my testing just now, only the latter two of these four will pick up
> >the new ~/.profile file; the other two seem to run the commands which
> >were present in the file which their parent bash session used. (Strictly
> >speaking I didn't test the full logout or reboot, but I fully expect
> >that that would pick up the changes.)
> >
> >
> >Also, at least on my system, ~/.bashrc is invoked only by being sourced
> >from ~/.profile or ~/.bash_profile. Unless your system is configured
> >fairly differently, if ~/.bashrc is getting run, that means that - per
> >bash(1) - one of ~/.bash_profile, ~/.bash_login, or ~/.profile must be
> >invoking it.
> >
> I tested by rebooting each time. My ~/.bashrc is sourced from
> ~/.profile which itself is sourced from .bash_profile, but neither
> of them run the echo command I've added so I would assume the
> ~/.bashrc which runs when I open a Mate terminal is started some
> other way.

Take a look at   man bash   which will tell you that ~/.bashrc is run
whenever an interactive non-login bash is started. Opening a terminal
session with bash is exactly that.

> bash --login does invoke ~./bash_profile and hence ~./profile as the
> echos are seen in the output file (in the expected order), but I
> must admit the nature of login shells / non-login / interactive
> shells, etc is a bit beyond my experience. I've never tried bash
> --login before as I haven't previously come across it.

Normally, you don't have to run bash --login because it's done for you
by virtue of having /bin/bash in your line of /etc/passwd. However,
that presupposes you're logging in to a VC and then running X with the
startx command. It seems likely that you're not.

> Maybe what this is telling me is that I should run another script
> from my "login" script by 'bash --login real_login_scriptfile' in
> order to get these profiles to run first?

I don't know what you mean by   "login" script   because you haven't
yet told us (I believe) what your machine is configured to do when
you boot it up. If you've installed some sort of Desktop Environment,
then the DE has the responsibility of selecting the shell that runs
your   "login" script   and, indeed, what the filename of that script
is.

If that shell is not bash, then you should put all the environment
commands (basically anything that should only be executed once) in a
file that's *likely* to be called ~/.profile and the rest in
~/.bashrc. But you need to find out what the former should be
called by consulting the DE documentation.

Why .bashrc for a non-bash shell? Assuming you use bash as your
normal shell, you want all your functions and so on available.
However, a non-bash shell (like Debian's default dash shell) will
choke on bash's syntax as well as not being able to execute its
functions.

If you sometimes login with bash (eg remotely), then set your
~/.bash_profile to call both ~/.profile (for the one-off environment
stuff you've just set up) and ~/.bashrc (for the functions).

BTW bear in mind that some operations may be disrupted by having
startup files like .bashrc that aren't mute. It's probably not that
important while you're getting things sorted out, but you might want
to change them to something like this if you intend keeping things noisy:

[ -n "$PS1" ] && printf '%s\n' "(This is $HOME/.bash_profile 2015 July 13)"

Cheers,
David.



Re: User's bin path not recognised in login script

2016-03-22 Thread The Wanderer
On 2016-03-22 at 18:35, Russell Gadd wrote:

> On 22/03/16 19:00, The Wanderer wrote:

>> How did you test? By launching a new terminal (with bash set as
>> your default shell), by running the command 'bash' in an existing
>> terminal, by logging all of the way out (to the main login prompt,
>> if not to a full reboot) and then logging back in, or by running
>> the command 'bash --login' in an existing terminal?
>> 
>> In my testing just now, only the latter two of these four will pick
>> up the new ~/.profile file; the other two seem to run the commands
>> which were present in the file which their parent bash session
>> used. (Strictly speaking I didn't test the full logout or reboot,
>> but I fully expect that that would pick up the changes.)
>> 
>> 
>> Also, at least on my system, ~/.bashrc is invoked only by being
>> sourced from ~/.profile or ~/.bash_profile. Unless your system is
>> configured fairly differently, if ~/.bashrc is getting run, that
>> means that - per bash(1) - one of ~/.bash_profile, ~/.bash_login,
>> or ~/.profile must be invoking it.
> 
> I tested by rebooting each time. My ~/.bashrc is sourced from
> ~/.profile which itself is sourced from .bash_profile, but neither of
> them run the echo command I've added so I would assume the ~/.bashrc
> which runs when I open a Mate terminal is started some other way.
> 
> bash --login does invoke ~./bash_profile and hence ~./profile as the
>  echos are seen in the output file (in the expected order), but I
> must admit the nature of login shells / non-login / interactive
> shells, etc is a bit beyond my experience. I've never tried bash
> --login before as I haven't previously come across it.

Just as a stab in the dark: in a newly-launched terminal after a fresh
reboot, with no other commands run yet, what does 'echo $0' say?

There's a faint chance that your default shell isn't actually bash,
which would explain what you're seeing. I don't think that's very
likely, for multiple reasons, but it's easy enough to rule out.

> Maybe what this is telling me is that I should run another script
> from my "login" script by 'bash --login real_login_scriptfile' in
> order to get these profiles to run first?

I wouldn't advise that route, no. It might work, but it would be a
kludge at best, not a real solution.

Instead, assuming that the above test confirms that you are running bash
in these cases, I'd start out by going all the way to the top of the
stack and figuring out what scripts are calling what, to figure out how
~/.bashrc is getting invoked. Figuring that out should help figure out
what's going on, which should help get the rest to make sense.


Things to try include:

find ~/ -type f -maxdepth 1 -name ".*" -exec grep bashrc \;

grep -R bashrc /etc/bash*

strace -f bash --login 2>/tmp/bash.strace
[Ctrl-D]
(then search the resulting file for mentions of .bashrc, and look above
that to figure out which scripts were opened before opening .bashrc)

This last is the most complicated and hardest to understand, and I'm
pretty sure I haven't got the right strace command to get the most
information out of it anyway, but it should be enough to get things started.

You can also try searching the file for mentions of the profile files,
just in case they show up directly. (They should, in fact.)

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man. -- George Bernard Shaw



signature.asc
Description: OpenPGP digital signature


Re: User's bin path not recognised in login script

2016-03-22 Thread Lisi Reisz
On Tuesday 22 March 2016 21:42:11 seeker5...@comcast.net wrote:
> See if this gets through, my WiFi got flaky, which seems like it cause some
> issue with imap between Thunderbird and Comcast. Thunderbird claims the
> message was sent twice, but I never got a copy in my inbox.

I got two earlier copies of each of two emails sent by you.  You can check the 
archives, rather than sending three copies, if you want to be sure!!  Been 
there, done that, got the tee shirt. ;-)

Lisi



Re: User's bin path not recognised in login script

2016-03-22 Thread Russell Gadd

On 22/03/16 20:20, Seeker wrote:

...

Create '~/.xprofile' and put your export commands and extra non-desktop
specific stuff you
  always want to run there.

https://wiki.archlinux.org/index.php/xprofile

Later, Seeker


Thanks. I might try this later.



Re: User's bin path not recognised in login script

2016-03-22 Thread Russell Gadd

On 22/03/16 19:00, The Wanderer wrote:

... 

How did you test? By launching a new terminal (with bash set as your
default shell), by running the command 'bash' in an existing terminal,
by logging all of the way out (to the main login prompt, if not to a
full reboot) and then logging back in, or by running the command 'bash
--login' in an existing terminal?

In my testing just now, only the latter two of these four will pick up
the new ~/.profile file; the other two seem to run the commands which
were present in the file which their parent bash session used. (Strictly
speaking I didn't test the full logout or reboot, but I fully expect
that that would pick up the changes.)


Also, at least on my system, ~/.bashrc is invoked only by being sourced
from ~/.profile or ~/.bash_profile. Unless your system is configured
fairly differently, if ~/.bashrc is getting run, that means that - per
bash(1) - one of ~/.bash_profile, ~/.bash_login, or ~/.profile must be
invoking it.

I tested by rebooting each time. My ~/.bashrc is sourced from ~/.profile 
which itself is sourced from .bash_profile, but neither of them run the 
echo command I've added so I would assume the ~/.bashrc which runs when 
I open a Mate terminal is started some other way.


bash --login does invoke ~./bash_profile and hence ~./profile as the 
echos are seen in the output file (in the expected order), but I must 
admit the nature of login shells / non-login / interactive shells, etc 
is a bit beyond my experience. I've never tried bash --login before as I 
haven't previously come across it.


Maybe what this is telling me is that I should run another script from 
my "login" script by 'bash --login real_login_scriptfile' in order to 
get these profiles to run first?




Re: User's bin path not recognised in login script

2016-03-22 Thread seeker5528
See if this gets through, my WiFi got flaky, which seems like it cause some 
issue with imap between Thunderbird and Comcast. Thunderbird claims the 
message was sent twice, but I never got a copy in my inbox. 

Here we go again, from the webmail this time. ;) 



On 3/22/2016 11:20 AM, Russell Gadd wrote: 



Thanks for the export point which I have now used. However it doesn't 
solve the problem. 

I experimented by adding the following line into ~/.bash_profile, 
~/.profile and ~/.bashrc: 
echo "This is " &>>/tmp/out.txt 

Neither of the profile files triggered the output, nor did .bashrc 
until I manually opened a Mate terminal from the desktop. So it 
appears that the profile files do not get invoked at any time. 

I've even tried changing the PATH which is set at the top of 
/etc/profile, but this doesn't work either, so it looks like profile 
files are ignored altogether. 



I did a search using terms that seemed like likely suspects if I expected the 
login shell stuff to get 
sourced when a display manager is handling the login instead of the shell. 

The first page of results I got where some combination of old, incomplete, 
and/or GDM specific. 
Even in the GDM case, I'm not sure if the documentation is correct for current 
versions of GDM 
since I have not used GDM for a long time. 

Sourcing '~/.profile' when the shell is not your login was more of a Redhat 
thing that other 
distributions may or may not do. 

I did see some bug reports which would probably have some relevant information 
in the 
responses. 

Create '~/.xprofile' and put your export commands and extra non-desktop 
specific stuff you 
always want to run there. 

https://wiki.archlinux.org/index.php/xprofile 

Later, Seeker 


Re: User's bin path not recognised in login script

2016-03-22 Thread Seeker


On 3/22/2016 1:11 PM, Michael Fothergill wrote:



On 22 March 2016 at 19:59, Dan Ritter > wrote:


On Tue, Mar 22, 2016 at 05:13:43PM +, Michael Fothergill wrote:
> On 22 March 2016 at 16:24, Andrew McGlashan <
> andrew.mcglas...@affinityvision.com.au
> wrote:
>
> > Hi,
> >
> > On 23/03/2016 12:18 AM, Michael Fothergill wrote:
> > > I own a Samsung BD-C5900 Blu ray/DVD player.
> >
There's a reasonable chance that if you attack it with a
screwdriver, you will discover that there is a modern SATA
bluray/DVD drive in there, and you can rip it out and put
it in your computer.

-dsr-


​Would that drive be one that only read bluray and DVD disks or could 
it be modified to burn them as well?




If the player did not have functions built in for recording the drive is 
probably just a reader, no

write capability.

It my reach a point where it makes more economic sense for the 
manufacturers to only create
RW drives than it does for them to have 2 production lines, but don't 
know if we are there yet,

much less if we were there when your player was manufactured.

Also I expect it's more likely that the player would have a laptop style 
drive in it which would
require an adapter to handle the different size of SATA data/power 
connectors if you are looking

to use it in a desktop system.

If the system you are looking to use it in is a laptop, then newer 
laptops that still include an
optical drive have gone to thinner drives. Outside of that it's a 
question of how things line up.
The piece that secures the drive to the laptop could probably be swapped 
with the piece off
of the old drive if necessary or left off if the drive fits tight enough 
if really necessary. The face
plate is less likely the match up between the two drives, especially 
between a DVD drive and a

Blue Ray drive.

Later, Seeker



Re: User's bin path not recognised in login script

2016-03-22 Thread Seeker



On 3/22/2016 11:20 AM, Russell Gadd wrote:


Thanks for the export point which I have now used. However it doesn't
solve the problem.

I experimented by adding the following line into ~/.bash_profile,
~/.profile and ~/.bashrc:
echo "This is " &>>/tmp/out.txt

Neither of the profile files triggered the output, nor did .bashrc
until I manually opened a Mate terminal from the desktop. So it
appears that the profile files do not get invoked at any time.

I've even tried changing the PATH which is set at the top of
/etc/profile, but this doesn't work either, so it looks like profile
files are ignored altogether.



I did a search using terms that seemed like likely suspects if I 
expected the login shell stuff to get

sourced when a display manager is handling the login instead of the shell.

The first page of results I got where some combination of old, 
incomplete, and/or GDM specific.
Even in the GDM case, I'm not sure if the documentation is correct for 
current versions of GDM

since I have not used GDM for a long time.

Sourcing '~/.profile' when the shell is not your login was more of a 
Redhat thing that other

distributions may or may not do.

I did see some bug reports which would probably have some relevant 
information in the

responses.

Create '~/.xprofile' and put your export commands and extra non-desktop 
specific stuff you

 always want to run there.

https://wiki.archlinux.org/index.php/xprofile

Later, Seeker





Re: User's bin path not recognised in login script

2016-03-22 Thread Seeker



On 3/22/2016 11:20 AM, Russell Gadd wrote:


Thanks for the export point which I have now used. However it doesn't 
solve the problem.


I experimented by adding the following line into ~/.bash_profile, 
~/.profile and ~/.bashrc:

echo "This is " &>>/tmp/out.txt

Neither of the profile files triggered the output, nor did .bashrc 
until I manually opened a Mate terminal from the desktop. So it 
appears that the profile files do not get invoked at any time.


I've even tried changing the PATH which is set at the top of 
/etc/profile, but this doesn't work either, so it looks like profile 
files are ignored altogether.




I did a search using terms that seemed like likely suspects if I 
expected the login shell stuff to get

sourced when a display manager is handling the login instead of the shell.

The first page of results I got where some combination of old, 
incomplete, and/or GDM specific.
Even in the GDM case, I'm not sure if the documentation is correct for 
current versions of GDM

since I have not used GDM for a long time.

Sourcing '~/.profile' when the shell is not your login was more of a 
Redhat thing that other

distributions may or may not do.

I did see some bug reports which would probably have some relevant 
information in the

responses.

Create '~/.xprofile' and put your export commands and extra non-desktop 
specific stuff you

 always want to run there.

https://wiki.archlinux.org/index.php/xprofile

Later, Seeker





Re: User's bin path not recognised in login script

2016-03-22 Thread The Wanderer
On 2016-03-22 at 14:20, Russell Gadd wrote:

> On 22/03/16 02:40, David Christensen wrote:

>> Did you remember the 'export' in .profile?
>>
>>  export PATH=$PATH:$HOME/bin
>>
>>
>> It might help to add echo's in the various scripts to check the
>> order in which they run -- e.g. verify that .bash_profile runs
>> before your bash login script, so that PATH includes $HOME/bin.
> 
> Thanks for the export point which I have now used. However it
> doesn't solve the problem.
> 
> I experimented by adding the following line into ~/.bash_profile,
> ~/.profile and ~/.bashrc:
> echo "This is " &>>/tmp/out.txt
> 
> Neither of the profile files triggered the output, nor did .bashrc
> until I manually opened a Mate terminal from the desktop. So it
> appears that the profile files do not get invoked at any time.

How did you test? By launching a new terminal (with bash set as your
default shell), by running the command 'bash' in an existing terminal,
by logging all of the way out (to the main login prompt, if not to a
full reboot) and then logging back in, or by running the command 'bash
--login' in an existing terminal?

In my testing just now, only the latter two of these four will pick up
the new ~/.profile file; the other two seem to run the commands which
were present in the file which their parent bash session used. (Strictly
speaking I didn't test the full logout or reboot, but I fully expect
that that would pick up the changes.)


Also, at least on my system, ~/.bashrc is invoked only by being sourced
from ~/.profile or ~/.bash_profile. Unless your system is configured
fairly differently, if ~/.bashrc is getting run, that means that - per
bash(1) - one of ~/.bash_profile, ~/.bash_login, or ~/.profile must be
invoking it.

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man. -- George Bernard Shaw



signature.asc
Description: OpenPGP digital signature


Re: User's bin path not recognised in login script

2016-03-22 Thread Russell Gadd

On 22/03/16 02:40, David Christensen wrote:

...

Did you remember the 'export' in .profile?

 export PATH=$PATH:$HOME/bin


It might help to add echo's in the various scripts to check the order in
which they run -- e.g. verify that .bash_profile runs before your bash
login script, so that PATH includes $HOME/bin.



Thanks for the export point which I have now used. However it doesn't 
solve the problem.


I experimented by adding the following line into ~/.bash_profile, 
~/.profile and ~/.bashrc:

echo "This is " &>>/tmp/out.txt

Neither of the profile files triggered the output, nor did .bashrc until 
I manually opened a Mate terminal from the desktop. So it appears that 
the profile files do not get invoked at any time.


I've even tried changing the PATH which is set at the top of 
/etc/profile, but this doesn't work either, so it looks like profile 
files are ignored altogether.




Re: User's bin path not recognised in login script

2016-03-21 Thread David Christensen

On 03/21/2016 11:03 AM, Russell Gadd wrote:

The bash login script I have added in to my startup programs does not
recognise /home/user/bin as part of the path, whereas it used to when I
was running Linux Mint (I'm a recent refugee). I've got
PATH="$HOME/bin:$PATH" in ~/.bashrc and also in ~/.profile, together
with a ~/.bash_profile which sources ~/.profile. I've no idea whether
all these are necessary - they do work to search my bin in a script run
in the Mate terminal but not in the login script. It's not a big deal as
I can prepend the absolute path in the login script, although I assume
this means also doing it in sourced scripts within the login script, so
I'd like to know if there's a clean way to set this up.



Did you remember the 'export' in .profile?

export PATH=$PATH:$HOME/bin


It might help to add echo's in the various scripts to check the order in 
which they run -- e.g. verify that .bash_profile runs before your bash 
login script, so that PATH includes $HOME/bin.



David



Re: User's bin path not recognised in login script

2016-03-21 Thread Sven Arvidsson
On Mon, 2016-03-21 at 18:03 +, Russell Gadd wrote:
> The bash login script I have added in to my startup programs does
> not 
> recognise /home/user/bin as part of the path, whereas it used to when
> I 
> was running Linux Mint (I'm a recent refugee). I've got 
> PATH="$HOME/bin:$PATH" in ~/.bashrc and also in ~/.profile, together 
> with a ~/.bash_profile which sources ~/.profile. I've no idea
> whether 
> all these are necessary - they do work to search my bin in a script
> run 
> in the Mate terminal but not in the login script. It's not a big deal
> as 
> I can prepend the absolute path in the login script, although I
> assume 
> this means also doing it in sourced scripts within the login script,
> so 
> I'd like to know if there's a clean way to set this up.

If you are using gdm to launch X, /etc/gdm3/Xsession sources ~/.profile
other display managers probably do something similar.

-- 
Cheers,
Sven Arvidsson
http://www.whiz.se
PGP Key ID 6FAB5CD5





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


User's bin path not recognised in login script

2016-03-21 Thread Russell Gadd
The bash login script I have added in to my startup programs does not 
recognise /home/user/bin as part of the path, whereas it used to when I 
was running Linux Mint (I'm a recent refugee). I've got 
PATH="$HOME/bin:$PATH" in ~/.bashrc and also in ~/.profile, together 
with a ~/.bash_profile which sources ~/.profile. I've no idea whether 
all these are necessary - they do work to search my bin in a script run 
in the Mate terminal but not in the login script. It's not a big deal as 
I can prepend the absolute path in the login script, although I assume 
this means also doing it in sourced scripts within the login script, so 
I'd like to know if there's a clean way to set this up.




Re: scp, sftp, ssh et login script

2009-04-18 Thread Le poulpe qui bloppe !
Bonjour,
Lorsque tu affiche un login script interactif, c'est effectivement pas
supporté par scp.
Donc il faut préciser en haut de ton login script que si la session
n'est pas interactive (comme en scp) alors il n'execute pas le script.
Pour cela, ajoute:

[ -z $PS1 ]  return

a+

--
Lisez la FAQ de la liste avant de poser une question :
http://wiki.debian.org/fr/FrenchLists Vous pouvez aussi ajouter le mot
``spam'' dans vos champs From et Reply-To:

Pour vous DESABONNER, envoyez un message avec comme objet unsubscribe
vers debian-user-french-requ...@lists.debian.org
En cas de soucis, contactez EN ANGLAIS listmas...@lists.debian.org



scp, sftp, ssh et login script

2009-04-17 Thread Thierry Leurent
Bonjour,

J'ai un petit problème, je configure un serveur sur lequel des users doivent se 
connecter via ssh. Lorsque ces users se connectent, ils se voyent présenté un 
petit menu.
Ils devront aussi utilise scp pour copier des données depuis leur poste de 
travail (windows) en utilisant winscp.

Malheureusement, win scp me renvoie une erreur qui est due à mon login script 
interactif.
Se login script se situe dans /etc/profile.d/

Comment puis-je résoudre ce problème ?

Merci.

Thierrry

--
Lisez la FAQ de la liste avant de poser une question :
http://wiki.debian.org/fr/FrenchLists Vous pouvez aussi ajouter le mot
``spam'' dans vos champs From et Reply-To:

Pour vous DESABONNER, envoyez un message avec comme objet unsubscribe
vers debian-user-french-requ...@lists.debian.org
En cas de soucis, contactez EN ANGLAIS listmas...@lists.debian.org



Re: scp, sftp, ssh et login script

2009-04-17 Thread fabrice régnier

'soir,

Malheureusement, win scp me renvoie une erreur qui est due à mon login script 
interactif.

Se login script se situe dans /etc/profile.d/

Quelle est cette erreur ?

As tu la même erreur en faisant ton scp d'un poste linux ?

a+

f.


Comment puis-je résoudre ce problème ?

en corrigeant l'erreur ;) ?

--
Lisez la FAQ de la liste avant de poser une question :
http://wiki.debian.org/fr/FrenchLists Vous pouvez aussi ajouter le mot
``spam'' dans vos champs From et Reply-To:

Pour vous DESABONNER, envoyez un message avec comme objet unsubscribe
vers debian-user-french-requ...@lists.debian.org
En cas de soucis, contactez EN ANGLAIS listmas...@lists.debian.org



pGina - Login Script

2007-05-03 Thread Fibrox Fibrox

Pessoal:

No começo todos os meus usuários poderiam ter uma área de armazenamento no
servidor, sendo que este usuário através do pGina, é autenticado no LDAP e
depois tem sua área mapeada no XP. Funciona.

Agora temos alguns usuários que não terão direito a ter uma área dentro do
servidor, sendo assim, quando o for feito o mapeamento ocorrerá um erro.

Estive pensando e talvez um login script para o pGina possa minimizar este
problema. O script, se for ao estilo DOS, não sei, trataria o erro
resultante da tentativa de mapear e sendo assim mapearia ou não uma área
comum para os mesmos.

Alguém sabe como se escreve login script para o pGina. Estou usando a versão
1.88.

Em tempo. Podemos ler através do pGina campos de um LDAP?

Muito obrigado.

--

Fibrox
-
O tempo passa. Divirta-se!


Re: remote login script

2005-11-23 Thread marzubus
What about ssh -X [EMAIL PROTECTED]

this enables x11 forwarding for session

Kegan Holtzhausen


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



Re: remote login script

2005-11-23 Thread Yoram Hekma

Amish Rughoonundon wrote:


Hi,
I would like to do something only when i remote login to my debian 
box. I would like to run export DISPLAY=[client ip]:0.0 but i don't 
want linux to do this if I login on the box itself. Thanks

Amish


I take it you log in using ssh? If so, try ssh -X or ssh -Y. This 
tunnels your X through ssh.

You have to allow X-forwarding in /etc/sshd_config though


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




remote login script

2005-11-22 Thread Amish Rughoonundon

Hi,
I would like to do something only when i remote login to my debian box. I 
would like to run export DISPLAY=[client ip]:0.0 but i don't want linux to 
do this if I login on the box itself. Thanks

Amish


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




Samba - recycle / login script individual

2005-09-06 Thread Keny Hayakawa Schmeling
Boa tarde pessoal

Deixa eu perguntar 2 coisinhas do Samba


1 - Existe alguma maneira de se criar um login script diferente para cada
usuário?
Eu sei que o parâmetro logon script = login.bat faz o login.bat ser
executado em todos os usuários. Eu gostaria que o usuário A executasse o
loginA.bat, o usuário B executasse o loginB.bat.

2 - Alguém sabe todos os parâmetros do VSF recycle?

recycle:repository = .Lixeira/%U
# Pasta onde vai ser armazenados todos os arquivos apagados.

recycle:keeptree = yes
# Para manter a estrutura de diretório dos arquivos apagados.

recycle:versions = yes
# Caso sejam apagados 2 arquivos iguais, modifica-se o nome do segundo

recycle:touch = yes
# Não sei, :-P

recycle:exclude= *.TMP *.tmp *.temp *.old *.OLD *.TEMP ~$*
# Extensões que não vão para lixeira.

 

Keny Hayakawa Schmeling
Diretor Administrativo
Optinfo Tecnologia em Informática Ltda.
Telefone:
(11) 6805-1529
Celular:
(11) 9948-0734
E-mail:
[EMAIL PROTECTED]
[EMAIL PROTECTED] · www.optinfo.com.br



RES: Samba - recycle / login script individual

2005-09-06 Thread Keny Hayakawa Schmeling
Quanto ao login script individual, eu encontrei um lance assim:

logon script = %U.bat

Vou testar agora para ver o que eh que dá. Fica ai a dica

 

Keny Hayakawa Schmeling
Diretor Administrativo
Optinfo Tecnologia em Informática Ltda.
Telefone:
(11) 6805-1529
Celular:
(11) 9948-0734
E-mail:
[EMAIL PROTECTED]
[EMAIL PROTECTED] · www.optinfo.com.br
 

-Mensagem original-
De: Keny Hayakawa Schmeling [mailto:[EMAIL PROTECTED] 
Enviada em: terça-feira, 6 de setembro de 2005 14:46
Para: debian-user-portuguese@lists.debian.org
Cc: debian-user-portuguese@lists.debian.org
Assunto: Samba - recycle / login script individual

Boa tarde pessoal

Deixa eu perguntar 2 coisinhas do Samba


1 - Existe alguma maneira de se criar um login script diferente para cada
usuário?
Eu sei que o parâmetro logon script = login.bat faz o login.bat ser
executado em todos os usuários. Eu gostaria que o usuário A executasse o
loginA.bat, o usuário B executasse o loginB.bat.

2 - Alguém sabe todos os parâmetros do VSF recycle?

recycle:repository = .Lixeira/%U
# Pasta onde vai ser armazenados todos os arquivos apagados.

recycle:keeptree = yes
# Para manter a estrutura de diretório dos arquivos apagados.

recycle:versions = yes
# Caso sejam apagados 2 arquivos iguais, modifica-se o nome do segundo

recycle:touch = yes
# Não sei, :-P

recycle:exclude= *.TMP *.tmp *.temp *.old *.OLD *.TEMP ~$*
# Extensões que não vão para lixeira.

 

Keny Hayakawa Schmeling
Diretor Administrativo
Optinfo Tecnologia em Informática Ltda.
Telefone:
(11) 6805-1529
Celular:
(11) 9948-0734
E-mail:
[EMAIL PROTECTED]
[EMAIL PROTECTED] · www.optinfo.com.br





Re: login script xterm

2004-11-26 Thread ms419
On Nov 17, 2004, at 5:10 AM, Andrea Vettorello wrote:
On Tue, 16 Nov 2004 23:12:46 -0800, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
Where should I put commands to be executed when I login,  when I open
an xterm, but not when a shell is run on other occasions?
I want some commands executed when I login, but not when a shell is
otherwise run, so I put them in my ~/.login, vs. my ~/.bashrc.
Unfortunately, they aren't executed when I open an xterm.
I hoped there might be a ~/.xtermrc I could put them in, but I haven't
found mention of an xterm initialization script anywhere in the
documentation.
Also, I thought I could configure xterm to start as if with the -ls
flag. Anyway, there's probably a reason it doesn't, like a login shell
might break some application using xterm?
Where should I put them?
Well, .bash_profile is executed for login shells and .bashrc is
executed for non-login shells.
If you want to set some environment variables or execute some commands
only when xterm are launched, you can add a condition in your
.bashrc, something like:
case $TERM in
xterm*)
echo This is an XTerm
;;
*)
echo This isn't an XTerm
;;
esac
Hope this helps.
That's awesome! Thanks! These lines work great, in .bash_profile for 
login shells  .bashrc for xterms:

if [ -n $PS1 ]; then
if [ -z $STY ]; then
# An interactive shell without screen.
exec screen -xRR
else
# An interactive shell within screen.
alias grep=grep --color
alias ls=ls --color
fi
fi
Thanks again!
Jack
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: login script xterm

2004-11-17 Thread Thomas Dickey
[EMAIL PROTECTED] wrote:
 Where should I put commands to be executed when I login,  when I open 
 an xterm, but not when a shell is run on other occasions?

 I want some commands executed when I login, but not when a shell is 
 otherwise run, so I put them in my ~/.login, vs. my ~/.bashrc. 
 Unfortunately, they aren't executed when I open an xterm.

But you could make a command, e.g., in your menu setup, which does this.
For example
xterm -e sh -c initialize_and_go

 I hoped there might be a ~/.xtermrc I could put them in, but I haven't 
 found mention of an xterm initialization script anywhere in the 
 documentation.

 Also, I thought I could configure xterm to start as if with the -ls 
 flag. Anyway, there's probably a reason it doesn't, like a login shell 
 might break some application using xterm?

It would annoy people who want xterm to start rapidly without running the
initialization script.

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net


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



Re: login script xterm

2004-11-17 Thread Andrea Vettorello
On Tue, 16 Nov 2004 23:12:46 -0800, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 Where should I put commands to be executed when I login,  when I open
 an xterm, but not when a shell is run on other occasions?
 
 I want some commands executed when I login, but not when a shell is
 otherwise run, so I put them in my ~/.login, vs. my ~/.bashrc.
 Unfortunately, they aren't executed when I open an xterm.
 
 I hoped there might be a ~/.xtermrc I could put them in, but I haven't
 found mention of an xterm initialization script anywhere in the
 documentation.
 
 Also, I thought I could configure xterm to start as if with the -ls
 flag. Anyway, there's probably a reason it doesn't, like a login shell
 might break some application using xterm?
 
 Where should I put them?
 

Well, .bash_profile is executed for login shells and .bashrc is
executed for non-login shells.

If you want to set some environment variables or execute some commands
only when xterm are launched, you can add a condition in your
.bashrc, something like:

case $TERM in
xterm*)
echo This is an XTerm
;;
*)
echo This isn't an XTerm
;;
esac

Hope this helps.


Andrea


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



login script xterm

2004-11-16 Thread ms419
Where should I put commands to be executed when I login,  when I open 
an xterm, but not when a shell is run on other occasions?

I want some commands executed when I login, but not when a shell is 
otherwise run, so I put them in my ~/.login, vs. my ~/.bashrc. 
Unfortunately, they aren't executed when I open an xterm.

I hoped there might be a ~/.xtermrc I could put them in, but I haven't 
found mention of an xterm initialization script anywhere in the 
documentation.

Also, I thought I could configure xterm to start as if with the -ls 
flag. Anyway, there's probably a reason it doesn't, like a login shell 
might break some application using xterm?

Where should I put them?
Thanks!
Jack
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: bash login script problems...

2002-06-19 Thread Ivo Wever

Derrick 'dman' Hudson wrote:

Neal Lippman wrote:
| I am having two problems with bash login scripts, which I cannot seem to sort 
| out. Probably something simple, but I'm missing it.
| 
| 1. First, here is a few lines from my .bash_profile. These lines were 
| commented out by default, and I have uncommented them. 

| I have verified, by adding some echo statements, that the body of the if 
| clause IS being executed when I issue './.bash_profile' and so my ~/bin dir 
^^^
 | should be getting added to my path. However, after the script completes, 
| 'echo $PATH' does NOT show any change to my path shell variable.
| 
| What am I missing here?


When you run a script in a subshell, it can modify the environment of
that subshell, then that subshell terminates (when the script is done)
and you get the prompt from your original shell again.  Unlike MS-DOS,
scripts normally run in subshells and can't wreak havoc on your
environment.  If you want to run the script in the current shell, use
one of the following commands :
. ./.bash_profile
source ./.bash_profile


Isn't this (changing $PATH from a script) what the 'export' command is for?
sincerely,
--
Ivo Wever
[EMAIL PROTECTED]


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




Re: bash login script problems...

2002-06-19 Thread Colin Watson
On Wed, Jun 19, 2002 at 04:50:14PM +0200, Ivo Wever wrote:
 Derrick 'dman' Hudson wrote:
 When you run a script in a subshell, it can modify the environment of
 that subshell, then that subshell terminates (when the script is done)
 and you get the prompt from your original shell again.  Unlike MS-DOS,
 scripts normally run in subshells and can't wreak havoc on your
 environment.  If you want to run the script in the current shell, use
 one of the following commands :
 . ./.bash_profile
 source ./.bash_profile
 
 Isn't this (changing $PATH from a script) what the 'export' command is
 for?

Unfortunately not. 'export' makes variables visible to subprocesses of a
script, but not to the parent process (in other words, the shell from
which you called that script).

-- 
Colin Watson  [EMAIL PROTECTED]


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



bash login script problems...

2002-06-15 Thread Neal Lippman
I am having two problems with bash login scripts, which I cannot seem to sort 
out. Probably something simple, but I'm missing it.

1. First, here is a few lines from my .bash_profile. These lines were 
commented out by default, and I have uncommented them. 

# set PATH so it includes user's private bin if it exists
# uncommented nl 6/15/02
if [ -d ~/bin ] ; then
PATH=~/bin:${PATH}
export PATH
fi

I have verified, by adding some echo statements, that the body of the if 
clause IS being executed when I issue './.bash_profile' and so my ~/bin dir 
should be getting added to my path. However, after the script completes, 
'echo $PATH' does NOT show any change to my path shell variable.

What am I missing here?

2. I previously used Mandrake, and just switched to debian. Under KDE, when I 
run a standard console shell (eg the standard KDE xterm), when I used 
mandrake it appeared that .bash_profile was automatically executed, and the 
suppled mandrake version then executed .bashrc for me. It appears that under 
Debian, however, .bashrc is executed directly and .bash_profile is only 
executed when I login directly on a ptty, rather than from an xterm under KDE.

Is my understanding correct? Is there any easy way to ensure that both 
scripts are executed regardless of the method of logging in and where I log 
in to (eg Mandrake or Debian)? The reason this matters, btw, is that my old 
Mandrake computer is now my file server, and the Debian system mounts my home 
directory as an NFS share, so logins to either system (and distro) now share 
the same files. As a result, when is SSH from teh debian system to the 
mandrake, I DON'T get my correct login scripts running, and I need a 
(relatively) simply way of having the same prompt format, aliases, etc 
regardless of whether I am workign on the Debian system or remotely on the 
(Mandrake) file server.

Thanks for any help.

Neal


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



Re: bash login script problems...

2002-06-15 Thread Derrick 'dman' Hudson
On Sat, Jun 15, 2002 at 10:16:37PM -0400, Neal Lippman wrote:
| I am having two problems with bash login scripts, which I cannot seem to sort 
| out. Probably something simple, but I'm missing it.
| 
| 1. First, here is a few lines from my .bash_profile. These lines were 
| commented out by default, and I have uncommented them. 

| I have verified, by adding some echo statements, that the body of the if 
| clause IS being executed when I issue './.bash_profile' and so my ~/bin dir 
 ^^^

| should be getting added to my path. However, after the script completes, 
| 'echo $PATH' does NOT show any change to my path shell variable.
| 
| What am I missing here?

When you run a script in a subshell, it can modify the environment of
that subshell, then that subshell terminates (when the script is done)
and you get the prompt from your original shell again.  Unlike MS-DOS,
scripts normally run in subshells and can't wreak havoc on your
environment.  If you want to run the script in the current shell, use
one of the following commands :
. ./.bash_profile
source ./.bash_profile

| 2. I previously used Mandrake, and just switched to debian. Under KDE, when I 
| run a standard console shell (eg the standard KDE xterm), when I
| used mandrake it appeared that .bash_profile was automatically
| executed, and the suppled mandrake version then executed .bashrc for
| me. It appears that under Debian, however, .bashrc is executed
| directly and .bash_profile is only executed when I login directly on
| a ptty, rather than from an xterm under KDE.

This is normal.  Read 'man bash'.  ~/.bashrc is run for
non-login shells.  ~/.bash_profile is run for login shells.  When you
log in you start a login shell, when you run xterm you don't start a
login shell.

What I do is put all config stuff in ~/.bashrc and ~/.bash_profile
looks like this :


# .bash_profile

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

HTH,
-D

-- 

What good is it for a man to gain the whole world, yet forfeit his
soul?  Or what can a man give in exchange for his soul?
Mark 8:36-37
 
http://dman.ddts.net/~dman/



pgpJBIOA8Fv1M.pgp
Description: PGP signature


Re: bash login script problems...

2002-06-15 Thread Neal Lippman

 When you run a script in a subshell, it can modify the environment of
 that subshell, then that subshell terminates (when the script is done)
 and you get the prompt from your original shell again.  Unlike MS-DOS,
 scripts normally run in subshells and can't wreak havoc on your
 environment.  If you want to run the script in the current shell, use
 one of the following commands :
 . ./.bash_profile
 source ./.bash_profile

Thanks. I was confusing the use of the export builtin and how it 
exports a 
shell variable to the environment.




 What I do is put all config stuff in ~/.bashrc and ~/.bash_profile
 looks like this :


 # .bash_profile

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

duh. Thanks very much.


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



Re: login script

1999-11-20 Thread Eric G . Miller
On Sat, Nov 20, 1999 at 02:05:56PM -0500, Antonio Rodriguez wrote:
 after fixing my keyboard settings with xkeycaps, it told me to modify my
 login script to contain a line like
 xmodemap~ ... etc
 Where is my login script? I already learned to vi a text file (from
 windows to unix-linux there is a lot to learn!!!), but first I need to
 find the script. Please help. Thanks

You have to create one. Create a file called .xsession in your $HOME
directory. Minimally, it will need to look similar to the following.

#!/bin/sh
xmodmap [your arguments here]
xterm# start with an xterm opened
exec fvwm # change this to your favorite windowmanager

Make this file executable: $ chmod +x $HOME/.xsession

Restart X. You may or may not need to make a symlink to ~/.xsession if
you are starting X from the command line rather than from xdm. I think,
debian has it setup so this isn't necessary, but if your script isn't
being executed, try: $ ln -s .xsession .xinitrc .

-- 
++
| Eric G. Milleregm2@jps.net |
| GnuPG public key: http://www.jps.net/egm2/gpg.asc  |
++


login script

1999-11-20 Thread Antonio Rodriguez
after fixing my keyboard settings with xkeycaps, it told me to modify my
login script to contain a line like
xmodemap~ ... etc
Where is my login script? I already learned to vi a text file (from
windows to unix-linux there is a lot to learn!!!), but first I need to
find the script. Please help. Thanks


Login script!

1999-08-07 Thread Rudy Broersma
Hi,

Is it possible that Linux executes a script file when a user logs on?
So for example, if user RUDY logs on, it executes the /home/rudy/script
file, and when ROOT logs on, it executes the /root/script file!

Could anybody please give me some examples?

Thanks in advance,

Rudy






Re: Login script!

1999-08-07 Thread Oliver Elphick
Rudy Broersma wrote:
  Hi,
  
  Is it possible that Linux executes a script file when a user logs on?
  So for example, if user RUDY logs on, it executes the /home/rudy/script
  file, and when ROOT logs on, it executes the /root/script file!
  
  Could anybody please give me some examples?

Yes.

Exactly how it works depends a lot on what your setup is.

1) Not using xdm
  a) Shell is sh, bash, ash, ksh or other Bourne-shell derivative:
 Every login (except, perhaps, root?) first runs /etc/profile.
 Next a file in your home directory is run; which one it is depends on
 which shell you are running.  Default for Bourne shell is .profile;
 for bash it is .bash_profile; other shells may have different
 behaviour - read the man page.
  b) Shell is csh, tcsh:
 .login in your home directory is run

2) Using xdm (log-in in a graphical screen)
  If you have a .xsession file in your home directory, it is run; if you
  don't, /etc/X11/Xsession is run.


Any of these scripts can run other scripts, without limit.


Different scripts get run if you start a new shell when you are already
logged in.

sh -  [nothing]
bash   -  $HOME/.bash_rc
ksh-  [contents of $ENV variable]
csh-  $HOME/.cshrc
startx -  $HOME/.xinitrc; /usr/X11R6/lib/X11/xinit/xinitrc if $HOME/.xinitrc
  does not exist
others may be different again - check the man pages

Some Unix systems require these scripts to be executable.

-- 
  Vote against SPAM: http://www.politik-digital.de/spam/
 
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight  http://www.lfix.co.uk/oliver
   PGP key from public servers; key ID 32B8FAA1
 
 Do not be anxious about anything; but in every thing
  by prayer and supplication with thanksgiving let your
  requests be made known unto God. 
  Philippians 4:6 



Re: Login script!

1999-08-07 Thread Michael Stenner
On Sat, Aug 07, 1999 at 08:44:30PM +0200, Rudy Broersma wrote:
 Is it possible that Linux executes a script file when a user logs on?
 So for example, if user RUDY logs on, it executes the /home/rudy/script
 file, and when ROOT logs on, it executes the /root/script file!

your shell takes care of this for you.  Note the bash manpage ('man
bash') for the specifics of what it executes and when, but the summary
is this:

if a shell is a login shell (like when you sit down and LOG IN) it
executes:
/etc/profile
~/.bash_profile
~/.bash_login
~/.profile

(note: login shells execute ~/.bash_logout when they exit)

if it is not a login shell (typically, xterms use non-login shells --
as a general, but not universal rule, if you need a password to start
it, it's a login shell), it executes:
~/.bashrc

Other shells have equivalent files, but you'll have to look in the
manpages for the details.

-Michael

-- 
  Michael Stenner   Office Phone: 919-660-2513
  Duke University, Dept. of Physics   [EMAIL PROTECTED]
  Box 90305, Durham N.C. 27708-0305


Re: Login script!

1999-08-07 Thread Brian Servis
*- On  7 Aug, Rudy Broersma wrote about Login script!
 Hi,
 
 Is it possible that Linux executes a script file when a user logs on?
 So for example, if user RUDY logs on, it executes the /home/rudy/script
 file, and when ROOT logs on, it executes the /root/script file!
 
 Could anybody please give me some examples?
 

Yes. Each shell has its own files. So look at the man pages for the
shell that you use.

From the bash man page:

   When bash is invoked as an  interactive  login  shell,  it
   first  reads and executes commands from the file /etc/pro­
   file, 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.

From the tcsh man page

   A login shell begins by executing commands from the system
   files /etc/csh.cshrc and /etc/csh.login.  It then executes
   commands  from  files  in the user's home directory: first
   ~/.tcshrc (+) or, if ~/.tcshrc  is  not  found,  ~/.cshrc,
   then  ~/.history (or the value of the histfile shell vari­
   able), then ~/.login, and finally ~/.cshdirs (or the value
   of  the  dirsfile shell variable) (+).  The shell may read
   /etc/csh.login before instead of after /etc/csh.cshrc, and
   ~/.login before instead of after ~/.tcshrc or ~/.cshrc and
   ~/.history, if so compiled; see the  version  shell  vari­
   able. (+)

   Non-login shells read only /etc/csh.cshrc and ~/.tcshrc or
   ~/.cshrc on startup.
  []
When a login shell termi­
   nates it sets the logout shell  variable  to  `normal'  or
   `automatic'  as  appropriate,  then executes commands from
   the files /etc/csh.logout and  ~/.logout.  The  shell  may
   drop  DTR  on logout if so compiled; see the version shell
   variable.


-- 
Brian 
-
Mechanical Engineering  [EMAIL PROTECTED]
Purdue University   http://www.ecn.purdue.edu/~servis
-


Re: Login script!

1999-08-07 Thread Bob Nielsen
If you are using the bash shell, the file ~/.bash_profile is read when
logging on.  

Bob

On Sat, Aug 07, 1999 at 08:44:30PM +0200, Rudy Broersma wrote:
 Hi,
 
 Is it possible that Linux executes a script file when a user logs on?
 So for example, if user RUDY logs on, it executes the /home/rudy/script
 file, and when ROOT logs on, it executes the /root/script file!
 
 Could anybody please give me some examples?
 
 Thanks in advance,
 
 Rudy
 
 
 
 
 
 
 -- 
 Unsubscribe?  mail -s unsubscribe [EMAIL PROTECTED]  /dev/null
 

-- 
Bob Nielsen Internet: [EMAIL PROTECTED]
Tucson, AZ  AMPRnet:  [EMAIL PROTECTED]
DM42nh  http://www.primenet.com/~nielsen


Re: Login script!

1999-08-07 Thread Paul Miller
Rudy Broersma wrote:
 
 Hi,
 
 Is it possible that Linux executes a script file when a user logs on?
 So for example, if user RUDY logs on, it executes the /home/rudy/script
 file, and when ROOT logs on, it executes the /root/script file!
 
 Could anybody please give me some examples?
 
Yup, when using the BASH shell, it will call the .bash_profile upon an
interactive login or .bashrc for a non-interactive login. You can refer to the
man page for your shell to find out what script file it runs. BTW /etc/profile
is used by most shells as a system wide profile meaning it is read for all
logins.

Hope this helps,
-- 
Paul Miller
[EMAIL PROTECTED]

Where do all the bits go when the computer is done with them?