- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Microsoft
- >
- cygwin bash --login
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-08-2005 12:10 AM
тАО02-08-2005 12:10 AM
cygwin bash --login
I start my bash using this script:
--
@echo off
C:
chdir \home\homedir
set CYGWIN=tty
set HOME=/cygdrive/c/home/homedir
set ENV=/cygdrive/c/home/homedir/.bashrc
c:\bin\bash -i
--
This script correctly loads my .bashrc file.
Strangely (for me), if, while in bash, I start bash --login, this new bash does *not* load my .bashrc file, even though ENV is exported correctly in /cygdrive/c/home/homedir/.profile
Any idea why this is so?
All helpful answers will get points.
Thanks, Christian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-09-2005 03:48 PM
тАО02-09-2005 03:48 PM
Re: cygwin bash --login
Will this help:
http://cygwin.com/faq.html
Aso, you didn't mention what Windows OS are you running Cygwin on?
Did you run env command to see if the environment is really exported?
echo $SHELL to double check the shell
Also, check the bashrc file permissions?
Finaly, I'd prefer to install and run SFU in Windows OS. SFU has different shell environment that you can use:
http://www.microsoft.com/windows/sfu/
Please keep me updated
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-09-2005 08:43 PM
тАО02-09-2005 08:43 PM
Re: cygwin bash --login
Thankyou very much for responding! I was wondering if anyone was going to bother to respond...
1. The situation is not critical, but I would like to find out what is going on
2. SFU is not an option for me because my cygwin is working fine and bash is a great shell
3. I didn't look at the faq because I am experienced with shells and so on. This unexpected bash behaviour is strange for me.
4. Permissions are: read and execute for all and as I had mentioned, the .bashrc file is read if I start using bash -i or just bash but not when I use bash --login even though $HOME is exported and correct.
5. Sorry for only 3 points this time but your response was not truly helpful (maybe the next one will be)
Thanks, Christian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-09-2005 09:17 PM
тАО02-09-2005 09:17 PM
Re: cygwin bash --login
The reason why I posted the FAQ is because I found this maybe helpful:
Why doesn't bash read my .bashrc file on startup?
Your .bashrc is read from your home directory specified by the HOME environment variable. It uses /.bashrc if HOME is not set. So you need to set HOME correctly, or move your .bashrc to the top of the drive mounted as / in Cygwin.
Sorry if I couldn't be much of help since I'm not an expert in Cgywin. Perhaps, you'll get more luck in the HP-UX side:
http://forums1.itrc.hp.com/service/forums/familyhome.do?familyId=117
Good luck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-09-2005 09:25 PM
тАО02-09-2005 09:25 PM
Re: cygwin bash --login
Thanks for the quick response :-)
1. I tried changing HOME from /cygdrive/c/home/homedir to c:/home/homedir. It gave me a slightly different result but didn't read in my .bashrc file
2. I tried copying .bashrc to /. Still didn't get read in when starting bash --login
3. Maybe I could post the question to the ITRC Linux forum, since bash is in Linux too.
Thanks again, Christian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-10-2005 03:02 PM
тАО02-10-2005 03:02 PM
Re: cygwin bash --login
The worst case will be to reinstall cygwin!
just my 0.02 Cents
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-10-2005 07:38 PM
тАО02-10-2005 07:38 PM
Re: cygwin bash --login
As already mentioned, maybe I'll post this question in the Linux forum, since it has more to do with bash than it has to do with cygwin.
Kind regards, Christian