You are here

Unix environment

6 posts / 0 new
Last post
PortablePok
Offline
Last seen: 16 years 2 weeks ago
Joined: 2008-02-05 11:25
Unix environment

Hey

It would be nice to have a portable unix environment with the "most used" unix command-line applications (zsh, bash, sed, awk, grep, find, ...).

grtz
Pok

Bahamut
Bahamut's picture
Offline
Last seen: 12 years 3 months ago
Joined: 2006-04-07 08:44
You mean the programs here?

You mean the programs here? I think they're already portable, but I haven't looked over all of them. I'm pretty sure the shells would store files in %appdata%, but I can't think of any problems with anything else.

Vintage!

rab040ma
Offline
Last seen: 4 months 3 weeks ago
Joined: 2007-08-27 13:35
Most of them will honor a

Most of them will honor a HOME environment variable, so if one redirects HOME to a folder on the removable drive, the settings should be right there.

With CommandPrompt Portable, the starting batch file could contain PATH and HOME and perhaps TMP/TEMP environment variables pointing to folders on the removable drive. Then you'd have your environment all ready to go.

MC

xenoterracide
Offline
Last seen: 14 years 2 months ago
Joined: 2008-02-05 19:21
sort of portable

they run just fine but don't just work with each other. making zsh be able to just run the programs included would be great. I think (not used to this on windows) that you should be able to do it with a relative path.

rab040ma
Offline
Last seen: 4 months 3 weeks ago
Joined: 2007-08-27 13:35
Are you saying that they

Are you saying that they didn't work when you set the PATH properly? Or that you tried it without setting the PATH and it didn't work?

You mention something about zsh; was it not able to find things on the PATH? Or was there some other circumstance that you could cite as an example?

MC

alanbcohen
Offline
Last seen: 4 years 7 months ago
Joined: 2006-01-04 10:47
Cygwin

Cygwin, which is a unix environment under windows, is already available as a portable app, although not PAF-compliant. Here is some text on the subject:

Cygwin on portable storage devices Ali Devin Sezer, 5 Feb 2005 Cygwin is a software package that enables one to work in a UNIX-like environment under a Windows machine. It is fast, reliable and easy to install. It has most of the applications one uses on UNIX (gcc, X, xfig, latex, Perl, bash, ps tools, textutils,...) and most of it is covered by the GNU public license. Cygwin supports many flavors of Windows:XP, 2000, 98, etc. For more info on cygwin go to Cygwin.com. The goal of this page is to describe a way of installing cygwin on a portable storage device like a portable hard drive or a USB memory stick. The main use of such a setup, obviously, is that it enables you to carry a UNIX like system in your pocket everywhere you go and use any Windows machine (e.g. Windows pc's at your university library) with your own powerful cygwin/UNIX tools. Choice of Portable device The choice of device doesn't really change the installation process. However here are some notes on this issue: * USB memory stick: A core cygwin installation doesn't need more than a couple of hundred MBs. Thus a 1 GB USB memory stick easily gives you the capacity you need to install cygwin. But, remember that USB memory sticks are slow (bearable with NTFS crawling with FAT32) if you install a big file system on them. * CDROM's. Because CDROMs are read-only, they are a poor choice of media to install cygwin. See the following posts at cygwin.com: o http://www.cygwin.com/ml/cygwin/2003-07/msg00026.html o http://www.cygwin.com/ml/cygwin/2003-05/msg00692.html o http://www.cygwin.com/ml/cygwin/2003-05/msg00705.html o http://www.cygwin.com/ml/cygwin/2003-05/msg00728.html * Portable Hard drives : Portable Hard drives are great. If you are getting one, make sure you get one that receives power through the USB cable and from the computer. The rest of this note is independent of the choice of portable storage device. Choice of Filesystem You have two realistic choices for a file system (FS) on your portable storage device:fat32 and ntfs. (For those who are not familiar with FSs: FS is what is installed on a storage device when you format it. The formatting software asks you which kind of FS you want). Although NTFS is a much better FS, I had read/write permission problems with it when using different computers on which i had different accounts. A simplistic solution to this problem is to use fat32. That's what I do. Installation I assume that your portable storage device is already formatted. Here are the steps: * Go to cygwin.com and install cygwin on your portable storage device. Let's designate your portable storage device with "E:\" and assume that you installed cygwin in "E:\cygwin". As is, this installation will work only when your portable storage device is connected to the computer on which you performed the installation. What follows is what you need to do so that your cygwin can work with any host windows computer. * Unless it is not there, create the directory "E:\cygwin\home". Then create the directory "E:\cygwin\home\username", where username is a user name that you pick. (e.g. your name). This will be your home directory: whenever you start an rxvt or an xterm it will start with this directory as the current directory. * Copy profile to E:\cygwin\etc. Open it with an editor (e.g. notepad) and replace the phrase "username" (it occurs twice) with the user name you have chosen above. The scripts ``X.bat'' and ``uninstall.bat'' modify host's registry. They insert several keys in the CURRENT USER and LOCAL MACHINE sections of the registry. These keys are modified through the ``mount'' command of cygwin and are referred to by cygwin to find out which directories on the Windows directory structure are going to be mapped to /bin, /lib and /. If cygwin is already installed on the host, "X.bat" will save these entries before changing them. The modified entries are later restored when you are done using your portable cygwin and run the "uninstall.bat" script. * Download X.tab and put it in "E:\". Rename it "X.bat" [*]. This script assumes that you installed cygwin under "E:\cygwin" on your storage device. If you installed it in some other directory you will need to modify this script to reflect that ( X.bat figures out the drive label of the portable device [assumed to be E in this discussion] on its own. So you have to change X.bat only if cygwin is installed in some directory other than "cygwin" in the root directory of your portable storage device). X.bat inserts several keys into the windows registry. This is required for cygwin to work. It also saves any key values that it might alter. Finally it starts a copy of the X server and a terminal (assuming that X and rxvt were installed in step 1). * Download uninstall.tab and put it in "E:\". Rename it to "uninstall.bat" [*]. Run this script once you are done using cygwin and quit all cygwin software. It restores any registry keys that might have been altered when running "X.bat". This is it. double clicking "X.bat" will make cygwin operational and start an X server as well as an rxvt. When you exit all cygwin software, double click "uninstall.bat". If you are using a very old windows, replace for /f %%A in ('cd') do set WD=%%A in "X.bat" with set WD=%1 and start "X.bat" from "Run" in the Start menu by typing "X.bat [DRIVE]:\" in the Run box, where [DRIVE] is the letter that Windows assigned to your portable storage device (`E' in the above examples). [*] This script is based on a script by Fergus in the CD-ROM related postings at cygwin.com (see the links above).

Log in or register to post comments