Category: cygwin
-
today I ran into the “Tie::Hash::NamedCapture” problem again, and I decided to resolve it properly
I started experiencing this problem a while ago, I guess with some new Perl release “creeping” in. So far I have “resolved” this problem by choosing an older Perl version hanging around. Today on cygwin I installed “perl-debuginfo” – this won’t solve the problem on my other platforms, but at least I finally have a hook on the issue.
-
cygwin: Cygserver
- https://www.cygwin.com/cygwin-ug-net/using-cygserver.html
- https://x.cygwin.com/docs/ug/using-shared-memory.html
- https://superuser.com/questions/738105/how-to-install-cygserver
Within a cygwin installation you can find this file:
- /usr/share/doc/Cygwin/cygserver.README
Looks like some X Window applications like the terminal emulators need Unix shared memory. Looks like that requires Cygserver … — I am not sure though. Gathering experiences …
N.B.: “Sometimes” I am running a cygwin installation as non-admin. I am not sure how much sense Cygserver makes w/o admin-rights.
This certainly does not work under such circumstances:
$ cygrunsrv -S cygserver
-
terminal emulators available in the Cygwin environment
The classical Unix/BSD/Linux approaches:
- https://en.wikipedia.org/wiki/Terminal_multiplexer
- https://en.wikipedia.org/wiki/GNU_Screen
- https://en.wikipedia.org/wiki/Tmux
- …
I urgently need to replace mintty within my Cygwin environment by something more serious. I need to split the screen horizontally or vertically. And I cannot cope with screen‘s shortcomings – esp. with its learning curve.
- https://cygwin.com/packages/package_list.html
- https://cygwin.com/packages/x86_64/konsole/
- https://cygwin.com/packages/x86_64/konsole4/
Which packages can we find in Cygwin:
$ apt-cyg listall tty terminal konsole mintty putty gnome-terminal # use mate-terminal instead! lxterminal # !!! mate-terminal # !!! - but you have to master the mate desktop qterminal # !!!!!! - the Qt terminal emulatur xfce4-terminal # !!! konsole # !!! - halts suddenly after a while - use "xkill" to ger rid of the window ...
Which packages support screen splitting, I mean one on top of the other?
- qterminal # my favourite
- konsole
- …
-
KDE Konsole is a terminal emulator (AKA console) for the K Desktop Environment — outdated — I now prefer qterminal over konsole
- https://konsole.kde.org
- https://docs.kde.org/stable5/en/applications/konsole/commandreference.html#settings-menu — shortcuts, how to move the focus to another tab, …
- http://kde-cygwin.sourceforge.net
- https://cygwin.com/packages/package_list.html
- https://cygwin.com/packages/x86_64/konsole/
- https://cygwin.com/packages/x86_64/konsole4/
I urgently need to replace mintty within my Cygwin environment by something more serious. I need to split the screen horizontally or vertically. And I cannot cope with GNU screen‘s shortcomings – esp. with its learning curve.
Context:
Update 2018-07-10:
My impression: konsole on Cygwin is buggy: it halts suddenly after a while.
I now prefer qterminal, the Qt terminal emulator.
-
getent – “get entries from administrative database”
The getent command displays entries from databases supported by the Name Service Switch libraries, which are configured in /etc/nsswitch.conf. If one or more key arguments are provided, then only the entries that match the supplied keys will be displayed. Otherwise, if no key is provided, all entries will be displayed (unless the database does not support enumeration).
My DS713+ (Intel based Synology NAS) does not have in on board, its Entware repository neither, but using “locate” I spotted a binary in a docker installation. It looks, like it is compiled for Debian, but it runs anyway.
- https://cygwin.com/packages/x86_64/getent/ – getent on cygwin
getent on macOS: basically it’s not there and there is no way to get it, and it does not make sense to emulate it; use the right tools on macOS!
- http://zzamboni.org/brt/2008/01/21/how-to-emulate-unix-getent-with-macosxs-dscl/
- https://apple.stackexchange.com/questions/44567/how-can-i-install-getent-on-snow-leopard
- https://unix.stackexchange.com/questions/373309/mac-os-command-to-resolve-hostnames-like-getent-on-linux
- https://superuser.com/questions/279891/list-all-members-of-a-group-mac-os-x/395738
- https://www.cyberciti.biz/faq/check-list-users-unix/
-
comparing /proc/12345/cmdline on Linux — “diff –text” vs “diff –brief –text” vs “cmp –silent”
A cmdline “file” contains NUL characters, so “
diff” needs to be used with “--text” otherwise it will fail anyway.I chose process ID 12345 deliberately, it is just a placeholder.
$ cp /proc/12345/cmdline $HOME/cmdline $ ll /proc/12345/cmdline ~/cmdline -r--r--r-- 1 root root 0 2018-06-12 09:22:50 /proc/12345/cmdline -r--r--r-- 1 user users 45 2018-06-12 09:48:19 /homes/user/cmdline # /proc/12345/cmdline is a file in the proc filesystem. # is the displayed size a bug or a feature? $ wc --bytes /proc/12345/cmdline ~/cmdline 45 /proc/12345/cmdline 45 /homes/user/cmdline 90 total $ diff --text /proc/12345/cmdline ~/cmdline; echo $? 0 # as we expect $ diff --brief /proc/12345/cmdline ~/cmdline; echo $? Files /proc/12345/cmdline and /homes/user/cmdline differ 1 # why are they now different? $ cmp --silent /proc/12345/cmdline ~/cmdline; echo $? 1 # why are they now different?
“
diff --brief --text” and “cmp --silent” presumably take the file size into account.On Cygwin “
diff --brief --text” behaves like “diff --text“.I was quite surprised to experience these differences. It took me quite a while to realise, where my surprising processing results came from.
-
mintty is a terminal emulator for cygwin, …, and for WSL (Windows Subsystem for Linux)
- http://mintty.github.io
- http://mintty.github.io/mintty.1.html
- https://github.com/mintty/utils
- https://github.com/mintty/mintty/wiki
- https://github.com/mintty/mintty/wiki/Tips
- https://github.com/mintty/mintty/wiki/Tips#virtual-tabs
- — “… By default, the list is shown in the extended context menu (Ctrl+right-click), …, and the menus opened with the Ctrl+Menu key …“
- https://github.com/mintty/mintty/wiki/Tips#using-ctrltab-to-switch-window-pane-in-terminal-multiplexers (GNU Screen, tmux) — “The Ctrl+Tab and Ctrl+Shift+Tab key combinations can be used to switch …“
- https://github.com/mintty/mintty/wiki/Tips#localization