Software >
Chocolatey: babun
https://babun.github.io/
A customized Cygwin for Linux on Windows: Zsh, Bash, Git and other Linux software, all pre-configured.
Can install other software provided by Cygwin.
My configuration specific to Babun is currently scattered throughout my git repository, just findinall Babun
(using my findinall()
)
-
Uses the Mintty terminal.
alt-f3
to search
--
- 2018-10-10 - I kept using Babun for some time, but now I've switched to Windows Subsystem for Linux
- 2018-07-26 - I now use Git on Windows
-
2018-07-26 - I get the impression those types have swooped in, and I'm killing this.
- 2017-11-01 - 1.2.0 (updated Cygwin) on Windows 10
- 2017-10-25 - 1.2.0 on Windows 10
-
2017-10-25 - I used to use Git on Windows.
2017-11-01 - 1.2.0 (updated Cygwin) ∞
https://github.com/babun/babun/issues/712#issuecomment-264727643
Basically all issues that I ran into were immediately fixed by just running the up-to-date cygwin installer once against the cygwin directory in .babun. Now everything works, pact uses the latest source and so far not a single error (even though I've been up to some fringe things).
After the Cygwin update, Babun would always do its health check. To solve that, I edited ~/.babunrc
to uncomment:
export DISABLE_CHECK_ON_STARTUP="true"
It can still be manually run:
\babun check
2017-10-25 - 1.2.0 ∞
It can do Windows 10 symlinks!
It can install more software. See below.
Other notables:
-
Midnight Commander (mc)
- Not that I use it, but it's nice to have around.
Installation ∞
- Download the installation zip
- Unzip
- Open a command prompt
-
cd
to the directory it created.
install.bat /t "D:\target_folder"
Whatever your target folder is, it will create .babun
and put its files within.
These don't seem to matter..
Fixing symlink -> /usr/bin/mcdiff File not found - D:/live/Babun/.babun/cygwin/bin/mc Fixing symlink -> /usr/bin/mcedit File not found - D:/live/Babun/.babun/cygwin/bin/mc Fixing symlink -> /usr/bin/mcview File not found - D:/live/Babun/.babun/cygwin/bin/mc Fixing symlink -> /usr/bin/rnano File not found - D:/live/Babun/.babun/cygwin/bin/nano Fixing symlink -> /usr/bin/zipinfo File not found - D:/live/Babun/.babun/cygwin/bin/unzip ... cat: /usr/local/etc/babun/installed/shell-here: No such file or directory Installing plugin's home [shell-here] Working directory is /setup Mirror is http://mirrors.kernel.org/sourceware/cygwin/ --2017-10-25 14:24:15-- https://mirrors.kernel.org/sourceware/cygwin/x86/setup.bz2 Resolving mirrors.kernel.org (mirrors.kernel.org)... 198.145.21.9, 2001:19d0:306:6:0:1994:3:14 Connecting to mirrors.kernel.org (mirrors.kernel.org)|198.145.21.9|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2017-10-25 14:24:16 ERROR 404: Not Found. --2017-10-25 14:24:16-- https://mirrors.kernel.org/sourceware/cygwin/x86/setup.ini Resolving mirrors.kernel.org (mirrors.kernel.org)... 198.145.21.9, 2001:19d0:306:6:0:1994:3:14 Connecting to mirrors.kernel.org (mirrors.kernel.org)|198.145.21.9|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2017-10-25 14:24:16 ERROR 404: Not Found. Error updating setup.ini, reverting Installing chere Package chere not found or ambiguous name, exiting
Upon uninstalling, it also uninstalls all cached package management downloads.
Software notes ∞
-
A script is automatically
chmod +x
when edited by Nano, when it has a shebang.- Tested with
/usr/bin/env sh
- Then it can
be run with ./script.sh
- Tested with
- A script With no shebang must be run like
bash script.sh
-
Top-left icon
(oralt-space
)> Options > Looks >
Colors
[Background]
- Slide the right-hand vertical-slider down to black.Window
- [_] PgUp and PgDn scroll without modifier
-
Midnight Commander (
mc
) should have the appearance "nicedark", as that is most like the terminal.- The numbers at the bottom aren't very good though, but that doesn't matter.
Notes / Review ∞
- Their intro video talked about updating also updating configuration, which makes me worry that my own customization would be overwritten. Is there a way to keep my stuff separate?
-
I can't directly run
./filename.sh
or. filename.sh
.. what the fuck.- I have to do
zsh ./filename.sh
- I have to do
- I can't
chmod
things. - It has the default
--force
forcp
,mv
, andrm
. WHY THE FUCK DO PEOPLE DO THIS!? -
It can trivially launch Windows applications.
cygstart
is the equivalent to the Windowsstart
program, giving more options.
-
\pact upgrade mc
, will destroy midnight commander, rendering it non-runnable. It cannot be repaired. I have to delete .babun and re-install it.- Hrm. I did a complete reinstall, and
mc
can sometimes take a long time to load. Maybe this is what hit me before. I have no idea what's going on with it.
- Hrm. I did a complete reinstall, and
Within a script:
#!/usr/bin/env sh # This will work in a script or in bash, but not at the zsh-commandline. Because reasons. __=$( cmd.exe /c "echo %PATH%" ) \echo "$__"
Not heavily-explored, but this works:
\cygstart --action=runas "cmd"
So this means you can make a fake 'sudo':
sudo() { \cygstart --action=runas "$*" & }
[WORKAROUND] - File-locking issues ∞
TL;DR - Type rm
in a working terminal to allow other terminals to start.
- Open up one terminal
- Edit a startup script (e.g.
nano ~/.zshrc
), -
Open up a second terminal
- It will probably lock up.
-
Exit
nano
in the first terminal- The second terminal will probably not continue.
- Additional terminals will probably lock up.
-
In the first terminal, type
rm
(with nothing else)- The locks are freed up, and other terminals will continue as expected.
Working with Windows/DOS filenames, and working with symlinks ∞
For example, with Geany:
- It needs DOS-style filenames.
-
It can't work with symlinks, so it should be passed the real name.
My solution can be found within lib.sh
Fixing $PATH
∞
$PATH is broken, and needs realpath
to correct each entry.
My solution can be found within lib.sh
cygwin and other paths with --folder
∞
TL;DR - cygpath_folders.sh
I want:
- The
Program Files
directory. -
The user directory.
- I end up using:
\dirname $( \cygpath --desktop ) \dirname $( \cygpath --desktop --mixed )
I thought --folder
would be useful, but cygpath is opaque as to how it works.
-F, --folder ID output special folder with numeric ID and exit
https://web.archive.org/web/20220406084457/softpanorama.org/Unixification/cygwin.shtml
The -F outputs other special folders specified by their internal numeric code (decimal or 0xhex). For valid codes and symbolic names, see the
CSIDL_*
definitions in the include file/usr/include/w32api/shlobj.h
from package w32api. The current valid range of codes for folders is0
(Desktop) to59
(CDBurn area).
My solution can be found within cygpath_folders.sh
Package management (pact
) ∞
All cached downloads and new software is kept within the .babun
directory tree. So if you specify, for example, the Babun installation somewhere on D:
then all Babun's additional software will also be with it, on that drive.
The package manager is pact
.
Updating Babun and Cygwin:
\pact update
I believe the complete of software packages is https://cygwin.com/packages/package_list.html
[BROKEN?] - Packages I install ∞
\pact install \ ` # --- ` \ ` # GUI ` \ ` # --- ` \ ` # ` \ ` # ----------- ` \ ` # commandline ` \ ` # ----------- ` \ `#` These do not work: lftp \ geany \ geany-plugins-spellcheck \
Files are downloaded and cached to /setup/*/release/packagename
Notes ∞
Software to explore:
-
gcc
- Why is it here, though? What can I actually do with it?
- I was unable to compile The Sanos text editor.
Last updated 2022-09-10 at 19:18:39