Mail Archives: cygwin/2010/03/15/20:41:46
Roe, Kevin L. wrote:
> So a complete uninstall (by deleting the directory and removing registry references) followed by a complete install fixed all my problems except one:
>
> My rxvt shortcut results in a prompt that has not read my .bashrc file. So I hacked the /etc/profile file to include the line:
>
> . "/<home_dir>/.bashrc"
>
> That fixed it.
And it broke automatically updating /etc/profile for the future. Rather
than editing your /etc/profile file, create a .bash_profile file in your
home directory with the following contents:
[[ -f ~/.bashrc ]] && . ~/.bashrc
Then read the bash manpage regarding startup files. What you want is at
the beginning of the INVOCATION section. The following excerpt provides
the details for --login:
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.
> The rxvt syntax is below:
>
> C:\cygwin\bin\rxvt.exe -T "%COMPUTERNAME%.%USERDNSDOMAIN%" -e /bin/bash --login -c "exec /bin/bash"
This can be simplified as follows (all one line):
C:\cygwin\bin\rxvt.exe -T "%COMPUTERNAME%.%USERDNSDOMAIN%" -e /bin/bash
--login
Telling rxvt to execute /bin/bash --login (using the -e option) will
start your bash shell. There is no need to tell that bash shell to
simply exec another one by use of the -c option to bash. It doesn't
break anything to do it your way, but it's unnecessary.
-Jeremy
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
- Raw text -