Set Default Shell in Cygwin

Try editing /etc/nsswitch.conf instead of /etc/passwd Instead of creating a passwd file, which Cygwin recommends against1, you could edit /etc/nsswitch.conf. Add or edit the following line: db_shell: /usr/bin/fish The down/up side of this method is that, if you have multiple users, this change affects all of them. The up/up side is that it’s dead simple. … Read more

How to start a system “beep”, from the built-in pc speaker, using a batch file?

WARNING: rundll32.exe Kernel32.dll,Beep 750,300 no longer works well from the command line on modern windows systems as rundll32 no longer accepts integer values (again, through the command line) and this will play the beep with the default values which is too long (and frequency is irritating): REM Again, with warnings about running this from the … Read more

How to make a symbolic link with Cygwin in Windows 7

In short, define the following environment variable: CYGWIN=winsymlinks:nativestrict According to Cygwin documentation: If set to winsymlinks:native or winsymlinks:nativestrict, Cygwin creates symlinks as native Windows symlinks on filesystems and OS versions supporting them. The difference between winsymlinks:native and winsymlinks:nativestrict is this: If the filesystem supports native symlinks and Cygwin fails to create a native symlink for … Read more

Using Component Object Model (COM) on non-Microsoft platforms

Answering myself but I managed to find the perfect library for OLE/COM calling in non-Microsoft compilers : disphelper. (it’s available from sourceforge.net under a permissive BSD license). It works both in C and C++ (and thus any other language with C bindings as well). It uses a printf/scanf-like format string syntax. (You pass whatever you … Read more

Is SSH ControlMaster with Cygwin on Windows actually possible?

Apparently the conclusion after much searching is that currently it is NOT possible. These were the only links I found that dealt with this: https://stackoverflow.com/questions/17140457/imitating-a-shared-ssh-session-for-scripts-on-windows “…but there is no implementation of OpenSSH for Windows which does this (file descriptors over unix sockets do not work in Cygwin).” and http://gcc.gnu.org/wiki/SSH_connection_caching “Unfortunately if you are using OpenSSH … Read more

‘RTLD_NEXT’ undeclared

The issue here is that RTLD_NEXT is not defined by the posix standard . So the GNU people don’t enable it unless you #define _GNU_SOURCE or -D_GNU_SOURCE. Other relevant pieces of POSIX are dlfcn.h and dlsym.h. Interestingly, the later mentions RTLD_NEXT. Apparently, the GNU people are a bit confused about what is an extension and … Read more

tech