Discussion:
[Mingw-users] home folder
Angelica Perduta
2012-12-30 01:10:43 UTC
Permalink
I just installed MinGW and it all seems to be working.

However I do prefer to keep all my own work well away from the C:
drive as that makes life much easier when doing backups and upgrades.

Is there any way to make msys point my "home" folder to the D: drive?
Renato Silva
2012-12-30 01:46:35 UTC
Permalink
Post by Angelica Perduta
I just installed MinGW and it all seems to be working.
drive as that makes life much easier when doing backups and upgrades.
Is there any way to make msys point my "home" folder to the D: drive?
Add an entry to MSYS/1.0/etc/fstab like this, where YourUserName is the
value of $LOGNAME:
D:/YourHome /home/YourUserName

This should work too, it's what I use here:
C:/Users /home
Earnie Boyd
2012-12-30 04:46:44 UTC
Permalink
Post by Renato Silva
Post by Angelica Perduta
I just installed MinGW and it all seems to be working.
drive as that makes life much easier when doing backups and upgrades.
Is there any way to make msys point my "home" folder to the D: drive?
Add an entry to MSYS/1.0/etc/fstab like this, where YourUserName is the
D:/YourHome /home/YourUserName
C:/Users /home
You can also set the HOME environment variable before starting MSYS or
in /etc/profile.d/home.sh
--
Earnie
-- https://sites.google.com/site/earnieboyd
Angelica Perduta
2012-12-30 10:21:25 UTC
Permalink
Thanks for both those ways of setting it. I used fstab and it has
pointed my home directory to drive D: where I want it. I noticed the
environment variables still say HOMEDRIVE=C: HOMEPATH='\' so I
presume it's "mounting" my D drive as if it's part of the C drive.

On Windows XP I could point my home folder to the D drive, but that
doesn't work anymore on Windows 7. None the less I do like to keep it
so even if I loose my whole C drive my own work remains intact. Would
this work reliably with removable USB drives too?

On Sun, Dec 30, 2012 at 5:46 PM, Earnie Boyd
Post by Earnie Boyd
Post by Renato Silva
Post by Angelica Perduta
I just installed MinGW and it all seems to be working.
drive as that makes life much easier when doing backups and upgrades.
Is there any way to make msys point my "home" folder to the D: drive?
Add an entry to MSYS/1.0/etc/fstab like this, where YourUserName is the
D:/YourHome /home/YourUserName
C:/Users /home
You can also set the HOME environment variable before starting MSYS or
in /etc/profile.d/home.sh
--
Earnie
-- https://sites.google.com/site/earnieboyd
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
http://p.sf.net/sfu/learnmore_123012
_______________________________________________
MinGW-users mailing list
This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same. Disregard for the list etiquette may cause your account to be moderated.
_______________________________________________
https://lists.sourceforge.net/lists/listinfo/mingw-users
Renato Silva
2012-12-30 11:10:16 UTC
Permalink
Post by Angelica Perduta
Thanks for both those ways of setting it. I used fstab and it has
pointed my home directory to drive D: where I want it. I noticed the
environment variables still say HOMEDRIVE=C: HOMEPATH='\' so I
presume it's "mounting" my D drive as if it's part of the C drive.
Those vars belong to Windows, check with cdm.exe.
Earnie Boyd
2012-12-30 15:38:14 UTC
Permalink
On Sun, Dec 30, 2012 at 5:21 AM, Angelica Perduta wrote:

Please do not top post.
Would this work reliably with removable USB drives too?
Not by using /etc/fstab since you cannot be assured of the drive
letter. But once you know the drive letter you could open a cmd.exe,
set HOME appropriately and then start msys.bat from the USB drive.
--
Earnie
-- https://sites.google.com/site/earnieboyd
Keith Marshall
2012-12-30 17:20:33 UTC
Permalink
Post by Earnie Boyd
Would this work reliably with removable USB drives too?
Not by using /etc/fstab since you cannot be assured of the drive
letter. But once you know the drive letter you could open a cmd.exe,
set HOME appropriately and then start msys.bat from the USB drive.
Some time ago, I promised to write up a wiki article to explain the
mechanism I use to run MSYS reliably off a USB thumb drive. I simply
haven't had the time to do that yet, but I do have a much more reliable
method than Earnie's suggestion above, based on the use of a script in
/etc/profile.d, in conjunction with some magic comments in /etc/fstab,
to track changes in drive letter, and their relationship to defined
mount points. WJFFM, entirely within MSYS, and with no need for messing
about to determine, much less to predefine, $HOME.

Unfortunately, the drives I use this on are all locked up at work, and I
will not be back there until after the new year holiday; I'll have to
get back to you then, with actual sample code.
--
Regards,
Keith.
Loading...