Category: cygwin
-
EmacsWiki: NTEmacs With Cygwin
This is great!!!
Now I can do “Search Files…” in Emacs’s dired-mode again — just like “everywhere”.
How to get it to start in the user’s home directory? Create a shortcut for runemacs.exe, move it to AppData\Roaming\Microsoft\Windows\Start Menu\Programs\ ! Modify the properties of that shorcut accordingly!
-
git on cygwin (or wherever): if you run into the “ssh-askpass” problem, make sure you get the SSH agent running!
- deploy your SSH public key to your git server!
If the SSH agent allows you logging in to “various platforms”, it will also allow you logging in to your git server. And you are fine.
-
the Cygwin packages that I need most seriously on a Windows PC
my package list:
- https://cygwin.com/packages/x86_64/wget
- https://cygwin.com/packages/x86_64/unzip
- https://cygwin.com/packages/x86_64/git
- https://cygwin.com/packages/x86_64/curl
I can install these ones through apt-cyg (see below!) (maybe git, … from the list above as well):
- https://cygwin.com/packages/x86_64/diffutils
- https://cygwin.com/packages/x86_64/perl
- https://cygwin.com/packages/x86_64/perl-debuginfo
- – solves the “Tie::Hash::NamedCapture” problem
- https://cygwin.com/packages/x86_64/python2
- https://cygwin.com/packages/x86_64/python3
- https://cygwin.com/packages/x86_64/ruby
- https://cygwin.com/packages/x86_64/openssh
- https://cygwin.com/packages/x86_64/rsync
- https://cygwin.com/packages/x86_64/xinit – X.Org X server launcher (Cygwin/X)
- https://cygwin.com/packages/x86_64/xmlstarlet – XMLStarlet is a command line XML toolkit which can be used to transform, query, validate, and edit XML documents using a simple set of shell commands
- https://cygwin.com/packages/x86_64/poppler – includes pdftohml (my pdf2xml converter)
- https://cygwin.com/packages/x86_64/procps-ng – includes watch
- https://cygwin.com/packages/x86_64/jq/ – a lightweight and flexible command-line JSON processor
- https://cygwin.com/packages/x86_64/psmisc – provides pstree
- https://cygwin.com/packages/x86_64/getent
- https://cygwin.com/packages/x86_64/qterminal
- https://cygwin.com/packages/x86_64/xkill
- https://cygwin.com/packages/x86_64/vim
And certainly I do need apt-cyg 😎 — it has its own article here:
- http://Jochen.Hayek.name/wp/blog-en/2018/07/04/apt-cyg/
- http://Jochen.Hayek.name/wp/blog-en/category/cygwin
apt-cyg wants to see itself on PATH.
-
“ssh -Y” fails moaning “X11 forwarding request failed on channel 0” – solved!
$ ssh -v -Y REMOTE_HOST
[…]
debug1: Requesting X11 forwarding with authentication spoofing.
debug1: Requesting authentication agent forwarding.
X11 forwarding request failed on channel 0I looked around and I found this article:
The article advises to edit /etc/ssh/sshd_config on the remote system:
$ sudo vi /etc/ssh/sshd_config
and to add these lines:
X11Forwarding yes
X11UseLocalhost noThe remote sshd needs reloading, and because the remote system uses systemd, this is how:
$ systemctl restart sshd
Now after a new “ssh -Y” I can start xeyes and it gets displayed on my PC’s Cygwin/X server.
-
cygwin’s cp fails mentioning cygatttr-1.dll
…/opt/cygwin64/bin/cp.exe: error while loading shared libraries: cygattr-1.dll: cannot open shared object file: No such file or directory
I wasn’t able to find a viable fix on the web.
I found a copy of that file in in old installation, and I copied that into the cygwin bin directory – the cygwin64 and the non-64 one – at least for cygwin64 it fails w/o moaning properly, just that it yields exit code 127.
-
installing Cygwin on Windows without having admin rights
I like the “-B” (“–no-admin”) command line approach best:
.\setup-x86_64 --no-admin -
my 2017 Windows working environment
All these packages resp. utilities do not require Windows admin rights for getting them “installed” – actually they do not need “a Windows system installation”.
Below C:\Users\jhayek I created a couple of subdirectories:
- opt: every package resp. utility has its own subdirectory below there
- bin: some .bat and .sh (BusyBox ash) scripts go there
Packages resp. utilities:
- GNU Emacs
- busybox-w32: includes a shell and a lot of Unix utilities
- Strawberry Perl
- https://ConEmu.github.io — a Windows console alternative, where you can paste text w/o using the mouse 😎
- xmlstarlet
After having worked with this set-up for a couple of days, I have to admit: this is not just a minimalist Unix-ish working environment, but it is rather enjoyable working environment. I do not have the GNU utilities with all their advantages (nice long command line options and lots of features) – but for most purposes the utilities built into busybox-w32 are good enough for my purposes. What a great idea it was to think of “busybox for Windows” a couple of days ago – and actually find “busybox-w32”!!! I had to consider a lightweight alternative of Cygwin, because on my new client’s Windows computers it’s not available.
ConEmu makes busybox-w32 and its shell (the “ash”) even more enjoyable.
GNU Emacs is as good as always – I can’t really describe how sad it is to not have it available in a serious working environment.
Strawberry Perl so far has all the modules, that my utilities need. I am really glad to have that “distribution”.
xmlstarlet is my XPath and XML Swiss Army Knife.
With all these utilities and packages available it’s even quite fun to work on Windows 7 😆
-
Perl on Windows w/o Cygwin: Strawberry Perl for Windows
I need (some) Perl on Windows to be run from within shell wrapper scripts. Looks like there will be no Cygwin. Which shell will it be? Probably Busybox:
- https://frippery.org/busybox/
- http://strawberryperl.com/releases.html
- I don’t have admin rights on that Windows machine, so I am going for “64bit PortableZIP edition + extra PDL related libs”
- I unzip it to the subdirectory derived from the ZIP filename
- then for setting up the environment I run the portableshell.bat therein
- afterwards I start the busybox shell as suggested on the web page shown above